Function brane_cfg::certs::extract_client_name

source ·
pub fn extract_client_name(cert: Certificate) -> Result<String, Error>
Expand description

Retrieves the client name from the given Certificate provided by the, well, client.

§Arguments

  • certificate: The Certificate to analyze.

§Returns

The name of the client, as provided by the Certificate’s CN field.

§Errors

This function errors if we could not extract the name for some reason. You should consider the client unauthenticated, in that case.