From 37fc21f3cf2dce4d1fb9f8ebcfc5fda8f90c423a Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 8 Jun 2016 09:33:25 -0400 Subject: [PATCH] always assume 20 bytes for signing private key --- I2CP.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/I2CP.cpp b/I2CP.cpp index 44abdf8b..ec06895f 100644 --- a/I2CP.cpp +++ b/I2CP.cpp @@ -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);