1

Is there any way to establish an HTTPS connection without importing the certificate to keyStore?

Currently , I am importing the certificate to myKeyStore

 keytool -import -alias aliasOfCertifiate -file myCertificateFile.cer -keystore myKeystore

using a javax.net.ssl.HttpsURLConnection object to establish the HTTPS connection. But, as per a new requirement, my HTTPS client may need to communicate with thousands of web servers. So, I believe, importing the certificate might not be a good idea.

Any ideas?

jcdyer
  • 18,616
  • 5
  • 42
  • 49
dgm
  • 2,287
  • 1
  • 23
  • 27
  • http://stackoverflow.com/questions/30224607/getting-images-from-https-with-java – ZhongYu May 27 '15 at 15:20
  • bayou... thanks for your reply. I saw the thread you have mentioned. But, my main requirement "not to add it to the trust store". – dgm May 27 '15 at 15:28
  • yes - both answers will accept any server certificate without keystore being involved. – ZhongYu May 27 '15 at 18:45

0 Answers0