Java client certificates over HTTPS/SSL

后端 未结 8 993
攒了一身酷
攒了一身酷 2020-11-22 13:46

I am using Java 6 and am trying to create an HttpsURLConnection against a remote server, using a client certificate.
The server is using an selfsigned root

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 14:32

    I think you have an issue with your server certificate, is not a valid certificate (I think this is what "handshake_failure" means in this case):

    Import your server certificate into your trustcacerts keystore on client's JRE. This is easily done with keytool:

    keytool
        -import
        -alias 
        -file 
        -keystore /lib/security/cacerts
    

提交回复
热议问题