From 12a1cacb6ae6de51a003dcc884e769854a1345a8 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 17 Jul 2018 22:56:12 +0800 Subject: raise ValueError on zero length GCM IV (#4348) --- tests/hazmat/primitives/test_block.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/hazmat') diff --git a/tests/hazmat/primitives/test_block.py b/tests/hazmat/primitives/test_block.py index c053feaf..37158f15 100644 --- a/tests/hazmat/primitives/test_block.py +++ b/tests/hazmat/primitives/test_block.py @@ -191,6 +191,10 @@ class TestModeValidation(object): backend, ) + def test_gcm(self): + with pytest.raises(ValueError): + modes.GCM(b"") + class TestModesRequireBytes(object): def test_cbc(self): -- cgit v1.2.3