Java Exception on SSLSocket creation

前端 未结 4 1278
执笔经年
执笔经年 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:57

    The file you imported (Server.cer) is not in the format java is expecting. You told keytool the format was JCEKS. I believe that means it's a full keystore, which is not likely for a file named Server.cer.

    You may have wanted to use -type PKCS12 instead.

提交回复
热议问题