Changeset View
Changeset View
Standalone View
Standalone View
src/script/sigencoding.cpp
Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | if (flags & SCRIPT_VERIFY_STRICTENC) { | ||||
if (forkIdEnabled && !usesForkId) { | if (forkIdEnabled && !usesForkId) { | ||||
return set_error(serror, SCRIPT_ERR_MUST_USE_FORKID); | return set_error(serror, SCRIPT_ERR_MUST_USE_FORKID); | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
bool CheckTransactionECDSASignatureEncoding(const valtype &vchSig, | |||||
uint32_t flags, | |||||
ScriptError *serror) { | |||||
return CheckTransactionSignatureEncoding(vchSig, flags, serror); | |||||
} | |||||
static bool IsCompressedOrUncompressedPubKey(const valtype &vchPubKey) { | static bool IsCompressedOrUncompressedPubKey(const valtype &vchPubKey) { | ||||
switch (vchPubKey.size()) { | switch (vchPubKey.size()) { | ||||
case 33: | case 33: | ||||
// Compressed public key: must start with 0x02 or 0x03. | // Compressed public key: must start with 0x02 or 0x03. | ||||
return vchPubKey[0] == 0x02 || vchPubKey[0] == 0x03; | return vchPubKey[0] == 0x02 || vchPubKey[0] == 0x03; | ||||
case 65: | case 65: | ||||
// Non-compressed public key: must start with 0x04. | // Non-compressed public key: must start with 0x04. | ||||
Show All 34 Lines |