Skip to main content

Module certificate

Module certificate 

Source
Expand description

Python bindings for X.509 and related PKI types.

Exposes PyCertificate, PyCsr, PyCrl, and PyOcspResponse as pyo3 classes, along with OID-lookup helper functions and the synta.oids / synta.oids.attr submodules.

This module is part of the synta-python cdylib. Call register_module from the #[pymodule] entry point to expose these types to Python.

Structs§

PyAuthenticatedData
CMS AuthenticatedData (RFC 5652 §9) accessible from Python.
PyCMSORIforKEMOtherInfo
CMS ORI KEM Other Info (RFC 9629 §6.2) accessible from Python.
PyCertificate
X.509 Certificate accessible from Python.
PyContentInfo
CMS ContentInfo (RFC 5652 §3) accessible from Python.
PyCrl
X.509 Certificate Revocation List accessible from Python.
PyCsr
PKCS #10 Certificate Signing Request accessible from Python.
PyDigestedData
CMS DigestedData (RFC 5652 §7) accessible from Python.
PyEncryptedData
CMS EncryptedData (RFC 5652 §8) accessible from Python.
PyEnvelopedData
CMS EnvelopedData (RFC 5652 §6) accessible from Python.
PyIssuerAndSerialNumber
CMS IssuerAndSerialNumber (RFC 5652 §10.2.4) accessible from Python.
PyKEMRecipientInfo
KEM Recipient Info (RFC 9629) accessible from Python.
PyOcspResponse
OCSP Response (RFC 6960) accessible from Python.
PySignedData
CMS SignedData (RFC 5652 §5) accessible from Python.
PySignerInfo
CMS SignerInfo (RFC 5652 §5.3) accessible from Python.

Functions§

load_der_pkcs7_certificates
Extract X.509 certificates from a PKCS#7 SignedData blob (DER or BER).
load_pem_pkcs7_certificates
Extract X.509 certificates from a PEM-encoded PKCS#7 SignedData blob.
load_pkcs12
Extract both certificates and private keys from a PKCS#12 archive.
load_pkcs12_certificates
Extract X.509 certificates from a PKCS#12 archive.
load_pkcs12_keys
Extract PKCS#8 private keys from a PKCS#12 archive.
read_pki_blocks
Auto-detect the encoding of data and return every PKI object as a (label, der_bytes) tuple, in document order.
register_module
Call this from a cdylib extension crate’s #[pymodule] function: