Receiving SSLHandshakeException: handshake_failure despite my client ignoring all certs

后端 未结 7 1390
北荒
北荒 2020-12-05 03:01

I have a Java program that connects to a webserver using SSL/TLS, and sends various HTTP requests over that connection. The server is localhost and is using a self-signed ce

7条回答
  •  臣服心动
    2020-12-05 03:37

    You are seeing this error most probably because the keystore that your JBoss 6 had access to is not accessible to your JBoss 7 instance.

    What I would recommend is the following.

    Your self-signed server certificate must be imported into a truststore

    keytool -import -alias gridserver -file server.crt -storepass $YOUR_PASSWORD_HERE -keystore server.keystore
    

    Add the following properties to your run.conf

    -Djavax.net.ssl.keyStoreType=pkcs12
    -Djavax.net.ssl.trustStoreType=jks
    -Djavax.net.ssl.keyStore=clientcertificate.p12
    -Djavax.net.ssl.trustStore=server.keystore
    -Djavax.net.debug=ssl # very verbose debug. Turn this off after everything looks good.
    -Djavax.net.ssl.keyStorePassword=$YOUR_PASSWORD_HERE
    -Djavax.net.ssl.trustStorePassword=$YOUR_PASSWORD_HERE
    

提交回复
热议问题