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§
- PyAuthenticated
Data - CMS
AuthenticatedData(RFC 5652 §9) accessible from Python. - PyCMSOR
IforKEM Other Info - CMS ORI KEM Other Info (RFC 9629 §6.2) accessible from Python.
- PyCertificate
- X.509 Certificate accessible from Python.
- PyContent
Info - 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.
- PyDigested
Data - CMS
DigestedData(RFC 5652 §7) accessible from Python. - PyEncrypted
Data - CMS
EncryptedData(RFC 5652 §8) accessible from Python. - PyEnveloped
Data - CMS
EnvelopedData(RFC 5652 §6) accessible from Python. - PyIssuer
AndSerial Number - CMS IssuerAndSerialNumber (RFC 5652 §10.2.4) accessible from Python.
- PyKEM
Recipient Info - KEM Recipient Info (RFC 9629) accessible from Python.
- PyOcsp
Response - OCSP Response (RFC 6960) accessible from Python.
- PySigned
Data - CMS
SignedData(RFC 5652 §5) accessible from Python. - PySigner
Info - 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
dataand 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: