javax.net.ssl.SSLHandshakeException

Received fatal alert: bad_certificate

Samebug tips1

Import the server certificate into your truststore.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web987

  • via GitHub by wildfly-ci
    , 1 year ago
    Received fatal alert: bad_certificate
  • Received fatal alert: bad_certificate
  • via Google Groups by Eps, 1 month ago
    Received fatal alert: bad_certificate
  • Stack trace

    • javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1991) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1104) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1343) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355) at SSLSocketFailedClientTest.doClientSide(SSLSocketFailedClientTest.java:185) at SSLSocketFailedClientTest.startClient(SSLSocketFailedClientTest.java:389) at SSLSocketFailedClientTest.<init>(SSLSocketFailedClientTest.java:271) at SSLSocketFailedClientTest.main(SSLSocketFailedClientTest.java:216) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:143) Caused by: javax.net.ssl.SSLHandshakeException: null cert chain at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1917) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:301) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:291) at sun.security.ssl.ServerHandshaker.clientCertificate(ServerHandshaker.java:1797) at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:222) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:925) at sun.security.ssl.Handshaker.process_record(Handshaker.java:860) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1043) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1343) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1371) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355) at SSLSocketFailedClientTest.doServerSide(SSLSocketFailedClientTest.java:139) at SSLSocketFailedClientTest$1.run(SSLSocketFailedClientTest.java:345)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    2 times, 2 months ago
    Unknown user
    Once, 4 months ago
    Once, 5 months ago
    Once, 6 months ago
    Unknown user
    Once, 9 months ago
    132 more bugmates