Java Exception on SSLSocket creation

前端 未结 4 1324
执笔经年
执笔经年 2021-01-16 22:05

In the code:

System.setProperty(\"javax.net.ssl.trustStore\", cacerts);
System.setProperty(\"javax.net.ssl.trustStorePassword\", pwdCacerts);

SSLSocketFact         


        
4条回答
  •  醉酒成梦
    2021-01-16 22:44

    I got the solution from another way, I share it for someone who comes here with the same problem:

    I need add this code

    System.setProperty("javax.net.ssl.trustStoreType","JCEKS");
    

    because by default it expects a JKS type.

提交回复
热议问题