Skip to main content

Crate x509

Crate x509 

Source

Re-exports§

pub use csr::Csr;
pub use csr::CsrBuilder;

Modules§

csr
der
ocsp

Structs§

Cert
CertBuilder
what a new certificate says
NameConstraints
the name constraints of a CA
PrivateKey
a private key that signs (Ed25519, ECDSA on P-256 or P-384, RSA)

Enums§

IpAddr
PubKey
a public key
SigAlg
a signature algorithm (of certificates and of TLS handshakes)
Usage

Constants§

KU_CRL_SIGN
KU_DIGITAL_SIGNATURE
key usage bits as they appear in the first byte
KU_KEY_CERT_SIGN
OID_ED25519
TLS_FEATURE_STATUS_REQUEST
the TLS feature of a certificate that must come with a stapled OCSP response (RFC 7633: status_request)

Functions§

check_leaf
the checks of verify_chain that concern the leaf alone: no unknown critical extension, valid at now, for this usage (extended key usage), allowed to sign (key usage digitalSignature), no CA’s extensions on a certificate that is no CA (keyCertSign, name constraints: RFC 5280 4.2.1.9, 4.2.1.10), and the name. netio::roots asks them after a system’s verifier said yes to the path, so the leaf follows the same rules everywhere
ed25519_from_pkcs8
the seed of a PKCS#8 Ed25519 private key
ed25519_pkcs8
the PKCS#8 form of an Ed25519 private key (for interoperable PEM files)
extension
a DER Extension (oid, the critical flag, the DER value) for CertBuilder::sign_ext
spki_of
the SubjectPublicKeyInfo of a public key (empty for PubKey::Other)
verify_chain
check a chain (leaf first) against trusted anchors: a path from the leaf through the other certificates of the chain (in any order) to an anchor
verify_path
verify_chain, and the path it found: the leaf, the intermediates of the chain it went through (in their order up), the anchor (a root the chain left out: what a TLSA record of usage PKIX-TA may name, RFC 7671 5.4)