diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-12-21 17:29:02 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-12-21 17:29:02 -0800 |
commit | 8eda240d0e055e16c26021de2624eb7fab1ccb47 (patch) | |
tree | 9cf1f4c95e35b3e4191cb85667c1d83af6909098 /tests/hazmat/primitives | |
parent | 9b7624e3cd4d19cae38bc8f05eea7b6164445453 (diff) | |
parent | 048d6cb43a0757f3b4cca385e788d30173ebcb17 (diff) | |
download | cryptography-8eda240d0e055e16c26021de2624eb7fab1ccb47.tar.gz cryptography-8eda240d0e055e16c26021de2624eb7fab1ccb47.tar.bz2 cryptography-8eda240d0e055e16c26021de2624eb7fab1ccb47.zip |
Merge pull request #327 from reaperhulk/gcm-lower-limit-tag
Restrict GCM tag length to 4+ bytes
Diffstat (limited to 'tests/hazmat/primitives')
-rw-r--r-- | tests/hazmat/primitives/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py index 227a4055..b00d3184 100644 --- a/tests/hazmat/primitives/utils.py +++ b/tests/hazmat/primitives/utils.py @@ -363,6 +363,13 @@ def aead_tag_exception_test(backend, cipher_factory, mode_factory, 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() + cipher = Cipher( + cipher_factory(binascii.unhexlify(b"0" * 32)), mode_factory(binascii.unhexlify(b"0" * 24), b"0" * 16), backend ) |