aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-01 19:40:31 -0800
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-01 19:40:31 -0800
commitfa3d5aacd9d8047467ef4f7aaec45fd69ba4fb59 (patch)
tree48542b8348d193e91344716a4e36b1bd25e451fb /tests
parent92217366e331ab5bcdb7e64dccc14048647bc5c7 (diff)
parent516b1adadd000cb17eb5cf53b81e8c2638903d70 (diff)
downloadcryptography-fa3d5aacd9d8047467ef4f7aaec45fd69ba4fb59.tar.gz
cryptography-fa3d5aacd9d8047467ef4f7aaec45fd69ba4fb59.tar.bz2
cryptography-fa3d5aacd9d8047467ef4f7aaec45fd69ba4fb59.zip
Merge pull request #386 from alex/move-gcm-tag-validation
Move GCM tag size/value validation farther forward
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/primitives/utils.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py
index cdcf84cb..6ecc70ff 100644
--- a/tests/hazmat/primitives/utils.py
+++ b/tests/hazmat/primitives/utils.py
@@ -264,13 +264,10 @@ def aead_tag_exception_test(backend, cipher_factory, mode_factory):
)
with pytest.raises(ValueError):
cipher.decryptor()
- cipher = Cipher(
- cipher_factory(binascii.unhexlify(b"0" * 32)),
- mode_factory(binascii.unhexlify(b"0" * 24), b"000"),
- backend
- )
+
with pytest.raises(ValueError):
- cipher.decryptor()
+ mode_factory(binascii.unhexlify(b"0" * 24), b"000")
+
cipher = Cipher(
cipher_factory(binascii.unhexlify(b"0" * 32)),
mode_factory(binascii.unhexlify(b"0" * 24), b"0" * 16),