8327182: Move serverAlias into the loop

Reviewed-by: gli, mullan
This commit is contained in:
John Jiang 2024-03-19 02:03:13 +00:00
parent 2dd5fba3bd
commit 9059727df1

View File

@ -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 :