boost::corosio::tls_context::use_certificate
Load the entity certificate from a memory buffer.
Synopsis
Declared in <boost/corosio/tls_context.hpp>
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().
Parameters
| Name | Description |
|---|---|
certificate |
The certificate data. |
format |
The encoding format of the certificate data. |