boost::corosio::tls_context::set_ocsp_staple

Set the OCSP staple response for server‐side stapling.

Synopsis

std::error_code
set_ocsp_staple(std::string_view response);

Description

For servers, provides a pre‐fetched OCSP response to send to clients during the handshake. This proves the server's certificate hasn't been revoked without requiring the client to contact the OCSP responder.

The OCSP response must be periodically refreshed (typically every few hours to days) before it expires.

This is a server‐side operation. Clients use set_require_ocsp_staple() to require stapled responses.

Return Value

Success, or an error if the response is invalid.

Parameters

Name Description

response

The DER‐encoded OCSP response.

Created with MrDocs