1
0
mirror of https://github.com/moepman/acertmgr.git synced 2024-12-29 09:21:51 +01:00

certs already contain idna domain names

The idna_convert call here does nothing: when reading a certificate, it
already contains idna domain names. Converting them to idna is
equivalent to the identity function, and can thus be removed.
This commit is contained in:
David Klaftenegger 2021-05-30 15:47:15 +02:00
parent 93e28437ff
commit e2f7b09b18
2 changed files with 3 additions and 4 deletions

View File

@ -12,7 +12,7 @@ Requirements
------------
* Python (2.7+ and 3.5+ should work)
* cryptography>=0.6 (usually includes the optional idna module)
* cryptography>=2.1 (older versions break idna handling)
Optional requirements (to use specified features)
------------------------------------------------------

View File

@ -243,8 +243,7 @@ def get_cert_domains(cert):
if san_cert:
for d in san_cert.value:
domains.add(d.value)
# Convert IDNA domain to correct representation and return the list
return [x for x, _ in idna_convert(domains)]
return domains
# @brief determine certificate cn