diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-07-05 11:21:05 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-07-05 11:21:05 -0400 |
commit | ba2abb102152a4b57f7661481c8bc53d473cbf09 (patch) | |
tree | 23f87f64223036611c23529ba24d0aae5fc11de3 /src | |
parent | d5f718c19c09f529ff34b319a1e2e0e7f1862a9a (diff) | |
download | cryptography-ba2abb102152a4b57f7661481c8bc53d473cbf09.tar.gz cryptography-ba2abb102152a4b57f7661481c8bc53d473cbf09.tar.bz2 cryptography-ba2abb102152a4b57f7661481c8bc53d473cbf09.zip |
idna here
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/backend.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index 753cb50d..52b5abcf 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -8,6 +8,8 @@ import collections import itertools from contextlib import contextmanager +import idna + import six from cryptography import utils, x509 @@ -151,8 +153,7 @@ def _encode_subject_alt_name(backend, san): gn.type = backend._lib.GEN_DNS ia5 = backend._lib.ASN1_IA5STRING_new() assert ia5 != backend._ffi.NULL - # TODO: idna - value = alt_name.value.encode("ascii") + value = idna.encode(alt_name.value) res = backend._lib.ASN1_STRING_set(ia5, value, len(value)) assert res == 1 gn.d.dNSName = ia5 |