1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-27 09:04:15 +00:00

always assume 20 bytes for signing private key

This commit is contained in:
orignal 2016-06-08 09:33:25 -04:00
parent 5e068c3af5
commit 37fc21f3cf

View File

@ -15,6 +15,7 @@
#include "LeaseSet.h"
#include "ClientContext.h"
#include "Transports.h"
#include "Signature.h"
#include "I2CP.h"
namespace i2p
@ -361,7 +362,10 @@ namespace client
size_t offset = 2;
if (m_Destination)
{
offset += m_Destination->GetIdentity ()->GetSigningPrivateKeyLen (); // skip signing private key
offset += i2p::crypto::DSA_PRIVATE_KEY_LENGTH; // skip signing private key
// we always assume this field as 20 bytes (DSA) regardless actual size
// instead of
//offset += m_Destination->GetIdentity ()->GetSigningPrivateKeyLen ();
m_Destination->SetEncryptionPrivateKey (buf + offset);
offset += 256;
m_Destination->LeaseSetCreated (buf + offset, len - offset);