changeset 13811:1832c29655eb

8218580: endpoint identification algorithm should be case-insensitive Reviewed-by: jnimeh Contributed-by: verghese@amazon.com
author xuelei
date Fri, 08 Feb 2019 10:03:07 -0800
parents c42570d017a6
children 814fc47280c9
files src/share/classes/sun/security/ssl/ClientHandshaker.java src/share/classes/sun/security/ssl/ServerHandshaker.java
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/ssl/ClientHandshaker.java	Tue Dec 17 20:04:40 2019 +0000
+++ b/src/share/classes/sun/security/ssl/ClientHandshaker.java	Fri Feb 08 10:03:07 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1399,7 +1399,7 @@
 
                 String sessionIdentityAlg =
                     session.getEndpointIdentificationAlgorithm();
-                if (!Objects.equals(identityAlg, sessionIdentityAlg)) {
+                if (!identityAlg.equalsIgnoreCase(sessionIdentityAlg)) {
 
                     if (debug != null && Debug.isOn("session")) {
                         System.out.println("%% can't resume, endpoint id" +
--- a/src/share/classes/sun/security/ssl/ServerHandshaker.java	Tue Dec 17 20:04:40 2019 +0000
+++ b/src/share/classes/sun/security/ssl/ServerHandshaker.java	Fri Feb 08 10:03:07 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -705,7 +705,7 @@
 
                     String sessionIdentityAlg =
                     previous.getEndpointIdentificationAlgorithm();
-                    if (!Objects.equals(identityAlg, sessionIdentityAlg)) {
+                    if (!identityAlg.equalsIgnoreCase(sessionIdentityAlg)) {
 
                         if (debug != null && Debug.isOn("session")) {
                             System.out.println("%% can't resume, endpoint id"