diff options
author | patrick s <patrick.strateman@gmail.com> | 2013-08-29 01:11:47 -0700 |
---|---|---|
committer | patrick s <patrick.strateman@gmail.com> | 2013-08-29 01:11:47 -0700 |
commit | a42eef6f10e1da1c76e1c9ba49a2ff2459c62fea (patch) | |
tree | 22fe8dc0fdcf81e4af3050f5c1143f4f45dbbdfb /src | |
parent | 6e51b3bddf782f53527cf968445b298ebdec9bbc (diff) |
verify vchPubKey matches calculated public key unless fSkipCheck is set
Diffstat (limited to 'src')
-rw-r--r-- | src/key.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/key.cpp b/src/key.cpp index 0377140f79..fe5222378a 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -421,6 +421,12 @@ bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) { fCompressed = vchPubKey.IsCompressed(); fValid = true; + if (fSkipCheck) + return true; + + if (GetPubKey() != vchPubKey) + return false; + return true; } |