mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-08-29 03:18:28 +00:00
set preferred crypto if i2cp.leaseSetEncType is not specified
This commit is contained in:
@@ -1013,13 +1013,20 @@ namespace client
|
||||
}
|
||||
}
|
||||
}
|
||||
// if no param or valid crypto type use from identity
|
||||
// if no encryption type specified use 0,4 or 0,4,6 if post quantum
|
||||
if (encryptionKeyTypes.empty ())
|
||||
{
|
||||
encryptionKeyTypes.insert ( { GetIdentity ()->GetCryptoKeyType (),
|
||||
#if OPENSSL_PQ
|
||||
i2p::data::CRYPTO_KEY_TYPE_ECIES_MLKEM768_X25519_AEAD,
|
||||
#endif
|
||||
i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD }); // usually 0,4 or 0,6,4 if post quantum
|
||||
i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD });
|
||||
#if OPENSSL_PQ
|
||||
m_PreferredCryptoType = i2p::data::CRYPTO_KEY_TYPE_ECIES_MLKEM768_X25519_AEAD;
|
||||
#else
|
||||
m_PreferredCryptoType = i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD;
|
||||
#endif
|
||||
}
|
||||
|
||||
for (auto& it: encryptionKeyTypes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user