curl-fuzzer C++ reference
Loading...
Searching...
No Matches
option_model.h
Go to the documentation of this file.
1/*
2 * Copyright (C) Max Dymond, <cmeister2@gmail.com>, et al.
3 *
4 * SPDX-License-Identifier: curl
5 */
6
9
10#ifndef PROTO_FUZZER_OPTION_MODEL_H_
11#define PROTO_FUZZER_OPTION_MODEL_H_
12
13#include <cstdint>
14#include <string>
15
16#include "curl_fuzzer.pb.h"
17
18namespace proto_fuzzer {
19
21enum class OptionValueKind {
22 kString,
25};
26
31 curl::fuzzer::proto::CurlOptionId id;
35 const char* name;
38};
39
40const OptionDescriptor* LookupOptionDescriptor(curl::fuzzer::proto::CurlOptionId id);
41
42std::uint64_t DecodeIntegralOptionValue(const curl::fuzzer::proto::SetOption& option);
43
44std::uint64_t DecodeIntegralOptionValue(const OptionDescriptor& descriptor,
45 const curl::fuzzer::proto::SetOption& option);
46
47void CanonicalizeOptionValueCases(curl::fuzzer::proto::Scenario* scenario);
48
49bool UsesInMemoryPublicKeyPin(const std::string& value);
50
51void ConstrainPinnedPublicKeyValue(std::string* value);
52
53} // namespace proto_fuzzer
54
55#endif // PROTO_FUZZER_OPTION_MODEL_H_
void ConstrainPinnedPublicKeyValue(std::string *value)
Prefix filename-like pins with in-memory digest syntax.
bool UsesInMemoryPublicKeyPin(const std::string &value)
Whether curl will interpret this pin as an in-memory digest expression.
const OptionDescriptor * LookupOptionDescriptor(curl::fuzzer::proto::CurlOptionId id)
Return the generated description, or nullptr for an unsupported option.
std::uint64_t DecodeIntegralOptionValue(const OptionDescriptor &descriptor, const curl::fuzzer::proto::SetOption &option)
Decode using an already-resolved descriptor, avoiding another lookup when the runtime has selected th...
void CanonicalizeOptionValueCases(curl::fuzzer::proto::Scenario *scenario)
Restore each recognized option's consumed oneof member without calling libcurl.
OptionValueKind
Value family selected by the build-time-generated option manifest.
@ kBool
bool_value passed as a zero-or-one long flag.
@ kUint
uint_value passed to a long or curl_off_t option.
A generated option description.
OptionValueKind kind
Value family consumed by the native option.
const char * name
Human-readable CURLOPT name from the generated manifest.
int curlopt
Native CURLoption value, stored without exposing curl handle types.
curl::fuzzer::proto::CurlOptionId id
Stable protobuf identifier for this option.