boost::corosio::tls_context::use_certificate_file
Load the entity certificate from a file.
Synopsis
Declared in <boost/corosio/tls_context.hpp>
std::error_code
use_certificate_file(
std::string_view filename,
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.
Return Value
Success, or an error if the file could not be read or the certificate is invalid.
Parameters
| Name | Description |
|---|---|
filename |
Path to the certificate file. |
format |
The encoding format of the file. |