diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/x509/name.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cryptography/x509/name.py b/src/cryptography/x509/name.py index 277128fa..108b60cc 100644 --- a/src/cryptography/x509/name.py +++ b/src/cryptography/x509/name.py @@ -27,6 +27,9 @@ class NameAttribute(object): "Country name must be a 2 character country code" ) + if len(value) == 0: + raise ValueError("Value cannot be an empty string") + self._oid = oid self._value = value |