|
curl-fuzzer C++ reference
|
Reusable TLS carrier for protocol-specific mock peers. More...
#include <tls_mock_server.h>
Public Member Functions | |
| TlsMockTransport (TlsApplicationProtocol protocol=TlsApplicationProtocol::kHttp11, curl::fuzzer::proto::TlsCertificateChainProfile certificate_chain=curl::fuzzer::proto::TLS_CERTIFICATE_CHAIN_DEFAULT_EC, TlsGroupPolicy group_policy=TlsGroupPolicy::kProviderDefault, curl::fuzzer::proto::TlsHandshakeProfile handshake_profile=curl::fuzzer::proto::TLS_HANDSHAKE_DEFAULT) | |
| Construct one reusable TLS context for a protocol-specific peer. | |
| void | Install (CURL *easy) const |
| Install the stable local trust anchor and strict peer verification. | |
| std::unique_ptr< MockConnection > | CreateConnection () |
| Wrap one socketpair server endpoint in an OpenSSL acceptor. | |
| std::unique_ptr< MockConnection > | CreateAcceptedConnection (int accepted_fd) |
| Wrap one accepted loopback descriptor in this transport's OpenSSL server context. | |
| int | negotiated_tls_version () const |
| std::size_t | completed_handshake_count () const |
| std::size_t | reused_session_count () const |
| std::size_t | write_retry_count () const |
| std::string | negotiated_alpn () const |
| TlsGroupPolicy | group_policy () const |
| std::string | negotiated_group () const |
| int | ech_status () const |
| std::string | ech_inner_name () const |
| std::string | ech_outer_name () const |
Reusable TLS carrier for protocol-specific mock peers.
It owns the per-scenario server context, creates nonblocking TLS connections, and installs the checked-in trust anchor without taking ownership of curl's socket callbacks or application-protocol drive loop.
Definition at line 49 of file tls_mock_server.h.
|
explicit |
Construct one reusable TLS context for a protocol-specific peer.
| protocol | Fixed ALPN application protocol offered by the server. |
| certificate_chain | Certificate-chain profile presented to curl. |
| group_policy | Immutable server key-exchange group policy. |
| handshake_profile | Closed peer-side handshake terminal. |
Definition at line 561 of file tls_mock_server.cc.
| std::size_t proto_fuzzer::TlsMockTransport::completed_handshake_count | ( | ) | const |
Definition at line 612 of file tls_mock_server.cc.
| std::unique_ptr< MockConnection > proto_fuzzer::TlsMockTransport::CreateAcceptedConnection | ( | int | accepted_fd | ) |
Wrap one accepted loopback descriptor in this transport's OpenSSL server context.
The special pre-handshake terminal profiles apply only to the socketpair fuzz lanes; a listener-backed peer always performs real TLS.
| accepted_fd | Connected descriptor whose ownership transfers. |
Definition at line 602 of file tls_mock_server.cc.
| std::unique_ptr< MockConnection > proto_fuzzer::TlsMockTransport::CreateConnection | ( | ) |
Wrap one socketpair server endpoint in an OpenSSL acceptor.
Definition at line 587 of file tls_mock_server.cc.
| std::string proto_fuzzer::TlsMockTransport::ech_inner_name | ( | ) | const |
Definition at line 643 of file tls_mock_server.cc.
| std::string proto_fuzzer::TlsMockTransport::ech_outer_name | ( | ) | const |
Definition at line 648 of file tls_mock_server.cc.
| int proto_fuzzer::TlsMockTransport::ech_status | ( | ) | const |
Definition at line 640 of file tls_mock_server.cc.
| TlsGroupPolicy proto_fuzzer::TlsMockTransport::group_policy | ( | ) | const |
Definition at line 632 of file tls_mock_server.cc.
| void proto_fuzzer::TlsMockTransport::Install | ( | CURL * | easy | ) | const |
Install the stable local trust anchor and strict peer verification.
Socket callbacks remain owned by the protocol-specific server using this carrier.
| easy | Easy handle that will connect to this TLS transport. |
Definition at line 577 of file tls_mock_server.cc.
| std::string proto_fuzzer::TlsMockTransport::negotiated_alpn | ( | ) | const |
Definition at line 627 of file tls_mock_server.cc.
| std::string proto_fuzzer::TlsMockTransport::negotiated_group | ( | ) | const |
Definition at line 635 of file tls_mock_server.cc.
| int proto_fuzzer::TlsMockTransport::negotiated_tls_version | ( | ) | const |
Definition at line 607 of file tls_mock_server.cc.
| std::size_t proto_fuzzer::TlsMockTransport::reused_session_count | ( | ) | const |
Definition at line 617 of file tls_mock_server.cc.
| std::size_t proto_fuzzer::TlsMockTransport::write_retry_count | ( | ) | const |
Definition at line 622 of file tls_mock_server.cc.