diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-03-06 19:24:53 -0430 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-03-06 19:24:53 -0430 |
commit | 29affd2d9b50b892334447799eb0c351664b0250 (patch) | |
tree | c7f3dbb62e3d45742f3380722212ac027f8fa364 /src | |
parent | 641149c2b4cc17edd5934d76e23a47d782b28f55 (diff) | |
download | cryptography-29affd2d9b50b892334447799eb0c351664b0250.tar.gz cryptography-29affd2d9b50b892334447799eb0c351664b0250.tar.bz2 cryptography-29affd2d9b50b892334447799eb0c351664b0250.zip |
test passed because UnicodeEncodeError is a subclass of ValueError
That's obviously not right. Hooray subclasses.
Diffstat (limited to 'src')
-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" ) |