|
curl-fuzzer C++ reference
|
Implementation of the option-translation helpers declared in option_apply.h. More...
Go to the source code of this file.
Functions | |
| CurlSlistPtr | proto_fuzzer::ApplyBaselineOptions (CURL *easy, curl::fuzzer::proto::Scheme scheme, bool trace_ids, const std::string &trace_config) |
| Apply deterministic routing, timeout, output, and persistence defaults. | |
| CURLcode | proto_fuzzer::ApplyTlsClientCredentialProfile (CURL *easy, curl::fuzzer::proto::TlsClientCredentialProfile profile) |
| Apply one closed, harness-owned TLS client-credential configuration. | |
| CURLcode | proto_fuzzer::ApplySetOption (CURL *easy, const curl::fuzzer::proto::SetOption &option) |
| Translate and apply one generated scalar/string SetOption to the easy handle. | |
| std::size_t | proto_fuzzer::RuntimeOptionCount (const curl::fuzzer::proto::Scenario &scenario) |
| Return the runtime-visible option prefix length. | |
| std::size_t | proto_fuzzer::ApplyScenarioOptions (CURL *easy, const curl::fuzzer::proto::Scenario &scenario) |
| Apply the bounded runtime-visible prefix of Scenario.options. | |
Implementation of the option-translation helpers declared in option_apply.h.
Definition in file option_apply.cc.
| CurlSlistPtr proto_fuzzer::ApplyBaselineOptions | ( | CURL * | easy, |
| curl::fuzzer::proto::Scheme | scheme, | ||
| bool | trace_ids, | ||
| const std::string & | trace_config ) |
Apply deterministic routing, timeout, output, and persistence defaults.
Call before applying scenario options. scheme identifies the dedicated in-process mock that will service the transfer and selects the safe direct- protocol allowlist.
| easy | The curl easy handle to configure. |
| scheme | Protocol whose dedicated in-process mock will service it. |
| trace_ids | Enable verbose LIB-IDS tracing for this scenario. |
| trace_config | Optional curl_global_trace() configuration. |
Definition at line 96 of file option_apply.cc.
| std::size_t proto_fuzzer::ApplyScenarioOptions | ( | CURL * | easy, |
| const curl::fuzzer::proto::Scenario & | scenario ) |
Apply the bounded runtime-visible prefix of Scenario.options.
Individual CURLcode values remain intentionally ignored, matching the fuzzer runner's historical behavior. Bounding here also covers standalone compatibility seeds that reach RunScenario without normalization.
| easy | Easy handle receiving each supported option. |
| scenario | Structured input that owns all borrowed option strings. |
Definition at line 402 of file option_apply.cc.
| CURLcode proto_fuzzer::ApplySetOption | ( | CURL * | easy, |
| const curl::fuzzer::proto::SetOption & | option ) |
Translate and apply one generated scalar/string SetOption to the easy handle.
Pointer-valued options borrow the SetOption's protobuf-owned string storage, so its containing Scenario must remain alive and unmodified until the transfer has stopped and the easy handle has been cleaned up. Borrowing avoids a duplicate backing allocation on every iteration; the lifetime is especially important for CURLOPT_POSTFIELDS, which curl does not copy.
| easy | The curl easy handle to configure. |
| option | The SetOption proto describing which option and value to set. |
Definition at line 310 of file option_apply.cc.
| CURLcode proto_fuzzer::ApplyTlsClientCredentialProfile | ( | CURL * | easy, |
| curl::fuzzer::proto::TlsClientCredentialProfile | profile ) |
Apply one closed, harness-owned TLS client-credential configuration.
No protobuf bytes become a path, provider, or engine identifier.
| easy | Handle receiving the fixed credential options. |
| profile | Safe credential setup selected by the HTTPS lane. |
Definition at line 247 of file option_apply.cc.
| std::size_t proto_fuzzer::RuntimeOptionCount | ( | const curl::fuzzer::proto::Scenario & | scenario | ) |
Return the runtime-visible option prefix length.
Fixed targets normally trim the protobuf in their postprocessor, but the compatibility target must preserve its historical message unchanged; applying the same bound here prevents that lane from doing mutation-sized setopt work while exposing the same option prefix as postprocessed fixed lanes.
| scenario | Structured input whose option prefix will be consumed. |
Definition at line 391 of file option_apply.cc.