diff --git a/libi2pd/LeaseSet.cpp b/libi2pd/LeaseSet.cpp index 497a562f..f2355930 100644 --- a/libi2pd/LeaseSet.cpp +++ b/libi2pd/LeaseSet.cpp @@ -21,7 +21,7 @@ namespace data ReadFromBuffer (); } - void LeaseSet::Update (const uint8_t * buf, size_t len) + void LeaseSet::Update (const uint8_t * buf, size_t len, bool verifySignature) { if (len > m_BufferLen) { @@ -31,7 +31,7 @@ namespace data } memcpy (m_Buffer, buf, len); m_BufferLen = len; - ReadFromBuffer (false, false); // we assume signature is verified already + ReadFromBuffer (false, verifySignature); } void LeaseSet::PopulateLeases () diff --git a/libi2pd/LeaseSet.h b/libi2pd/LeaseSet.h index 9839361e..391a3b79 100644 --- a/libi2pd/LeaseSet.h +++ b/libi2pd/LeaseSet.h @@ -57,7 +57,7 @@ namespace data LeaseSet (const uint8_t * buf, size_t len, bool storeLeases = true); ~LeaseSet () { delete[] m_Buffer; }; - void Update (const uint8_t * buf, size_t len); + void Update (const uint8_t * buf, size_t len, bool verifySignature = true); bool IsNewer (const uint8_t * buf, size_t len) const; void PopulateLeases (); // from buffer diff --git a/libi2pd/NetDb.cpp b/libi2pd/NetDb.cpp index b5e20628..b136dfd5 100644 --- a/libi2pd/NetDb.cpp +++ b/libi2pd/NetDb.cpp @@ -242,7 +242,7 @@ namespace data { if(it->second->GetExpirationTime() < expires) { - it->second->Update (buf, len); + it->second->Update (buf, len, false); // signature is verified already LogPrint (eLogInfo, "NetDb: LeaseSet updated: ", ident.ToBase32()); updated = true; }