Skip to main content

build_client_config_from_pem

Function build_client_config_from_pem 

Source
pub fn build_client_config_from_pem(
    path: &Path,
) -> Result<Arc<ClientConfig>, JwksTrustError>
Expand description

Read a PEM bundle of one or more CA certificates and produce a rustls::ClientConfig that trusts exactly those certificates.

The returned config has no client auth. The broker does not present a client cert when it fetches the JWKS endpoint.

ยงErrors

Returns an error when credentials or key material are invalid, cryptographic verification fails, or the TLS, SASL, or Kerberos exchange is rejected.