changeset 12943:271003ea3228

8130864: Better server identity handling Reviewed-by: jnimeh, asmotrak, ahgross
author xuelei
date Mon, 13 Jul 2015 13:37:22 +0000
parents 76abc44582c5
children 1fc869ad86a0
files src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java	Thu Jul 09 13:23:03 2015 +0100
+++ b/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");