fail immediately on an empty signature

Github-Pull: #5634
Rebased-From: 8dccba6a45
This commit is contained in:
Cory Fields
2015-01-10 09:14:17 +01:00
committed by Wladimir J. van der Laan
parent f4134ee301
commit 91e1332011

View File

@@ -376,6 +376,9 @@ bool CKey::SetCompactSignature(uint256 hash, const std::vector<unsigned char>& v
bool CKey::Verify(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();