Skip to content

rahulchauhanraj/CertificateDownloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

1.	download certificate for host (like https://abc.com) from mozilla firfox. and save with the name install-abc-cert

and execute below command to add it in java home.

2.	keytool -delete -alias install-abc-cert -storepass changeit -keystore "%JAVA_HOME%/jre/lib/security/cacerts"

3.	keytool -importcert -noprompt -trustcacerts -alias install-abc-cert -storepass changeit -file <fileParentDirPath>\downloadedCertificate.crt -keystore "%JAVA_HOME%/jre/lib/security/cacerts"

4.	Give permission to JAVA_HOME folder to the current user to execute keytool command without administrator permission.

5. 	Execute CertificateDownloader.java file to download and execute certificate installer.

6.	Validate certificate by running below command 
	
	keytool -list -storepass changeit -keystore "%JAVA_HOME%/jre/lib/security/cacerts" | findstr <certificate-alias>