Skip to main content

⚠️ Library deprecated, please migrate to pki-tools ⚠️

Python Badge

crl-checker

This small python library checks if a specific certificate is revoked using the CRL defined in the x509 CRL distribution points extension (https://datatracker.ietf.org/doc/html/rfc5280.html#section-4.2.1.13)

Installation

pip install crl-checker

Usage

Checking revocation using PEM encoded certificate

from crl_checker import check_revoked, Revoked, Error

cert_pem = """
-----BEGIN CERTIFICATE-----
<CERTIFICATE_PEM_BYTES>
-----END CERTIFICATE-----
"""
crl_issuer_pem = """
-----BEGIN CERTIFICATE-----
<CERTIFICATE_PEM_BYTES>
-----END CERTIFICATE-----
"""

try:
    check_revoked(cert_pem, crl_issuer_pem)
except Revoked as e:
    print(f"Certificate revoked: {e}")
except Error as e:
    print(f"Revocation check failed. Error: {e}")
    raise

Checking revocation using an already loaded cryptography x509.Certificate:

from cryptography import x509
from crl_checker import check_revoked_crypto_cert, Revoked, Error

cert : x509.Certificate = ...
chain: x509.Certificate = ...

try:
    check_revoked_crypto_cert(cert, chain)
except Revoked as e:
    print(f"Certificate revoked: {e}")
except Error as e:
    print(f"Revocation check failed. Error: {e}")
    raise

Metadata

Release files for crl-checker 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crl-checker 2.0.0
File Size Uploaded
crl_checker-2.0.0.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crl-checker 2.0.0
File Interpreter ABI Platform
crl_checker-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / crl_checker-2.0.0.tar.gz

Download URL crl_checker-2.0.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8547d87deeb090e049f5f80c83aa9716ffe0bf1f18fbeb1fbcf6335be6db700e
BLAKE2b-256 checksum
How to use checksums
3b04482e22929d78818bb9f8c9e2e968be4a97650d17a339edb46bc83d30ed22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.1 CPython/3.10.12 Linux/6.5.0-1015-azure

Release files / crl_checker-2.0.0-py3-none-any.whl

Download URL crl_checker-2.0.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac591ee28ab1c5b1d0f8b7a09b31ae7196bfb8e98f00c6d562eb47d838a91c2f
BLAKE2b-256 checksum
How to use checksums
b39dc30ed4ff7ecc57e527e8f8291eae351f3a34e1cd5c4e9c4f6ee9fc0f6a3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.1 CPython/3.10.12 Linux/6.5.0-1015-azure

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page