Skip to content

Commit

Permalink
Merge pull request #31 from Venafi/master-ven54877-fix-parsing-on-renew
Browse files Browse the repository at this point in the history
renew parsing IPs fix
  • Loading branch information
arykalin authored Jan 14, 2020
2 parents c5d085a + d552e4a commit 8513c13
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vcert/connection_tpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ def renew_cert(self, request, reuse_key=False):
request.organizational_unit = a.value
for e in cert.extensions:
if e.oid == x509.OID_SUBJECT_ALTERNATIVE_NAME:
request.san_dns = list([x.value for x in e.value])
request.san_dns = list([x.value for x in e.value if isinstance(x, x509.DNSName)])
request.email_addresses = list([x.value for x in e.value if isinstance(x, x509.RFC822Name)])
request.ip_addresses = list([x.value.exploded for x in e.value if isinstance(x, x509.IPAddress)])
if cert.signature_algorithm_oid in (algos.ECDSA_WITH_SHA1, algos.ECDSA_WITH_SHA224, algos.ECDSA_WITH_SHA256,
algos.ECDSA_WITH_SHA384, algos.ECDSA_WITH_SHA512):
request.key_type = (KeyType.ECDSA, KeyType.ALLOWED_CURVES[0])
Expand Down

0 comments on commit 8513c13

Please sign in to comment.