MCPcopy Create free account
hub / github.com/adobe/Marinus / get_cert_zones

Function get_cert_zones

python3_cron_scripts/get_crt_sh.py:138–158  ·  view source on GitHub ↗

Find the relevant certificate zones

(cert, zones)

Source from the content-addressed store, hash-verified

136
137
138def get_cert_zones(cert, zones):
139 """
140 Find the relevant certificate zones
141 """
142 cert_zones = []
143
144 if "subject_common_names" in cert:
145 for cn in cert["subject_common_names"]:
146 for zone in zones:
147 if cn == zone or cn.endswith("." + zone):
148 if zone not in cert_zones:
149 cert_zones.append(zone)
150
151 if "subject_dns_names" in cert:
152 for cn in cert["subject_dns_names"]:
153 for zone in zones:
154 if cn == zone or cn.endswith("." + zone):
155 if zone not in cert_zones:
156 cert_zones.append(zone)
157
158 return cert_zones
159
160
161def add_new_certificate_values(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected