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

Function check_zone_relevancy

python3_cron_scripts/get_original_ct_logs.py:314–334  ·  view source on GitHub ↗

Find the related zones within the certificate

(cert, zones)

Source from the content-addressed store, hash-verified

312
313
314def check_zone_relevancy(cert, zones):
315 """
316 Find the related zones within the certificate
317 """
318 cert_zones = []
319
320 if "subject_common_names" in cert:
321 for cn in cert["subject_common_names"]:
322 for zone in zones:
323 if cn == zone or cn.endswith("." + zone):
324 if zone not in cert_zones:
325 cert_zones.append(zone)
326
327 if "subject_dns_names" in cert:
328 for cn in cert["subject_dns_names"]:
329 for zone in zones:
330 if cn == zone or cn.endswith("." + zone):
331 if zone not in cert_zones:
332 cert_zones.append(zone)
333
334 return cert_zones
335
336
337def insert_certificate(cert, source, ct_collection, cert_zones):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected