Java will abort SSL connections to a server, when the server gives a "unrecognized name" alert in the ssl handshake
Issue
-
Java will abort SSL connections to a server, when the server gives a "unrecognized name" alert in the ssl handshake. This alert always results in a java exception:
Exception in thread "main" javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name -
Java ignores the fact that the Alert can have different severity levels. RFC 5246 (section-7.2) describes two severity levels: warning(1), fatal(2). RFC5246 also states:
"Alert messages with a level of fatal result in the immediate termination of the connection." ... "If an alert with a level of warning is sent and received, generally the connection can continue normally."
Environment
- Java
- 7
- 8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
