Browse Source

Add key generation/verification to ECC sanity check

0.10
Pieter Wuille 10 years ago
parent
commit
f321d6bfff
  1. 10
      src/key.cpp

10
src/key.cpp

@ -201,5 +201,13 @@ void CExtKey::Decode(const unsigned char code[74]) {
} }
bool ECC_InitSanityCheck() { bool ECC_InitSanityCheck() {
return CECKey::SanityCheck(); #if !defined(USE_SECP256K1)
if (!CECKey::SanityCheck()) {
return false;
}
#endif
CKey key;
key.MakeNewKey(true);
CPubKey pubkey = key.GetPubKey();
return key.VerifyPubKey(pubkey);
} }

Loading…
Cancel
Save