Merge #7500: Correctly report high-S violations

9d95187 Correctly report high-S violations (Pieter Wuille)
This commit is contained in:
Wladimir J. van der Laan 2016-02-10 20:31:43 +01:00
commit 2f3f4af4cc
No known key found for this signature in database
GPG key ID: 74810B012346C9A6

View file

@ -165,7 +165,10 @@ bool static IsLowDERSignature(const valtype &vchSig, ScriptError* serror) {
return set_error(serror, SCRIPT_ERR_SIG_DER);
}
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) {