boost::corosio::tls_context::set_ciphersuites

Set the allowed cipher suites.

Synopsis

std::error_code
set_ciphersuites(std::string_view ciphers);

Description

Configures which cipher suites may be used for connections. The format is backend‐specific but typically follows OpenSSL cipher list syntax.

Example

// TLS 1.2 cipher suites (OpenSSL format)
ctx.set_ciphersuites( "ECDHE+AESGCM:ECDHE+CHACHA20" );

For TLS 1.3, use set_ciphersuites_tls13() on backends that distinguish between TLS 1.2 and 1.3 cipher configuration.

Return Value

Success, or an error if the cipher string is invalid.

Parameters

Name Description

ciphers

The cipher suite specification string.

Created with MrDocs