Skip to content

channel

Enums

Functions

  • build_channel - Build a lazily connecting tonic channel to the Authority.

firma_sidecar::authority_client::channel::BuildChannelError

Section titled “firma_sidecar::authority_client::channel::BuildChannelError”

Enum

Error building the Authority channel.

Variants:

  • InvalidUrl(String) - The validated URI could not be represented as a tonic endpoint.
  • Tls(tonic::transport::Error) - TLS configuration was rejected by tonic, for instance because no trusted

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

firma_sidecar::authority_client::channel::build_channel

Section titled “firma_sidecar::authority_client::channel::build_channel”

Function

Build a lazily connecting tonic channel to the Authority.

  • trust — what the Authority’s server TLS cert is verified against when url uses https://: the configured CAs alone, or the platform’s trusted roots (SSL_CERT_FILE and SSL_CERT_DIR override them).
  • client_identity — PEM client cert and key for mTLS.

Returns [BuildChannelError] when tonic rejects the validated origin, or TLS config is bad (including an https:// origin with no CA cert on a host with no trusted roots).

fn build_channel(authority: &crate::config::AuthorityEndpoint, connect_timeout: firma_config_utils::NonZeroDuration, trust: crate::authority_tls::TlsTrust, client_identity: Option<(&[u8], &[u8])>) -> Result<tonic::transport::Channel, BuildChannelError>