mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-09 10:43:19 -05:00
Correctly report high-S violations
This commit is contained in:
parent
11d74f6a6b
commit
9d95187d5d
1 changed files with 4 additions and 1 deletions
|
@ -165,7 +165,10 @@ bool static IsLowDERSignature(const valtype &vchSig, ScriptError* serror) {
|
||||||
return set_error(serror, SCRIPT_ERR_SIG_DER);
|
return set_error(serror, SCRIPT_ERR_SIG_DER);
|
||||||
}
|
}
|
||||||
std::vector<unsigned char> vchSigCopy(vchSig.begin(), vchSig.begin() + vchSig.size() - 1);
|
std::vector<unsigned char> vchSigCopy(vchSig.begin(), vchSig.begin() + vchSig.size() - 1);
|
||||||
return CPubKey::CheckLowS(vchSigCopy);
|
if (!CPubKey::CheckLowS(vchSigCopy)) {
|
||||||
|
return set_error(serror, SCRIPT_ERR_SIG_HIGH_S);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool static IsDefinedHashtypeSignature(const valtype &vchSig) {
|
bool static IsDefinedHashtypeSignature(const valtype &vchSig) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue