Add key generation/verification to ECC sanity check
This commit is contained in:
parent
d0c41a7350
commit
f321d6bfff
10
src/key.cpp
10
src/key.cpp
@ -201,5 +201,13 @@ void CExtKey::Decode(const unsigned char code[74]) {
|
||||
}
|
||||
|
||||
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…
Reference in New Issue
Block a user