From 6a279c04dd8cc613ebff8ebefee326585d7f5be6 Mon Sep 17 00:00:00 2001 From: xuelei Date: Fri, 8 Feb 2019 10:03:07 -0800 Subject: [PATCH] 8218580: endpoint identification algorithm should be case-insensitive Reviewed-by: jnimeh Contributed-by: verghese@amazon.com --- src/share/classes/sun/security/ssl/ClientHandshaker.java | 4 ++-- src/share/classes/sun/security/ssl/ServerHandshaker.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/share/classes/sun/security/ssl/ClientHandshaker.java b/src/share/classes/sun/security/ssl/ClientHandshaker.java index 187ae314f..f622645d4 100644 --- a/src/share/classes/sun/security/ssl/ClientHandshaker.java +++ b/src/share/classes/sun/security/ssl/ClientHandshaker.java @@ -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 @@ final class ClientHandshaker extends Handshaker { 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" + diff --git a/src/share/classes/sun/security/ssl/ServerHandshaker.java b/src/share/classes/sun/security/ssl/ServerHandshaker.java index bc2431e93..daa66cfff 100644 --- a/src/share/classes/sun/security/ssl/ServerHandshaker.java +++ b/src/share/classes/sun/security/ssl/ServerHandshaker.java @@ -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 @@ final class ServerHandshaker extends Handshaker { 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" -- GitLab