mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
always assume 20 bytes for signing private key
This commit is contained in:
6
I2CP.cpp
6
I2CP.cpp
@@ -15,6 +15,7 @@
|
|||||||
#include "LeaseSet.h"
|
#include "LeaseSet.h"
|
||||||
#include "ClientContext.h"
|
#include "ClientContext.h"
|
||||||
#include "Transports.h"
|
#include "Transports.h"
|
||||||
|
#include "Signature.h"
|
||||||
#include "I2CP.h"
|
#include "I2CP.h"
|
||||||
|
|
||||||
namespace i2p
|
namespace i2p
|
||||||
@@ -361,7 +362,10 @@ namespace client
|
|||||||
size_t offset = 2;
|
size_t offset = 2;
|
||||||
if (m_Destination)
|
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);
|
m_Destination->SetEncryptionPrivateKey (buf + offset);
|
||||||
offset += 256;
|
offset += 256;
|
||||||
m_Destination->LeaseSetCreated (buf + offset, len - offset);
|
m_Destination->LeaseSetCreated (buf + offset, len - offset);
|
||||||
|
|||||||
Reference in New Issue
Block a user