diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-09 06:45:00 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-09 06:45:00 -0800 |
commit | 715e85f3f39a2b8f50ae810ba86d64af30e13c56 (patch) | |
tree | f44dda3b7c2d612dc8dfbcf1a63edb411e466b98 /tests/hazmat | |
parent | 323faa72138f2e9c5249d9a42e7f42d741aec873 (diff) | |
download | cryptography-715e85f3f39a2b8f50ae810ba86d64af30e13c56.tar.gz cryptography-715e85f3f39a2b8f50ae810ba86d64af30e13c56.tar.bz2 cryptography-715e85f3f39a2b8f50ae810ba86d64af30e13c56.zip |
Fixed two bugs in the PKCS7 padding where unpadding would accept bad inputs.
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/primitives/test_padding.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_padding.py b/tests/hazmat/primitives/test_padding.py index 3cefafaf..6a2b6243 100644 --- a/tests/hazmat/primitives/test_padding.py +++ b/tests/hazmat/primitives/test_padding.py @@ -29,6 +29,8 @@ class TestPKCS7(object): (128, b"1111111111111111"), (128, b"111111111111111\x06"), (128, b""), + (128, b"\x06" * 6), + (128, b"\x00" * 16), ]) def test_invalid_padding(self, size, padded): unpadder = padding.PKCS7(size).unpadder() |