diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-05-19 07:23:25 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-05-19 07:23:25 -0400 |
commit | 8b8df2337049abfcfc3991be8331e31b6d116d84 (patch) | |
tree | 8aaaf0d1501766252980f24a691d8ce0170d6b6f /tests/test_x509_ext.py | |
parent | 2a21843a729257617579d686df30fb391143d3ca (diff) | |
parent | 71a16210c39c59bcf205da5a447777c55649ecf8 (diff) | |
download | cryptography-8b8df2337049abfcfc3991be8331e31b6d116d84.tar.gz cryptography-8b8df2337049abfcfc3991be8331e31b6d116d84.tar.bz2 cryptography-8b8df2337049abfcfc3991be8331e31b6d116d84.zip |
Merge pull request #1959 from reaperhulk/idna2003-test
IDNA 2003 test
Diffstat (limited to 'tests/test_x509_ext.py')
-rw-r--r-- | tests/test_x509_ext.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index d3488a9f..20a016b6 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -1332,6 +1332,17 @@ class TestRSASubjectAlternativeNameExtension(object): rfc822name = san.get_values_for_type(x509.RFC822Name) assert [u"email@em\xe5\xefl.com"] == rfc822name + def test_idna2003_invalid(self, backend): + cert = _load_cert( + os.path.join( + "x509", "custom", "san_idna2003_dnsname.pem" + ), + x509.load_pem_x509_certificate, + backend + ) + with pytest.raises(UnicodeError): + cert.extensions + def test_unicode_rfc822_name_dns_name_uri(self, backend): cert = _load_cert( os.path.join( |