Skip to content

Instantly share code, notes, and snippets.

@hablutzel1
Created February 19, 2026 01:22
Show Gist options
  • Select an option

  • Save hablutzel1/3902814300027f9ceedc072344f98ea4 to your computer and use it in GitHub Desktop.

Select an option

Save hablutzel1/3902814300027f9ceedc072344f98ea4 to your computer and use it in GitHub Desktop.
Search Cross Certificates in CCADB
import csv
import os
import re
from cryptography import x509
from cryptography.x509.oid import ExtensionOID
# Download from https://www.ccadb.org/resources
# TODO support to download and cache the CSV
CSV_PATH = "AllCertificateRecordsReport.csv"
with open(CSV_PATH, newline="", encoding="utf-8") as f:
reader = csv.DictReader(f)
rows = list(reader)
# Get all root certificates
root_names = {
row["Certificate Name"]
for row in rows
if row["Certificate Record Type"] == "Root Certificate"
}
# And search intermediate certificates with names that match any of the root certificate names
matches = [
row for row in rows
if (
row["Certificate Record Type"] == "Intermediate Certificate"
and row["Certificate Name"] in root_names
)
]
# Reorder by notBefore (most recent first)
matches.sort(key=lambda r: r["Valid From (GMT)"], reverse=True)
for row in matches:
print(row["Certificate Name"] + " (notBefore: " + row["Valid From (GMT)"] + ") - " + "https://crt.sh/?q=" + row["SHA-256 Fingerprint"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment