javax.net.ssl.SSLProtocolException 해결책
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name
|
- -Djsse.enableSNIExtension=false 옵션추가
- System.setProperty(“jsse.enableSNIExtension”, “false”);
I had what I believe the same issue is. I found that I needed to adjust the Apache configuration to include a ServerName or ServerAlias for the host. This code failed:
And this code worked:
Wireshark revealed that during the TSL/SSL Hello the warning Alert (Level: Warning, Description: Unrecognized Name), Server Hello Was being sent from the server to the client. It was only a warning, however, Java 7.1 then responded immediately back with a "Fatal, Description: Unexpected Message", which I assume means the Java SSL libraries don't like to see the warning of unrecognized name. From the Wiki on Transport Layer Security (TLS): 112 Unrecognized name warning TLS only; client's Server Name Indicator specified a hostname not supported by the server This led me to look at my Apache config files and I found that if I added a ServerName or ServerAlias for the name sent from the client/java side, it worked correctly without any errors. <VirtualHost mydomain.com:443> |