Skip to content

authority_tls

Structs

  • AuthorityTls - The Authority’s TLS material, read from the files the configuration names.

Enums

  • AuthorityTlsError - Error reading the Authority’s TLS material.
  • TlsTrust - What a TLS client verifies the server’s certificate against.

Functions

  • read_ca_pems - Read the CA certificate PEMs trust names, in order.

firma_sidecar::authority_tls::AuthorityTls

Section titled “firma_sidecar::authority_tls::AuthorityTls”

Struct

The Authority’s TLS material, read from the files the configuration names.

Methods:

  • fn read(config: &AuthorityConfig) -> Result<Self, AuthorityTlsError> - Read every file the configuration names.

Trait Implementations:

  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_sidecar::authority_tls::AuthorityTlsError

Section titled “firma_sidecar::authority_tls::AuthorityTlsError”

Enum

Error reading the Authority’s TLS material.

Variants:

  • Read{ what: &'static str, path: std::path::PathBuf, source: std::io::Error } - A configured file could not be read.
  • ParseCaCert{ path: std::path::PathBuf, source: rustls::pki_types::pem::Error } - A configured CA file is not PEM.
  • EmptyCaCert{ path: std::path::PathBuf } - A configured CA file holds no certificate, so it would anchor nothing.
  • PartialClientIdentity - Only one of the mTLS client certificate and key is configured.

Trait Implementations:

  • Error
    • fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private21::Error>
  • Display
    • fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

Enum

What a TLS client verifies the server’s certificate against.

Generic Parameters:

  • ‘a

Variants:

  • Cas(&'a [Vec<u8>]) - Only these CA certificate PEMs; never empty.
  • PlatformStore - The platform’s trusted roots.

Methods:

  • fn from_pems(pems: &'a [Vec<u8>]) -> Self - The configured CAs alone when any, otherwise the platform’s roots.

Traits: Copy

Trait Implementations:

  • Clone
    • fn clone(self: &Self) -> Self
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result

firma_sidecar::authority_tls::read_ca_pems

Section titled “firma_sidecar::authority_tls::read_ca_pems”

Function

Read the CA certificate PEMs trust names, in order.

Returns [AuthorityTlsError] naming the file that could not be read, is not PEM, or holds no certificate: a readable file that anchors nothing would otherwise fail only at the handshake it was meant to secure.

fn read_ca_pems(trust: &crate::config::AuthorityTrust) -> Result<Vec<Vec<u8>>, AuthorityTlsError>