changeset 54858:c34acb3a3330

8218580: endpoint identification algorithm should be case-insensitive Reviewed-by: jnimeh
author xuelei
date Fri, 08 Feb 2019 10:03:07 -0800
parents 67537bbafd7f
children 2b64ebacce93
files src/java.base/share/classes/sun/security/ssl/ClientHello.java src/java.base/share/classes/sun/security/ssl/PreSharedKeyExtension.java
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/security/ssl/ClientHello.java	Fri Feb 08 09:41:45 2019 -0800
+++ b/src/java.base/share/classes/sun/security/ssl/ClientHello.java	Fri Feb 08 10:03:07 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -519,7 +519,7 @@
             if (session != null && identityAlg != null) {
                 String sessionIdentityAlg =
                     session.getIdentificationProtocol();
-                if (!Objects.equals(identityAlg, sessionIdentityAlg)) {
+                if (!identityAlg.equalsIgnoreCase(sessionIdentityAlg)) {
                     if (SSLLogger.isOn &&
                     SSLLogger.isOn("ssl,handshake,verbose")) {
                         SSLLogger.finest("Can't resume, endpoint id" +
@@ -1036,7 +1036,7 @@
                 if (resumingSession && identityAlg != null) {
                     String sessionIdentityAlg =
                         previous.getIdentificationProtocol();
-                    if (!Objects.equals(identityAlg, sessionIdentityAlg)) {
+                    if (!identityAlg.equalsIgnoreCase(sessionIdentityAlg)) {
                         if (SSLLogger.isOn &&
                         SSLLogger.isOn("ssl,handshake,verbose")) {
                             SSLLogger.finest("Can't resume, endpoint id" +
--- a/src/java.base/share/classes/sun/security/ssl/PreSharedKeyExtension.java	Fri Feb 08 09:41:45 2019 -0800
+++ b/src/java.base/share/classes/sun/security/ssl/PreSharedKeyExtension.java	Fri Feb 08 10:03:07 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -458,7 +458,7 @@
         String identityAlg = shc.sslConfig.identificationProtocol;
         if (result && identityAlg != null) {
             String sessionIdentityAlg = s.getIdentificationProtocol();
-            if (!Objects.equals(identityAlg, sessionIdentityAlg)) {
+            if (!identityAlg.equalsIgnoreCase(sessionIdentityAlg)) {
                 if (SSLLogger.isOn &&
                     SSLLogger.isOn("ssl,handshake,verbose")) {