|
|
@ -1,5 +1,6 @@ |
|
|
|
#include <fstream> |
|
|
|
#include <fstream> |
|
|
|
#include <algorithm> |
|
|
|
#include <algorithm> |
|
|
|
|
|
|
|
#include <cryptopp/dh.h> |
|
|
|
#include <cryptopp/gzip.h> |
|
|
|
#include <cryptopp/gzip.h> |
|
|
|
#include "Log.h" |
|
|
|
#include "Log.h" |
|
|
|
#include "RouterInfo.h" |
|
|
|
#include "RouterInfo.h" |
|
|
@ -347,6 +348,8 @@ namespace stream |
|
|
|
m_IdentHash = i2p::data::CalculateIdentHash (m_Keys.pub); |
|
|
|
m_IdentHash = i2p::data::CalculateIdentHash (m_Keys.pub); |
|
|
|
m_SigningPrivateKey.Initialize (i2p::crypto::dsap, i2p::crypto::dsaq, i2p::crypto::dsag, |
|
|
|
m_SigningPrivateKey.Initialize (i2p::crypto::dsap, i2p::crypto::dsaq, i2p::crypto::dsag, |
|
|
|
CryptoPP::Integer (m_Keys.signingPrivateKey, 20)); |
|
|
|
CryptoPP::Integer (m_Keys.signingPrivateKey, 20)); |
|
|
|
|
|
|
|
CryptoPP::DH dh (i2p::crypto::elgp, i2p::crypto::elgg); |
|
|
|
|
|
|
|
dh.GenerateKeyPair(i2p::context.GetRandomNumberGenerator (), m_EncryptionPrivateKey, m_EncryptionPublicKey); |
|
|
|
m_Pool = i2p::tunnel::tunnels.CreateTunnelPool (*this); |
|
|
|
m_Pool = i2p::tunnel::tunnels.CreateTunnelPool (*this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -357,6 +360,8 @@ namespace stream |
|
|
|
s.read ((char *)&m_Keys, sizeof (m_Keys)); |
|
|
|
s.read ((char *)&m_Keys, sizeof (m_Keys)); |
|
|
|
else |
|
|
|
else |
|
|
|
LogPrint ("Can't open file ", fullPath); |
|
|
|
LogPrint ("Can't open file ", fullPath); |
|
|
|
|
|
|
|
CryptoPP::DH dh (i2p::crypto::elgp, i2p::crypto::elgg); |
|
|
|
|
|
|
|
dh.GenerateKeyPair(i2p::context.GetRandomNumberGenerator (), m_EncryptionPrivateKey, m_EncryptionPublicKey); |
|
|
|
m_Pool = i2p::tunnel::tunnels.CreateTunnelPool (*this); |
|
|
|
m_Pool = i2p::tunnel::tunnels.CreateTunnelPool (*this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|