diff options
-rw-r--r-- | src/cryptography/x509/name.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptography/x509/name.py b/src/cryptography/x509/name.py index c7f6f99d..d62341d7 100644 --- a/src/cryptography/x509/name.py +++ b/src/cryptography/x509/name.py @@ -22,7 +22,7 @@ class NameAttribute(object): "value argument must be a text type." ) - if oid == NameOID.COUNTRY_NAME and len(value.encode("ascii")) != 2: + if oid == NameOID.COUNTRY_NAME and len(value.encode("utf8")) != 2: raise ValueError( "Country name must be a 2 character country code" ) |