Skip to main content

init_crypto

Function init_crypto 

Source
pub fn init_crypto()
Expand description

Install a process-wide default crypto provider (ring). Idempotent and best-effort: if a provider is already installed (e.g. by the JWKS HTTP client) this is a no-op.

ring is the only provider linked (see the rustls entry in Cargo.toml), so rustls would resolve it from crate features anyway. Installing it explicitly keeps that independent of the dependency graph: a future dep that re-enables rustls/aws_lc_rs would otherwise make every feature-based CryptoProvider lookup ambiguous — and those lookups panic.