mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 13:59:02 -04:00
sans_text_dump_comment += 1
This commit is contained in:
parent
946f4474da
commit
639cbeb7d0
1 changed files with 6 additions and 1 deletions
|
|
@ -160,6 +160,12 @@ def _pyopenssl_cert_or_req_san(cert_or_req):
|
|||
:rtype: `list` of `unicode`
|
||||
|
||||
"""
|
||||
# This function finds SANs by dumping the certificate/CSR to text and
|
||||
# searching for "X509v3 Subject Alternative Name" in the text. This method
|
||||
# is used to support PyOpenSSL version 0.13 where the
|
||||
# `_subjectAltNameString` and `get_extensions` methods are not available
|
||||
# for CSRs.
|
||||
|
||||
# constants based on PyOpenSSL certificate/CSR text dump
|
||||
part_separator = ":"
|
||||
parts_separator = ", "
|
||||
|
|
@ -169,7 +175,6 @@ def _pyopenssl_cert_or_req_san(cert_or_req):
|
|||
func = OpenSSL.crypto.dump_certificate
|
||||
else:
|
||||
func = OpenSSL.crypto.dump_certificate_request
|
||||
# This method of finding SANs is used to support PyOpenSSL version 0.13.
|
||||
text = func(OpenSSL.crypto.FILETYPE_TEXT, cert_or_req).decode("utf-8")
|
||||
# WARNING: this function does not support multiple SANs extensions.
|
||||
# Multiple X509v3 extensions of the same type is disallowed by RFC 5280.
|
||||
|
|
|
|||
Loading…
Reference in a new issue