BCJSSE: Add log messages for failed version negotiation
@@ -424,7 +424,11 @@ public void notifySelectedCipherSuite(int selectedCipherSuite)
public void notifyServerVersion(ProtocolVersion serverVersion) throws IOException
{
String selected = manager.getContext().getProtocolString(serverVersion);
- if (selected != null)
+ if (selected == null)
+ {
+ LOG.fine("Server selected an unsupported protocol version: " + serverVersion);
+ }
+ else
{
for (String protocol : sslParameters.getProtocols())
{
@@ -434,6 +438,8 @@ public void notifyServerVersion(ProtocolVersion serverVersion) throws IOExceptio
return;
}
}
+
+ LOG.fine("Server selected a protocol version not enabled in the client: " + selected);
}
throw new TlsFatalAlert(AlertDescription.protocol_version);
}
