mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-09-17 01:34:45 +00:00
delete ECDSA private key BIGNUM if non-openssl or older openssl crypto library
This commit is contained in:
+6
-1
@@ -285,7 +285,12 @@ namespace crypto
|
||||
ECDSASigner (const uint8_t * signingPrivateKey)
|
||||
{
|
||||
m_PrivateKey = EC_KEY_new_by_curve_name (curve);
|
||||
EC_KEY_set_private_key (m_PrivateKey, BN_bin2bn (signingPrivateKey, keyLen/2, NULL));
|
||||
BIGNUM * privKey = BN_bin2bn (signingPrivateKey, keyLen/2, nullptr);
|
||||
if (priKey)
|
||||
{
|
||||
EC_KEY_set_private_key (m_PrivateKey, privKey);
|
||||
BN_free (privKey);
|
||||
}
|
||||
}
|
||||
|
||||
~ECDSASigner ()
|
||||
|
||||
Reference in New Issue
Block a user