mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
don't detach ECIESx25519 session from destination
This commit is contained in:
parent
bc4a97774f
commit
b1262d54de
6 changed files with 29 additions and 14 deletions
|
@ -94,15 +94,20 @@ namespace garlic
|
|||
m_ItermediateSymmKeys.erase (index);
|
||||
}
|
||||
|
||||
void RatchetTagSet::Expire ()
|
||||
void ReceiveRatchetTagSet::Expire ()
|
||||
{
|
||||
if (!m_ExpirationTimestamp)
|
||||
m_ExpirationTimestamp = i2p::util::GetSecondsSinceEpoch () + ECIESX25519_PREVIOUS_TAGSET_EXPIRATION_TIMEOUT;
|
||||
}
|
||||
|
||||
bool ReceiveRatchetTagSet::IsExpired (uint64_t ts) const
|
||||
{
|
||||
return m_ExpirationTimestamp && ts > m_ExpirationTimestamp;
|
||||
}
|
||||
|
||||
bool ReceiveRatchetTagSet::IsIndexExpired (int index) const
|
||||
{
|
||||
return index < m_TrimBehindIndex || !m_Session || !m_Session->GetOwner ();
|
||||
return index < m_TrimBehindIndex || !m_Session || m_Session->IsTerminated ();
|
||||
}
|
||||
|
||||
bool ReceiveRatchetTagSet::HandleNextMessage (uint8_t * buf, size_t len, int index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue