boost::corosio::tls_context::use_certificate

Load the entity certificate from a memory buffer.

Synopsis

std::error_code
use_certificate(
    std::string_view certificate,
    tls_file_format format);

Description

Sets the certificate that identifies this endpoint to the peer. For servers, this is the server certificate. For clients using mutual TLS, this is the client certificate.

The certificate must match the private key loaded via use_private_key() or use_private_key_file().

Return Value

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

Parameters

Name Description

certificate

The certificate data.

format

The encoding format of the certificate data.

See Also

use_certificate_file

use_private_key

Created with MrDocs