# HG changeset patch # User xuelei # Date 1436794642 0 # Node ID 14dcba137e73eb2e8d0029a06eae9139135f275d # Parent 4d2290a6ce1f7a9535ea9a2a7b5d2c1ad184d551 8130864: Better server identity handling Reviewed-by: jnimeh, asmotrak, ahgross diff -r 4d2290a6ce1f -r 14dcba137e73 jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java --- a/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java Thu Jul 09 13:23:03 2015 +0100 +++ b/jdk/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java Mon Jul 13 13:37:22 2015 +0000 @@ -672,6 +672,9 @@ } } else { // we wanted to resume, but the server refused + // + // Invalidate the session in case of reusing next time. + session.invalidate(); session = null; if (!enableNewSession) { throw new SSLException("New session creation is disabled");