 |
Bitcoin Core
22.99.0
P2P Digital Currency
|
Go to the documentation of this file.
39 static const auto testing_setup = MakeNoLogFileContext<>();
52 tor_control_reply.
code = 250;
55 tor_control_reply.
code = 510;
58 tor_control_reply.
code = fuzzed_data_provider.ConsumeIntegral<
int>();
61 if (tor_control_reply.
lines.empty()) {
68 tor_controller.
add_onion_cb(dummy_tor_control_connection, tor_control_reply);
71 tor_controller.
auth_cb(dummy_tor_control_connection, tor_control_reply);
74 tor_controller.
authchallenge_cb(dummy_tor_control_connection, tor_control_reply);
77 tor_controller.
protocolinfo_cb(dummy_tor_control_connection, tor_control_reply);
Reply from Tor, can be single or multi-line.
std::vector< std::string > ConsumeRandomLengthStringVector(FuzzedDataProvider &fuzzed_data_provider, const size_t max_vector_size=16, const size_t max_string_length=16) noexcept
FUZZ_TARGET_INIT(torcontrol, initialize_torcontrol)
void protocolinfo_cb(TorControlConnection &conn, const TorControlReply &reply)
Callback for PROTOCOLINFO result.
std::function< void(TorControlConnection &)> ConnectionCB
Low-level handling for Tor control connection.
DummyTorControlConnection()
void add_onion_cb(TorControlConnection &conn, const TorControlReply &reply)
Callback for ADD_ONION result.
size_t CallOneOf(FuzzedDataProvider &fuzzed_data_provider, Callables... callables)
std::function< void(TorControlConnection &, const TorControlReply &)> ReplyHandlerCB
std::vector< std::string > lines
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
void auth_cb(TorControlConnection &conn, const TorControlReply &reply)
Callback for AUTHENTICATE result.
bool Connect(const std::string &, const ConnectionCB &, const ConnectionCB &)
void authchallenge_cb(TorControlConnection &conn, const TorControlReply &reply)
Callback for AUTHCHALLENGE result.
Controller that connects to Tor control socket, authenticate, then create and maintain an ephemeral o...
bool Command(const std::string &, const ReplyHandlerCB &)
void initialize_torcontrol()