1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-08-31 05:51:53 +00:00

drop crypto types higher than ours

This commit is contained in:
orignal 2025-06-07 12:06:47 -04:00
parent 6363c9202f
commit 9c393f50da

View File

@ -417,7 +417,7 @@ namespace data
if (keyType <= i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD) // skip PQ keys if not supported if (keyType <= i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD) // skip PQ keys if not supported
#endif #endif
{ {
if (keyType == preferredKeyType || !m_Encryptor || (keyType > m_EncryptionType && keyType < preferredKeyType)) if (keyType <= preferredKeyType && (!m_Encryptor || keyType > m_EncryptionType))
{ {
auto encryptor = i2p::data::IdentityEx::CreateEncryptor (keyType, buf + offset); auto encryptor = i2p::data::IdentityEx::CreateEncryptor (keyType, buf + offset);
if (encryptor) if (encryptor)