boost::corosio::tls_context::add_certificate_authority

Add a certificate authority for peer verification.

Synopsis

std::error_code
add_certificate_authority(std::string_view ca);

Description

Adds a single CA certificate to the trust store used for verifying peer certificates. Call this multiple times to add multiple CAs, or use load_verify_file() for a bundle.

Return Value

Success, or an error if the certificate could not be parsed.

Parameters

Name Description

ca

The CA certificate data in PEM format.

See Also

load_verify_file

set_default_verify_paths

Created with MrDocs