summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Jiang <johnsjiang@tencent.com>2024-03-04 11:43:12 +0800
committerJohn Jiang <johnsjiang@tencent.com>2024-03-04 11:43:12 +0800
commit8e889cba279707b1b5415e82b0fa3d6058edee1f (patch)
tree90b61941c06435a9bc39ead89cf669529259f841
parent31ac8714e0593f2feaa8e9ebaf32bab904ba6d11 (diff)
8327182: Move serverAlias into the looppr/18100
-rw-r--r--src/java.base/share/classes/sun/security/ssl/X509Authentication.java4
1 files changed, 2 insertions, 2 deletions
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 6c29db30c60..fab398838af 100644
--- a/src/java.base/share/classes/sun/security/ssl/X509Authentication.java
+++ b/src/java.base/share/classes/sun/security/ssl/X509Authentication.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2024, 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
@@ -270,8 +270,8 @@ enum X509Authentication implements SSLAuthentication {
private static SSLPossession createServerPossession(
ServerHandshakeContext shc, String[] keyTypes) {
X509ExtendedKeyManager km = shc.sslContext.getX509KeyManager();
- 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 :