boost::corosio::tls_context::set_default_verify_paths

Use the system default CA certificate store.

Synopsis

std::error_code
set_default_verify_paths();

Description

Configures the context to use the operating system's default trust store for peer certificate verification. This is the recommended approach for HTTPS clients connecting to public servers.

On different platforms this uses: ‐ Linux: /etc/ssl/certs or distribution‐specific paths ‐ macOS: System Keychain ‐ Windows: Windows Certificate Store

Example

// Trust the same CAs as the system
ctx.set_default_verify_paths();

Return Value

Success, or an error if the system store could not be loaded.

See Also

load_verify_file

add_verify_path

Created with MrDocs