Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Certificate Transparency search

Project description

Certificate Search

Build Status

An unofficial wrapper to query


The package can be installed from PyPI

pip install certificate-search


import json

from cryptography.x509.oid import NameOID, ExtensionOID
from cryptography.x509.general_name import DNSName

from import CertificateSearch, SUPPORTED_SITES

# Print the list of all supported sites

engines = CertificateSearch()

domains = [

for domain in domains:
    for cert in
        not_before = cert.not_before
        not_after = cert.not_after

        pem = cert.pem
        # An x509 certificate
        common_name = pem.subject.get_attributes_for_oid(NameOID.COMMON_NAME)[0].value
        country_name = pem.subject.get_attributes_for_oid(NameOID.COUNTRY_NAME)[0].value
        organization_name = pem.subject.get_attributes_for_oid(NameOID.ORGANIZATION_NAME)[0].value

        # All SAN records
        san = pem.extensions.get_extension_for_oid(ExtensionOID.SUBJECT_ALTERNATIVE_NAME)
        san_names = san.value.get_values_for_type(DNSName)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for certificate-search, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size certificate_search-0.3-py2.py3-none-any.whl (4.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size certificate-search-0.3.tar.gz (4.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page