|
curl-fuzzer C++ reference
|
Own per-transfer resources with one teardown contract: detach request callbacks and lists, clean the easy, then release share state, baseline lists, and anonymous files. More...
#include <transfer_session.h>
Public Member Functions | |
| bool | Initialize () |
| Allocate the easy lazily so unused concurrent-transfer slots stay empty. | |
| CURL * | easy () const |
| Borrow the owned easy; callers must not clean it themselves. | |
| void | ApplyBaseline (const curl::fuzzer::proto::Scenario &scenario) |
| Apply baseline options and retain their CONNECT_TO storage. | |
| bool | ResetConfiguration () |
| Reset pre-transfer configuration while preserving prepared parser files. | |
| bool | PrepareInputFiles (const curl::fuzzer::proto::Scenario &scenario, ScenarioRunMode mode) |
| Copy bounded parser inputs into lazily allocated anonymous files. | |
| const char * | FileSourcePath () const |
| Return the pathname of the prepared FILE source/sink. | |
| void | ApplyInputFiles () |
| Apply prepared parser paths after baseline and peer installation. | |
| void | ApplyPinnedPublicKeyFile () |
| Install the prepared public-key pin path after generic scalar options. | |
| void | ConfigureAltSvcRouting (const std::string &host_path) |
| Enable isolated Alt-Svc routing for the canonical deep-HTTP authority. | |
| ScenarioRequestData * | InstallRequestData (const curl::fuzzer::proto::Scenario &scenario, bool apply_resolve_entries=false) |
| Install owned request attachments. | |
| ApiLifecycle * | InstallApiLifecycle (const curl::fuzzer::proto::ApiPlan &plan, std::string_view url) |
| Install API/share state that survives easy cleanup. | |
| void | Close () |
| Release all resources in their required order. Safe to call repeatedly. | |
Own per-transfer resources with one teardown contract: detach request callbacks and lists, clean the easy, then release share state, baseline lists, and anonymous files.
The installed peer and any borrowed Scenario must outlive this session. Multi owners must remove the easy before Close(). Sessions cannot move because callbacks retain addresses of their state.
Definition at line 32 of file transfer_session.h.
| void proto_fuzzer::TransferSession::ApplyBaseline | ( | const curl::fuzzer::proto::Scenario & | scenario | ) |
Apply baseline options and retain their CONNECT_TO storage.
| scenario | Transfer whose scheme, trace_ids, and trace_config select the peer allowlist and trace configuration. |
Definition at line 93 of file transfer_session.cc.
| void proto_fuzzer::TransferSession::ApplyPinnedPublicKeyFile | ( | ) |
Install the prepared public-key pin path after generic scalar options.
This field is the only protobuf-controlled route to curl's filename-backed pin parser; the path itself always names a descriptor owned by this session.
Definition at line 180 of file transfer_session.cc.
| void proto_fuzzer::TransferSession::ConfigureAltSvcRouting | ( | const std::string & | host_path | ) |
Enable isolated Alt-Svc routing for the canonical deep-HTTP authority.
| host_path | Scenario URL authority/path used by this transfer. |
Definition at line 191 of file transfer_session.cc.
| CURL * proto_fuzzer::TransferSession::easy | ( | ) | const |
Borrow the owned easy; callers must not clean it themselves.
Definition at line 88 of file transfer_session.cc.
| const char * proto_fuzzer::TransferSession::FileSourcePath | ( | ) | const |
Return the pathname of the prepared FILE source/sink.
The path names only a descriptor owned by this session and is unavailable in every other lane.
Definition at line 146 of file transfer_session.cc.
| bool proto_fuzzer::TransferSession::Initialize | ( | ) |
Allocate the easy lazily so unused concurrent-transfer slots stay empty.
Definition at line 79 of file transfer_session.cc.
| ApiLifecycle * proto_fuzzer::TransferSession::InstallApiLifecycle | ( | const curl::fuzzer::proto::ApiPlan & | plan, |
| std::string_view | url ) |
Install API/share state that survives easy cleanup.
| plan | Live plan until session teardown. |
| url | URL used only during lifecycle construction. |
Definition at line 226 of file transfer_session.cc.
| ScenarioRequestData * proto_fuzzer::TransferSession::InstallRequestData | ( | const curl::fuzzer::proto::Scenario & | scenario, |
| bool | apply_resolve_entries = false ) |
Install owned request attachments.
The Scenario remains borrowed.
| scenario | Live, unmodified source until session teardown. |
| apply_resolve_entries | Install resolver-lane mappings. |
Definition at line 213 of file transfer_session.cc.
| bool proto_fuzzer::TransferSession::PrepareInputFiles | ( | const curl::fuzzer::proto::Scenario & | scenario, |
| ScenarioRunMode | mode ) |
Copy bounded parser inputs into lazily allocated anonymous files.
| scenario | Source of parser-file bytes; not retained. |
| mode | Select the FILE source or deep HTTP/TLS parser inputs. |
Definition at line 116 of file transfer_session.cc.
| bool proto_fuzzer::TransferSession::ResetConfiguration | ( | ) |
Reset pre-transfer configuration while preserving prepared parser files.
Definition at line 102 of file transfer_session.cc.