MCPcopy Create free account
hub / github.com/apache/httpd / get_san_list

Method get_san_list

test/modules/md/md_cert_util.py:137–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

135 return self.cert.get_pubkey().bits()
136
137 def get_san_list(self):
138 text = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_TEXT, self.cert).decode("utf-8")
139 m = re.search(r"X509v3 Subject Alternative Name:(\s+critical)?\s*(.*)", text)
140 sans_list = []
141 if m:
142 sans_list = m.group(2).split(",")
143
144 def _strip_prefix(s):
145 return s.split(":")[1] if s.strip().startswith("DNS:") else s.strip()
146 return list(map(_strip_prefix, sans_list))
147
148 def get_must_staple(self):
149 text = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_TEXT, self.cert).decode("utf-8")

Callers 15

check_md_credentialsMethod · 0.95
test_md_702_001Method · 0.80
test_md_702_002Method · 0.80
test_md_702_003Method · 0.80
test_md_702_004Method · 0.80
test_md_702_005Method · 0.80
test_md_702_006Method · 0.80
test_md_702_030Method · 0.80
test_md_702_031Method · 0.80
test_md_702_032Method · 0.80
test_md_702_040Method · 0.80
test_md_702_044Method · 0.80

Calls

no outgoing calls

Tested by 15

test_md_702_001Method · 0.64
test_md_702_002Method · 0.64
test_md_702_003Method · 0.64
test_md_702_004Method · 0.64
test_md_702_005Method · 0.64
test_md_702_006Method · 0.64
test_md_702_030Method · 0.64
test_md_702_031Method · 0.64
test_md_702_032Method · 0.64
test_md_702_040Method · 0.64
test_md_702_044Method · 0.64
test_md_702_060Method · 0.64