PKI tools for e.g. checking certificate CRL/OCSP revocation
Project description
PKI tools exposes a high level cryptography
API for e.g.:
- checking revocation of certificates:
- using CRL defined in the x509 CRL distribution points extension (https://datatracker.ietf.org/doc/html/rfc5280.html#section-4.2.1.13)
- using OCSP defined in the x509 Authority Information Access extension (https://datatracker.ietf.org/doc/html/rfc5280.html#section-4.2.2.1)
- loading certificates from PEM format
- saving certificates to files
- reading certificates from files
Docs
Documentation is available at: https://pki-tools.fulder.dev
Quickstart
Install
pip install pki-tools
Usage
Checking OCSP and CRL revocation
from pki_tools import is_revoked
from pki_tools.types import PemCert
cert_pem = """
-----BEGIN CERTIFICATE-----
<CERT_PEM_BYTES>
-----END CERTIFICATE-----
"""
issuer_cert_pem = """
-----BEGIN CERTIFICATE-----
<ISSUER_CERT_PEM_BYTES>
-----END CERTIFICATE-----
"""
if is_revoked(PemCert(cert_pem), PemCert(issuer_cert_pem)):
print("Certificate Revoked!")
For more functions see: Pki Tools
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pki_tools-0.0.13.tar.gz
(7.9 kB
view hashes)
Built Distribution
Close
Hashes for pki_tools-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e4363dde5c13e48d9b144d8719addb521c100fdc628dab9ed90d4a98c9bd2c4 |
|
MD5 | b365a9293f104de41361f640d095f9e8 |
|
BLAKE2b-256 | 1daeecb22d519b64ef9558782f3634a3bf39002640b58cdf1d756dc63a6734f0 |