From 9059727df135dc90311bd476124f090b5766092b Mon Sep 17 00:00:00 2001 From: John Jiang Date: Tue, 19 Mar 2024 02:03:13 +0000 Subject: [PATCH] 8327182: Move serverAlias into the loop Reviewed-by: gli, mullan --- .../share/classes/sun/security/ssl/X509Authentication.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java.base/share/classes/sun/security/ssl/X509Authentication.java b/src/java.base/share/classes/sun/security/ssl/X509Authentication.java index e92c7c575a6..4e91df2806e 100644 --- a/src/java.base/share/classes/sun/security/ssl/X509Authentication.java +++ b/src/java.base/share/classes/sun/security/ssl/X509Authentication.java @@ -278,8 +278,8 @@ enum X509Authentication implements SSLAuthentication { SSLLogger.finest("X509KeyManager class: " + km.getClass().getName()); } - String serverAlias = null; for (String keyType : keyTypes) { + String serverAlias = null; if (shc.conContext.transport instanceof SSLSocketImpl socket) { serverAlias = km.chooseServerAlias(keyType, shc.peerSupportedAuthorities == null ? null :