@ -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)