src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java
changeset 51142 69dc9ea17b33
parent 51063 038688fa32d0
child 52996 2457d862a646
--- a/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java	Thu Jul 19 00:14:29 2018 +0800
+++ b/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java	Thu Jul 19 00:14:40 2018 +0800
@@ -2098,7 +2098,8 @@
                     RetryWithZero.run(pass -> {
                         // Use JCE
                         SecretKey skey = getPBEKey(pass);
-                        Cipher cipher = Cipher.getInstance(algOid.toString());
+                        Cipher cipher = Cipher.getInstance(
+                                mapPBEParamsToAlgorithm(algOid, algParams));
                         cipher.init(Cipher.DECRYPT_MODE, skey, algParams);
                         loadSafeContents(new DerInputStream(cipher.doFinal(rawData)));
                         return null;