javax.net.ssl.SSLKeyException: RSA premaster secret error.

Solution Verified - Updated -

Issue

  • We see this exception when setting -Djava.ext.dirs= on the Java command line:

    javax.net.ssl.SSLKeyException: RSA premaster secret error
    at sun.security.ssl.RSAClientKeyExchange.(RSAClientKeyExchange.java:87) [jsse.jar:1.8.0_161]
    at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:962) [jsse.jar:1.8.0_161]
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:348) [jsse.jar:1.8.0_161]
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052) [jsse.jar:1.8.0_161]
    at sun.security.ssl.Handshaker$1.run(Handshaker.java:992) [jsse.jar:1.8.0_161]
    at sun.security.ssl.Handshaker$1.run(Handshaker.java:989) [jsse.jar:1.8.0_161]
    at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_161]
    at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1467) [jsse.jar:1.8.0_161]
    at org.xnio.ssl.JsseSslConduitEngine.handleHandshake(JsseSslConduitEngine.java:543) [jboss-client.jar:7.0.0.GA-redhat-2]

Environment

  • Java application
  • HTTPS or RSA excryption

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content