From 21a77269162c9a88ab30959dd05616d1a88ecbb5 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 11 Oct 2026 20:08:00 -0400 Subject: [PATCH] don't handle LeaseSet1 coming from ECIESx25519 session --- libi2pd/Destination.cpp | 2 +- libi2pd/LeaseSet.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libi2pd/Destination.cpp b/libi2pd/Destination.cpp index dc1d01cd..15babbbe 100644 --- a/libi2pd/Destination.cpp +++ b/libi2pd/Destination.cpp @@ -455,7 +455,7 @@ namespace client if (buf[DATABASE_STORE_TYPE_OFFSET] == i2p::data::NETDB_STORE_TYPE_LEASESET) { leaseSet = std::make_shared (buf + offset, len - offset); // LeaseSet - if (!SupportsEncryptionType (i2p::data::CRYPTO_KEY_TYPE_ELGAMAL)) + if (!SupportsEncryptionType (i2p::data::CRYPTO_KEY_TYPE_ELGAMAL) || from) // LeaseSet1 can't come from ECIESx25519 session leaseSet->SetIsIncompatibleCrypto (true); } else diff --git a/libi2pd/LeaseSet.cpp b/libi2pd/LeaseSet.cpp index 9d1329b7..e26c6269 100644 --- a/libi2pd/LeaseSet.cpp +++ b/libi2pd/LeaseSet.cpp @@ -252,7 +252,7 @@ namespace data void LeaseSet::Encrypt (const uint8_t * data, uint8_t * encrypted) const { - if (!m_EncryptionKey) return; + if (!m_EncryptionKey || !data || !encrypted) return; auto encryptor = m_Identity->CreateEncryptor (m_EncryptionKey); if (encryptor) encryptor->Encrypt (data, encrypted);