|
|
@ -144,7 +144,10 @@ public: |
|
|
|
if (bn == NULL) |
|
|
|
if (bn == NULL) |
|
|
|
throw key_error("CKey::SetSecret() : BN_bin2bn failed"); |
|
|
|
throw key_error("CKey::SetSecret() : BN_bin2bn failed"); |
|
|
|
if (!EC_KEY_regenerate_key(pkey,bn)) |
|
|
|
if (!EC_KEY_regenerate_key(pkey,bn)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
BN_clear_free(bn); |
|
|
|
throw key_error("CKey::SetSecret() : EC_KEY_regenerate_key failed"); |
|
|
|
throw key_error("CKey::SetSecret() : EC_KEY_regenerate_key failed"); |
|
|
|
|
|
|
|
} |
|
|
|
BN_clear_free(bn); |
|
|
|
BN_clear_free(bn); |
|
|
|
fSet = true; |
|
|
|
fSet = true; |
|
|
|
if (fCompressed || fCompressedPubKey) |
|
|
|
if (fCompressed || fCompressedPubKey) |
|
|
|