X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fkey.cpp;h=18b467204353bc88681225f35259c339c6ce5d89;hb=23e7583a8c9a0dcee9cbbf3be8bfc453298773f0;hp=ece835d1472412b02841dcedc03043b02f4bb24f;hpb=4aa8021a9651257605e8c16df2973eee8aebe575;p=novacoin.git diff --git a/src/key.cpp b/src/key.cpp index ece835d..18b4672 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -1,11 +1,14 @@ // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include #include #include #include "key.h" +#include "util.h" // Generate a private key from just the secret parameter int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key) @@ -352,6 +355,7 @@ bool CKey::Verify(uint256 hash, const std::vector& vchSig) // -1 = error, 0 = bad sig, 1 = good if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1) return false; + return true; } @@ -362,6 +366,7 @@ bool CKey::VerifyCompact(uint256 hash, const std::vector& vchSig) return false; if (GetPubKey() != key.GetPubKey()) return false; + return true; }