mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-08 22:57:52 +00:00
don't copy private keys
This commit is contained in:
parent
d83fc3181b
commit
11f5db871f
@ -257,7 +257,7 @@ namespace transport
|
|||||||
|
|
||||||
void NTCPSession::SendPhase3 ()
|
void NTCPSession::SendPhase3 ()
|
||||||
{
|
{
|
||||||
auto keys = i2p::context.GetPrivateKeys ();
|
auto& keys = i2p::context.GetPrivateKeys ();
|
||||||
uint8_t * buf = m_ReceiveBuffer;
|
uint8_t * buf = m_ReceiveBuffer;
|
||||||
htobe16buf (buf, keys.GetPublic ()->GetFullLen ());
|
htobe16buf (buf, keys.GetPublic ()->GetFullLen ());
|
||||||
buf += 2;
|
buf += 2;
|
||||||
@ -403,7 +403,7 @@ namespace transport
|
|||||||
s.Insert (m_RemoteIdentity->GetIdentHash (), 32); // ident
|
s.Insert (m_RemoteIdentity->GetIdentHash (), 32); // ident
|
||||||
s.Insert (tsA); // tsA
|
s.Insert (tsA); // tsA
|
||||||
s.Insert (tsB); // tsB
|
s.Insert (tsB); // tsB
|
||||||
auto keys = i2p::context.GetPrivateKeys ();
|
auto& keys = i2p::context.GetPrivateKeys ();
|
||||||
auto signatureLen = keys.GetPublic ()->GetSignatureLen ();
|
auto signatureLen = keys.GetPublic ()->GetSignatureLen ();
|
||||||
s.Sign (keys, m_ReceiveBuffer);
|
s.Sign (keys, m_ReceiveBuffer);
|
||||||
size_t paddingSize = signatureLen & 0x0F; // %16
|
size_t paddingSize = signatureLen & 0x0F; // %16
|
||||||
|
Loading…
Reference in New Issue
Block a user