diff options
author | wbond <will@wbond.net> | 2019-10-01 00:53:21 -0400 |
---|---|---|
committer | wbond <will@wbond.net> | 2019-10-01 00:53:21 -0400 |
commit | 4a0b9718208e1e4619ee90e2f99237bb007ac480 (patch) | |
tree | 6b4300e5768579ea25cdcb6ca1020c97352ef764 /asn1crypto/x509.py | |
parent | 011ab06123a33e914262617d6a784c1d95d53f0f (diff) | |
download | asn1crypto-4a0b9718208e1e4619ee90e2f99237bb007ac480.tar.gz |
Allow X.509 certificates with improperly encoded DNSName and EmailAddress
Diffstat (limited to 'asn1crypto/x509.py')
-rw-r--r-- | asn1crypto/x509.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/asn1crypto/x509.py b/asn1crypto/x509.py index 9e4550e..8341bb2 100644 --- a/asn1crypto/x509.py +++ b/asn1crypto/x509.py @@ -71,7 +71,7 @@ from .util import int_to_bytes, int_from_bytes, inet_ntop, inet_pton class DNSName(IA5String): _encoding = 'idna' - _bad_tag = 19 + _bad_tag = (12, 19) def __ne__(self, other): return not self == other @@ -185,8 +185,8 @@ class EmailAddress(IA5String): # If the value has gone through the .set() method, thus normalizing it _normalized = False - # In the wild we've seen this encoded as a PrintableString - _bad_tag = 19 + # In the wild we've seen this encoded as a UTF8String and PrintableString + _bad_tag = (12, 19) @property def contents(self): |