summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2020-01-29 20:16:11 +0100
committerMatěj Cepl <mcepl@cepl.eu>2020-01-29 22:21:11 +0100
commitf6bb4413466aa2588bcb7d22b9e6bf97885f16d7 (patch)
tree106d8f5547897f1133829bca2ec46bc96e5fcd6a /tests
parent7b04b43fe15ec95327a872f0ea83325fadf6840f (diff)
downloadm2crypto-f6bb4413466aa2588bcb7d22b9e6bf97885f16d7.tar.gz
NULL is legal argument for key and iv paramters of EVP_CipherInit(3)
Fixes #272
Diffstat (limited to 'tests')
-rw-r--r--tests/test_evp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_evp.py b/tests/test_evp.py
index d133ed0..fff7127 100644
--- a/tests/test_evp.py
+++ b/tests/test_evp.py
@@ -517,6 +517,11 @@ class CipherTestCase(unittest.TestCase):
unhexlify('5cd148eeaf680d4ff933aed83009cad4110162f53ef89fd44fad09611b0524d4'),
unhexlify(''))
+ def test_cipher_init_reinit(self):
+ ctx = m2.cipher_ctx_new()
+ m2.cipher_init(ctx, m2.aes_128_cbc(), b'\x01' * (128//8), b'\x02' * (128//8), 1)
+ m2.cipher_init(ctx, m2.aes_128_cbc(), None, None, 1)
+
class PBKDF2TestCase(unittest.TestCase):
def test_rfc3211_test_vectors(self):