SSL handshake alert: unrecognized_name error since upgrade to Java 1.7.0

前端 未结 17 3223
栀梦
栀梦 2020-11-22 06:35

I upgraded from Java 1.6 to Java 1.7 today. Since then an error occur when I try to establish a connection to my webserver over SSL:

javax.net.ssl.SSLProtoco         


        
17条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 07:00

    We also ran into this error on a new Apache server build.

    The fix in our case was to define a ServerAlias in the httpd.conf that corresponded to the host name that Java was trying to connect to. Our ServerName was set to the internal host name. Our SSL cert was using the external host name, but that was not sufficient to avoid the warning.

    To help debug, you can use this ssl command:

    openssl s_client -servername -connect :443 -state

    If there is a problem with that hostname, then it will print this message near the top of the output:

    SSL3 alert read: warning:unrecognized name

    I should also note that we did not get that error when using that command to connect to the internal host name, even though it did not match the SSL cert.

提交回复
热议问题