gamqp/amqp091/tls

TLS settings for amqps connections.

Types

pub type TlsConfig {
  TlsConfig(
    verify: Bool,
    ca_certificates_file: option.Option(String),
    certificate_file: option.Option(String),
    key_file: option.Option(String),
    server_name: option.Option(String),
  )
}

Constructors

  • TlsConfig(
      verify: Bool,
      ca_certificates_file: option.Option(String),
      certificate_file: option.Option(String),
      key_file: option.Option(String),
      server_name: option.Option(String),
    )

    Arguments

    verify

    Check the broker certificate and host name.

    ca_certificates_file

    PEM bundle to trust instead of the operating system’s CA store.

    certificate_file

    Client certificate and key, for mutual TLS or the EXTERNAL mechanism.

    server_name

    Name sent for SNI and checked against the certificate. Defaults to the host.

Values

pub fn ca_certificates(
  config: TlsConfig,
  path: String,
) -> TlsConfig
pub fn client_certificate(
  config: TlsConfig,
  certificate path: String,
  key key: String,
) -> TlsConfig
pub fn unverified() -> TlsConfig

Encrypts without checking who is on the other end. Only for local testing.

pub fn verified() -> TlsConfig

Verifies the broker against the system CA store.

✨ Search Document