From d6b2b3c9964751f3082852e8a6573e2421a70c0f Mon Sep 17 00:00:00 2001
From: orignal <i2porignal@yandex.ru>
Date: Sun, 13 Jan 2019 08:34:34 -0500
Subject: [PATCH] take key type for LS2 from identity

---
 libi2pd/Destination.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libi2pd/Destination.cpp b/libi2pd/Destination.cpp
index 353cefd3..1f188fce 100644
--- a/libi2pd/Destination.cpp
+++ b/libi2pd/Destination.cpp
@@ -1038,7 +1038,7 @@ namespace client
 		{
 			// standard LS2 (type 3) assumed for now. TODO: implement others
 			leaseSet = new i2p::data::LocalLeaseSet2 (i2p::data::NETDB_STORE_TYPE_STANDARD_LEASESET2,
-				GetIdentity (), i2p::data::CRYPTO_KEY_TYPE_ELGAMAL, 256, m_EncryptionPublicKey, tunnels);
+				GetIdentity (), GetIdentity ()->GetCryptoKeyType (), 256, m_EncryptionPublicKey, tunnels);
 			// sign
 			Sign (leaseSet->GetBuffer () - 1, leaseSet->GetBufferLen () - leaseSet->GetSignatureLen () + 1, leaseSet->GetSignature ()); // + leading store type
 		}