pkcs7: fix encryption

This commit is contained in:
Shiz 2022-09-28 02:26:18 +02:00
parent 5138ee58ad
commit d01d0aa0d5
1 changed files with 1 additions and 1 deletions

View File

@ -368,7 +368,7 @@ class PKCS7:
return asn1crypto.cms.KeyTransRecipientInfo({
'version': 'v0',
'rid': to_cms_cert_id(cert),
'key_encryption_algorithm': to_cms_asym_algo(r.public_key(), pad),
'key_encryption_algorithm': to_cms_asym_algo(cert.public_key(), pad),
'encrypted_key': cert.public_key().encrypt(data, pad),
})