You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OriginatorIdentifierOrKey originator = new OriginatorIdentifierOrKey(originatorPublicKey);
37
39
38
-
AlgorithmIdentifier keyEncAlg;
39
-
if (CMSUtils.isDES(keyEncryptionOID.getId()) || keyEncryptionOID.equals(PKCSObjectIdentifiers.id_alg_CMSRC2wrap))
40
+
ASN1Encodable keyEncAlgParams = null;
41
+
if (CMSUtils.isDES(keyEncryptionOID) || PKCSObjectIdentifiers.id_alg_CMSRC2wrap.equals(keyEncryptionOID))
40
42
{
41
-
keyEncAlg = new AlgorithmIdentifier(keyEncryptionOID, DERNull.INSTANCE);
43
+
keyEncAlgParams = DERNull.INSTANCE;
42
44
}
43
45
else if (CMSUtils.isGOST(keyAgreementOID))
44
46
{
45
-
keyEncAlg = new AlgorithmIdentifier(keyEncryptionOID, new Gost2814789KeyWrapParameters(CryptoProObjectIdentifiers.id_Gost28147_89_CryptoPro_A_ParamSet));
46
-
}
47
-
else
48
-
{
49
-
keyEncAlg = new AlgorithmIdentifier(keyEncryptionOID);
47
+
keyEncAlgParams = new Gost2814789KeyWrapParameters(CryptoProObjectIdentifiers.id_Gost28147_89_CryptoPro_A_ParamSet);
50
48
}
51
49
52
-
AlgorithmIdentifier keyAgreeAlg = new AlgorithmIdentifier(keyAgreementOID, keyEncAlg);
50
+
AlgorithmIdentifier keyEncAlgorithm = new AlgorithmIdentifier(keyEncryptionOID, keyEncAlgParams);
51
+
AlgorithmIdentifier keyAgreeAlgorithm = new AlgorithmIdentifier(keyAgreementOID, keyEncAlgorithm);
0 commit comments