mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-12 08:08:25 +00:00
fail immediately on an empty signature
This commit is contained in:
parent
dad7764a9d
commit
8dccba6a45
@ -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) {
|
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.
|
// New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
|
||||||
unsigned char *norm_der = NULL;
|
unsigned char *norm_der = NULL;
|
||||||
ECDSA_SIG *norm_sig = ECDSA_SIG_new();
|
ECDSA_SIG *norm_sig = ECDSA_SIG_new();
|
||||||
|
Loading…
Reference in New Issue
Block a user