mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-07-29 02:17:19 +02:00
correct NSR size
This commit is contained in:
parent
bbfe81cb79
commit
58818514e7
1 changed files with 5 additions and 1 deletions
|
@ -985,13 +985,17 @@ namespace garlic
|
||||||
len += 72;
|
len += 72;
|
||||||
#if OPENSSL_PQ
|
#if OPENSSL_PQ
|
||||||
if (m_RemoteStaticKeyType >= i2p::data::CRYPTO_KEY_TYPE_ECIES_MLKEM512_X25519_AEAD)
|
if (m_RemoteStaticKeyType >= i2p::data::CRYPTO_KEY_TYPE_ECIES_MLKEM512_X25519_AEAD)
|
||||||
len += i2p::crypto::GetMLKEMPublicKeyLen (m_RemoteStaticKeyType) + 16;
|
len += i2p::crypto::GetMLKEMCipherTextLen (m_RemoteStaticKeyType) + 16;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case eSessionStateNewSessionReplySent:
|
case eSessionStateNewSessionReplySent:
|
||||||
if (!NextNewSessionReplyMessage (payload, len, buf, m->maxLen))
|
if (!NextNewSessionReplyMessage (payload, len, buf, m->maxLen))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
len += 72;
|
len += 72;
|
||||||
|
#if OPENSSL_PQ
|
||||||
|
if (m_RemoteStaticKeyType >= i2p::data::CRYPTO_KEY_TYPE_ECIES_MLKEM512_X25519_AEAD)
|
||||||
|
len += i2p::crypto::GetMLKEMCipherTextLen (m_RemoteStaticKeyType) + 16;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case eSessionStateOneTime:
|
case eSessionStateOneTime:
|
||||||
if (!NewOutgoingSessionMessage (payload, len, buf, m->maxLen, false))
|
if (!NewOutgoingSessionMessage (payload, len, buf, m->maxLen, false))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue