diff --git a/mitmproxy/certs.py b/mitmproxy/certs.py index 0e441efed..c5f930e1f 100644 --- a/mitmproxy/certs.py +++ b/mitmproxy/certs.py @@ -480,10 +480,8 @@ class SSLCert(serializable.Serializable): except PyAsn1Error: continue for i in dec[0]: - if i[0] is None and isinstance(i[1], univ.OctetString) and not isinstance(i[1], char.IA5String): - # This would give back the IP address: b'.'.join([str(e).encode() for e in i[1].asNumbers()]) - continue - else: + if i[0].hasValue(): e = i[0].asOctets() - altnames.append(e) + altnames.append(e) + return altnames diff --git a/setup.py b/setup.py index 433635e4d..02dab61fd 100644 --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ setup( "kaitaistruct>=0.7, <0.8", "ldap3>=2.2.0, <2.3", "passlib>=1.6.5, <1.8", - "pyasn1>=0.1.9, <0.3", + "pyasn1>=0.3.1, <0.4", "pyOpenSSL>=17.2,<17.3", "pyparsing>=2.1.3, <2.3", "pyperclip>=1.5.22, <1.6",