aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-07-01 20:23:11 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-07-01 20:23:11 -0500
commit326502a8535e72fe76fdf61762cdf66198370799 (patch)
tree6d0b31246c3658ee47ab9b6511a587b028f1446b /tests/hazmat/primitives
parentd5119d530b4bd15cae9e758972e0407a5bcdd244 (diff)
downloadcryptography-326502a8535e72fe76fdf61762cdf66198370799.tar.gz
cryptography-326502a8535e72fe76fdf61762cdf66198370799.tar.bz2
cryptography-326502a8535e72fe76fdf61762cdf66198370799.zip
do the same simplification to the aad test
Diffstat (limited to 'tests/hazmat/primitives')
-rw-r--r--tests/hazmat/primitives/test_aes.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/hazmat/primitives/test_aes.py b/tests/hazmat/primitives/test_aes.py
index f079ae4f..2c3e5f90 100644
--- a/tests/hazmat/primitives/test_aes.py
+++ b/tests/hazmat/primitives/test_aes.py
@@ -274,9 +274,7 @@ class TestAESModeGCM(object):
modes.GCM(b"\x01" * 16),
backend=backend
).encryptor()
- # 16 bytes less than the AAD limit
- near_limit_bytes = (2 ** 64 - 128) // 8
- encryptor._aad_bytes_processed = near_limit_bytes
+ encryptor._aad_bytes_processed = modes.GCM._MAX_AAD_BYTES - 16
encryptor.authenticate_additional_data(b"0" * 16)
assert encryptor._aad_bytes_processed == modes.GCM._MAX_AAD_BYTES
with pytest.raises(ValueError):