Received fatal alert: handshake_failure through SSLHandshakeException

前端 未结 19 2549
暖寄归人
暖寄归人 2020-11-22 01:33

I have a problem with authorized SSL connection. I have created Struts Action that connects to external server with Client Authorized SSL certificate. In my Action I am tryi

19条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-22 02:10

    I found an HTTPS server which failed in this way if my Java client process was configured with

    -Djsse.enableSNIExtension=false
    

    The connection failed with handshake_failure after the ServerHello had finished successfully but before the data stream started.

    There was no clear error message that identified the problem, the error just looked like

    main, READ: TLSv1.2 Alert, length = 2
    main, RECV TLSv1.2 ALERT:  fatal, handshake_failure
    %% Invalidated:  [Session-3, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384]
    main, called closeSocket()
    main, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    

    I isolated the issue by trying with and without the "-Djsse.enableSNIExtension=false" option

提交回复
热议问题