TLS 上下文
更多...
#include <rmvl/io/ssl.hpp>
TLS 上下文
保存证书、私钥、CA 等可被多个连接复用的 TLS 配置。该类不拥有 Socket,仅负责创建 SSLStream 所需的 OpenSSL 上下文。
◆ SSLContext() [1/3]
◆ SSLContext() [2/3]
| rm::SSLContext::SSLContext |
( |
const SSLContext & | | ) |
|
|
delete |
◆ SSLContext() [3/3]
| rm::SSLContext::SSLContext |
( |
SSLContext && | | ) |
|
|
defaultnoexcept |
◆ ~SSLContext()
| rm::SSLContext::~SSLContext |
( |
| ) |
|
|
default |
◆ available()
| bool rm::SSLContext::available |
( |
| ) |
|
|
staticnoexcept |
◆ client()
◆ lasterr()
| std::string rm::SSLContext::lasterr |
( |
| ) |
const |
|
inlinenodiscard |
◆ load_ca()
| bool rm::SSLContext::load_ca |
( |
std::string_view | ca_file, |
|
|
std::string_view | ca_path = {} ) |
◆ load_cert()
| bool rm::SSLContext::load_cert |
( |
std::string_view | cert_file, |
|
|
std::string_view | key_file ) |
加载证书与私钥文件
- 参数
-
| [in] | cert_file | 证书文件路径,PEM 格式 |
| [in] | key_file | 私钥文件路径,PEM 格式 |
- 返回
- 是否加载成功
◆ mode()
| SSLMode rm::SSLContext::mode |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ server()
◆ set_verify_mode()
◆ valid()
| bool rm::SSLContext::valid |
( |
| ) |
const |
|
inlinenodiscardnoexcept |