HTTPS server backend that adds Sunshine's client-certificate verification.
More...
|
| | SunshineHTTPSServer (const std::string &certification_file, const std::string &private_key_file) |
| | Initialize the HTTPS server with Sunshine's certificate and key files.
|
|
|
std::function< void(std::shared_ptr< Response >, std::shared_ptr< Request >)> | on_verify_failed |
| | Handler used to return the pairing challenge when client verification fails.
|
|
std::function< int(SSL *)> | verify |
| | Callback that validates a client's TLS certificate after handshake.
|
|
| void | accept () override |
| | Accept a pending connection and arm the server for the next client.
|
| void | after_bind () override |
| | Enable client-certificate verification after the listening socket is bound.
|
| void | handle_handshake (const std::shared_ptr< Session > &session, const SimpleWeb::error_code &ec) |
| | Process a completed TLS handshake under the callback's server lifetime guard.
|
|
|
boost::asio::ssl::context | context {boost::asio::ssl::context::tls_server} |
| | TLS server context configured with Sunshine's certificate and protocol policy.
|
HTTPS server backend that adds Sunshine's client-certificate verification.
◆ SunshineHTTPSServer()
| nvhttp::SunshineHTTPSServer::SunshineHTTPSServer |
( |
const std::string & | certification_file, |
|
|
const std::string & | private_key_file ) |
|
inline |
Initialize the HTTPS server with Sunshine's certificate and key files.
- Parameters
-
| certification_file | Path to the server certificate file. |
| private_key_file | Path to the matching private key file. |
◆ accept()
| void nvhttp::SunshineHTTPSServer::accept |
( |
| ) |
|
|
inlineoverrideprotected |
Accept a pending connection and arm the server for the next client.
Keep each handler's scope guard alive until all access to the server has finished.
◆ after_bind()
| void nvhttp::SunshineHTTPSServer::after_bind |
( |
| ) |
|
|
inlineoverrideprotected |
Enable client-certificate verification after the listening socket is bound.
Ignore the TLS preverification result and context so failed authorization can receive an HTTP error.
◆ handle_handshake()
| void nvhttp::SunshineHTTPSServer::handle_handshake |
( |
const std::shared_ptr< Session > & | session, |
|
|
const SimpleWeb::error_code & | ec ) |
|
inlineprotected |
Process a completed TLS handshake under the callback's server lifetime guard.
- Parameters
-
| session | Session whose TLS handshake has completed. |
| ec | Result of the asynchronous handshake. |
- Precondition
- The caller holds the session's handler scope guard.
The documentation for this class was generated from the following file: