mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8202837: PBES2 AlgorithmId encoding error in PKCS12 KeyStore
Reviewed-by: xuelei
This commit is contained in:
parent
a825fe0a2d
commit
bde972d645
3 changed files with 170 additions and 49 deletions
|
@ -2098,7 +2098,8 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue