diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-10-11 09:48:40 +0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2017-10-10 21:48:40 -0400 |
commit | d3f73e0de5bf407f375c18b94f3f9535439ece3d (patch) | |
tree | eef49930db8851e77eeb6aec75a08ec1a5d99036 /tests/x509/test_x509.py | |
parent | ed32105be8daa27d39e5ef1f26e3f7bc672a7939 (diff) | |
download | cryptography-d3f73e0de5bf407f375c18b94f3f9535439ece3d.tar.gz cryptography-d3f73e0de5bf407f375c18b94f3f9535439ece3d.tar.bz2 cryptography-d3f73e0de5bf407f375c18b94f3f9535439ece3d.zip |
backwards incompatible change to RFC822Name (#3953)
* backwards incompatible change to RFC822Name
During this release cycle we decided to officially deprecate passing
U-labels to our GeneralName constructors. At first we tried changing
this in a purely backwards compatible way but get_values_for_type made
that untenable. This PR modifies RFC822Name to accept two types:
U-label strings (which raises a deprecation warning) and A-label strings
(the new preferred type). There is also a constructor for RFC822Name
that bypasses validation so we can parse garbage out of certificates
(and round trip it if necessary)
* whoops
Diffstat (limited to 'tests/x509/test_x509.py')
-rw-r--r-- | tests/x509/test_x509.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/x509/test_x509.py b/tests/x509/test_x509.py index afe1c0e9..d6aafcda 100644 --- a/tests/x509/test_x509.py +++ b/tests/x509/test_x509.py @@ -2243,7 +2243,14 @@ class TestCertificateBuilder(object): "add_ext", [ x509.SubjectAlternativeName( - [x509.DNSName._init_without_validation(u'a\xedt\xe1s.test')] + [ + # These examples exist to verify compatibility with + # certificates that have utf8 encoded data in the ia5string + x509.DNSName._init_without_validation(u'a\xedt\xe1s.test'), + x509.RFC822Name._init_without_validation( + u'test@a\xedt\xe1s.test' + ), + ] ), x509.CertificatePolicies([ x509.PolicyInformation( |