Skip to main content

server_identity

Function server_identity 

Source
pub fn server_identity(cert_path: &str, key_path: Option<&str>) -> Identity
Expand description

Load the orchestrator’s TLS identity (certificate + private key).

The certificate file may hold a chain with intermediate CA certificates.

§Arguments

  • cert_path - path to the certificate (chain)
  • key_path - path to the private key, defaults to cert_path with a .key extension

§Returns

A tonic [Identity] to be used in the server’s ServerTlsConfig.

§Panics

If the certificate or private key cannot be read.