|
|
@ -334,6 +334,7 @@ namespace stream |
|
|
|
StreamingDestination::StreamingDestination (): m_LeaseSet (nullptr) |
|
|
|
StreamingDestination::StreamingDestination (): m_LeaseSet (nullptr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_Keys = i2p::data::CreateRandomKeys (); |
|
|
|
m_Keys = i2p::data::CreateRandomKeys (); |
|
|
|
|
|
|
|
|
|
|
|
m_IdentHash = m_Keys.pub.Hash (); |
|
|
|
m_IdentHash = m_Keys.pub.Hash (); |
|
|
|
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)); |
|
|
@ -349,6 +350,10 @@ 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); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_IdentHash = m_Keys.pub.Hash (); |
|
|
|
|
|
|
|
m_SigningPrivateKey.Initialize (i2p::crypto::dsap, i2p::crypto::dsaq, i2p::crypto::dsag, |
|
|
|
|
|
|
|
CryptoPP::Integer (m_Keys.signingPrivateKey, 20)); |
|
|
|
CryptoPP::DH dh (i2p::crypto::elgp, i2p::crypto::elgg); |
|
|
|
CryptoPP::DH dh (i2p::crypto::elgp, i2p::crypto::elgg); |
|
|
|
dh.GenerateKeyPair(i2p::context.GetRandomNumberGenerator (), m_EncryptionPrivateKey, m_EncryptionPublicKey); |
|
|
|
dh.GenerateKeyPair(i2p::context.GetRandomNumberGenerator (), m_EncryptionPrivateKey, m_EncryptionPublicKey); |
|
|
|
m_Pool = i2p::tunnel::tunnels.CreateTunnelPool (*this); |
|
|
|
m_Pool = i2p::tunnel::tunnels.CreateTunnelPool (*this); |
|
|
|