From 2f5169965dc6e76116c2fa023b905efea7a6f6a9 Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Tue, 6 Apr 2021 15:43:08 +0000 Subject: [PATCH] 8264554: X509KeyManagerImpl calls getProtectionParameter with incorrect alias Reviewed-by: mullan --- .../share/classes/sun/security/ssl/X509KeyManagerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java b/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java index c2bd09e00da..269efd31208 100644 --- a/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java +++ b/src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java @@ -269,8 +269,8 @@ final class X509KeyManagerImpl extends X509ExtendedKeyManager String keyStoreAlias = alias.substring(secondDot + 1); Builder builder = builders.get(builderIndex); KeyStore ks = builder.getKeyStore(); - Entry newEntry = ks.getEntry - (keyStoreAlias, builder.getProtectionParameter(alias)); + Entry newEntry = ks.getEntry(keyStoreAlias, + builder.getProtectionParameter(keyStoreAlias)); if (!(newEntry instanceof PrivateKeyEntry)) { // unexpected type of entry return null;