From 312ed095d81f85e6689be5d11072440117fd8d72 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 19 Jun 2017 01:00:42 -1000 Subject: disallow empty string for NameAttribute (#3711) --- tests/test_x509.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/test_x509.py b/tests/test_x509.py index 84108810..7a99ff3d 100644 --- a/tests/test_x509.py +++ b/tests/test_x509.py @@ -3624,6 +3624,10 @@ class TestNameAttribute(object): u'\U0001F37A\U0001F37A' ) + def test_init_empty_value(self): + with pytest.raises(ValueError): + x509.NameAttribute(NameOID.ORGANIZATION_NAME, u'') + def test_eq(self): assert x509.NameAttribute( x509.ObjectIdentifier('2.999.1'), u'value' -- cgit v1.2.3