Browse Source

verify vchPubKey matches calculated public key unless fSkipCheck is set

0.10
patrick s 11 years ago
parent
commit
a42eef6f10
  1. 6
      src/key.cpp

6
src/key.cpp

@ -421,6 +421,12 @@ bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) {
fCompressed = vchPubKey.IsCompressed(); fCompressed = vchPubKey.IsCompressed();
fValid = true; fValid = true;
if (fSkipCheck)
return true;
if (GetPubKey() != vchPubKey)
return false;
return true; return true;
} }

Loading…
Cancel
Save