java ssl connection using truststore

后端 未结 1 734
迷失自我
迷失自我 2021-01-21 23:17

I have a web application that connects to a https site. For that I have to install the certificate in the cacerts in lib/security folder. I would like to create a truststore and

相关标签:
1条回答
  • 2021-01-21 23:35

    The easiest way is to set a system property when launching the java process: -Djavax.net.ssl.trustStore=...

    This is used by the default TrustManager, as described in http://docs.oracle.com/javase/1.5.0/docs/guide/security/jsse/JSSERefGuide.html#X509TrustManager

    Alternatively, override the TrustManager as described in the next paragraph in the same document.

    0 讨论(0)
提交回复
热议问题