mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
Noise XK for SSU2
This commit is contained in:
parent
1e019157bb
commit
450266818a
4 changed files with 32 additions and 3 deletions
|
@ -6,6 +6,7 @@
|
|||
* See full license text in LICENSE file at top of project tree
|
||||
*/
|
||||
|
||||
#include "Transports.h"
|
||||
#include "SSU2.h"
|
||||
|
||||
namespace i2p
|
||||
|
@ -16,6 +17,13 @@ namespace transport
|
|||
std::shared_ptr<const i2p::data::RouterInfo::Address> addr, bool peerTest):
|
||||
TransportSession (in_RemoteRouter, SSU2_TERMINATION_TIMEOUT)
|
||||
{
|
||||
m_NoiseState.reset (new i2p::crypto::NoiseSymmetricState);
|
||||
if (in_RemoteRouter && addr)
|
||||
{
|
||||
// outgoing
|
||||
if (addr->ntcp2) // TODO: should be SSU
|
||||
InitNoiseXKState1 (*m_NoiseState, addr->ntcp2->staticKey);
|
||||
}
|
||||
}
|
||||
|
||||
SSU2Session::~SSU2Session ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue