mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
skip post-quantum keys if not supported
This commit is contained in:
parent
a40fa57ed4
commit
ecf19278e8
2 changed files with 22 additions and 12 deletions
|
@ -1022,10 +1022,15 @@ namespace client
|
|||
{
|
||||
try
|
||||
{
|
||||
i2p::data::CryptoKeyType preferredCryptoType = std::stoi(it1);
|
||||
if (!m_PreferredCryptoType && preferredCryptoType)
|
||||
m_PreferredCryptoType = preferredCryptoType; // first non-zero in the list
|
||||
encryptionKeyTypes.insert (preferredCryptoType);
|
||||
i2p::data::CryptoKeyType cryptoType = std::stoi(it1);
|
||||
#if !OPENSSL_PQ
|
||||
if (cryptoType <= i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD) // skip PQ keys if not supported
|
||||
#endif
|
||||
{
|
||||
if (!m_PreferredCryptoType && cryptoType)
|
||||
m_PreferredCryptoType = cryptoType; // first non-zero in the list
|
||||
encryptionKeyTypes.insert (cryptoType);
|
||||
}
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue