mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-13 02:34:00 +01:00
fail immediately on an empty signature
Github-Pull: #5634
Rebased-From: 8dccba6a45
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
2d375fe97b
commit
76ce5c8de3
@@ -117,6 +117,9 @@ bool CECKey::SetPubKey(const unsigned char* pubkey, size_t size) {
|
||||
}
|
||||
|
||||
bool CECKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
|
||||
if (vchSig.empty())
|
||||
return false;
|
||||
|
||||
// New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
|
||||
unsigned char *norm_der = NULL;
|
||||
ECDSA_SIG *norm_sig = ECDSA_SIG_new();
|
||||
|
||||
Reference in New Issue
Block a user