Skip to content

Commit

Permalink
updated tests accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
nitneuqr committed Nov 19, 2024
1 parent f5cb0d5 commit aa1cf3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/hazmat/primitives/test_pkcs7.py
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ def test_smime_decrypt_no_recipient_match(
)

# Test decryption with another RSA chain
with pytest.raises(x509.AttributeNotFound):
with pytest.raises(ValueError):
pkcs7.pkcs7_decrypt_der(
enveloped, another_cert, another_private_key, []
)
Expand All @@ -1219,7 +1219,7 @@ def test_smime_decrypt_not_enveloped(
signed = builder.sign(serialization.Encoding.DER, options)

# Test decryption failure with signed email
with pytest.raises(exceptions.UnsupportedAlgorithm):
with pytest.raises(ValueError):
pkcs7.pkcs7_decrypt_der(signed, certificate, private_key, [])

def test_smime_decrypt_smime_not_encrypted(
Expand Down

0 comments on commit aa1cf3d

Please sign in to comment.