Created
November 11, 2019 12:15
-
-
Save ashishb888/2e1b0d04e17cc55c3c50f62224249afd to your computer and use it in GitHub Desktop.
Java HTTPS connection with SSL certificate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get SSL certificate from server (Site URL). You can refer below URL | |
https://www.shellhacks.com/get-ssl-certificate-from-server-site-url-export-download/ | |
Use Java's keytool utility to add downloaded certificate to Java's keystore | |
keytool -importcert -file <path-of-certificate> -keystore <keystore-file> -alias <certificate-alias> | |
i.e. keytool -importcert -file E:\certs\some-site.cer -keystore "E:\sw\jdk1.8.0_112\jre\lib\security\cacerts" -alias "some-site" | |
Now you will be able to access HTTPS URLs | |
Common issues when downloading dependencies from repositories URLs | |
https://repo.maven.apache.org/maven2/ | |
https://www.gridgainsystems.com/nexus/content/repositories/external/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment