mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
rollback due the race condition
This commit is contained in:
parent
3bbe1e9c0c
commit
89d69a5d5a
@ -270,10 +270,9 @@ namespace crypto
|
|||||||
{
|
{
|
||||||
if (m_IsUpdated)
|
if (m_IsUpdated)
|
||||||
{
|
{
|
||||||
const BIGNUM * priv_key, * pub_key;
|
// TODO: seems race condition here
|
||||||
DH_get0_key (m_DH, &pub_key, &priv_key);
|
bn2buf (m_DH->pub_key, m_PublicKey, 256);
|
||||||
bn2buf (pub_key, m_PublicKey, 256);
|
BN_free (m_DH->pub_key); m_DH->pub_key = NULL;
|
||||||
DH_set0_key (m_DH, NULL, NULL);
|
|
||||||
m_IsUpdated= false;
|
m_IsUpdated= false;
|
||||||
}
|
}
|
||||||
return m_PublicKey;
|
return m_PublicKey;
|
||||||
|
Loading…
Reference in New Issue
Block a user