23 explicit FuzzedSignatureChecker(
FuzzedDataProvider& fuzzed_data_provider) : m_fuzzed_data_provider(fuzzed_data_provider)
27 bool CheckECDSASignature(
const std::vector<unsigned char>& scriptSig,
const std::vector<unsigned char>& vchPubKey,
const CScript& scriptCode,
SigVersion sigversion)
const override
47 virtual ~FuzzedSignatureChecker() =
default;
58 std::vector<std::vector<unsigned char>> stack;
59 (void)
EvalScript(stack, script_1,
flags, FuzzedSignatureChecker(fuzzed_data_provider), sig_version,
nullptr);
63 (void)
VerifyScript(script_1, script_2,
nullptr,
flags, FuzzedSignatureChecker(fuzzed_data_provider),
nullptr);
virtual bool CheckLockTime(const CScriptNum &nLockTime) const
virtual bool CheckSchnorrSignature(Span< const unsigned char > sig, Span< const unsigned char > pubkey, SigVersion sigversion, ScriptExecutionData &execdata, ScriptError *serror=nullptr) const
virtual bool CheckSequence(const CScriptNum &nSequence) const
virtual bool CheckECDSASignature(const std::vector< unsigned char > &scriptSig, const std::vector< unsigned char > &vchPubKey, const CScript &scriptCode, SigVersion sigversion) const
Serialized script, used inside transaction inputs and outputs.
T PickValueInArray(const T(&array)[size])
bool EvalScript(std::vector< std::vector< unsigned char > > &stack, const CScript &script, unsigned int flags, const BaseSignatureChecker &checker, SigVersion sigversion, ScriptExecutionData &execdata, ScriptError *serror)
bool VerifyScript(const CScript &scriptSig, const CScript &scriptPubKey, const CScriptWitness *witness, unsigned int flags, const BaseSignatureChecker &checker, ScriptError *serror)
@ BASE
Bare scripts and BIP16 P2SH-wrapped redeemscripts.
@ WITNESS_V0
Witness v0 (P2WPKH and P2WSH); see BIP 141.
enum ScriptError_t ScriptError
FUZZ_TARGET(signature_checker)
CScript ConsumeScript(FuzzedDataProvider &fuzzed_data_provider, const bool maybe_p2wsh) noexcept
bool IsValidFlagCombination(unsigned flags)
Flags that are not forbidden by an assert in script validation.