pkcs7: fix decryption

This commit is contained in:
Shiz 2022-09-28 02:23:16 +02:00
parent 5aea35247b
commit 5138ee58ad
1 changed files with 1 additions and 1 deletions

View File

@ -286,7 +286,7 @@ class PKCS7Recipient:
else:
raise ValueError('recipient type not supported: %s', recip.__class__.__name__)
if not isinstance(cert_key, key_algo):
if not isinstance(cert_key.public_key(), key_algo):
return None
return cert_key.decrypt(key_enc, key_pad)