Skip to main content

Module cert

Module cert 

Available on crate features crypto and std only.
Expand description

Certificate generation helpers.

Provides a backend pluggable self-signed certificate generator. The actual crypto provider is selected by cargo feature:

  • boring: generate using BoringSSL (via rama-boring), for stacks that already link boringssl and do not want a second crypto provider.
  • aws-lc / ring: generate using rcgen.

When several providers are enabled, boring is preferred. With none enabled, certificate-generation functions return an error.

Modules§

boringboring
BoringSSL-backed self-signed certificate generation (feature boring).
rcgenaws-lc or ring
rcgen-backed certificate generation (feature aws-lc / ring).

Structs§

CertificateAuthorityData
An issuing CA chain and its private key.
CertificateSubject
X.509 subject metadata. Service identities belong in SANs, not the CN.
CertificateValidity
Validity policy relative to certificate generation time.
LeafCertConfig
Reusable policy for an end-entity server certificate.
LeafCertRequest
One concrete leaf-certificate request.
SelfSignedCaConfig
Configuration for a generated self-signed certificate authority.

Enums§

CertificateIdentity
DNS or IP service identity encoded in a certificate’s SAN extension.
CertificateKeyKind
Key algorithm to use when generating a self-signed key pair.
GeneratedServerAuthConfig
Configuration for generating static server-authentication material.

Functions§

generate_certificate_authorityboring
generate_server_authboring
issue_certificate_authority_leafboring
spki_sha256
Compute the SHA-256 digest of the certificate’s SubjectPublicKeyInfo.