Blocks :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
http://hg.openjdk.java.net/jdk/jdk/file/caf05d64138f/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java#l914: algParams = getPBEAlgorithmParameters(algorithm); ... ObjectIdentifier pbeOID = mapPBEAlgorithmToOID(algorithm); ... cipher.init(Cipher.ENCRYPT_MODE, skey, algParams); algid = new AlgorithmId(pbeOID, cipher.getParameters()); ... EncryptedPrivateKeyInfo encrInfo = new EncryptedPrivateKeyInfo(algid, encryptedKey); Here, pbeOID is pkcs5PBES2, but pkcs5PBES2 is also contained in algParams, and algid is encoded with a dup inside. 0002:000B [0] OID 1.2.840.113549.1.5.13 (pkcs5PBES2) 000D:0069 [1] SEQUENCE 000F:000B [10] OID 1.2.840.113549.1.5.13 (pkcs5PBES2) 001A:005C [11] SEQUENCE 001C:003B [110] SEQUENCE 001E:000B [1100] OID 1.2.840.113549.1.5.12 (pkcs5PBKDF2) 0029:002E [1101] SEQUENCE Also, in PBES2Parameters::parseKDF, keyLength and prf fields are required. They should be optional.
|