check if session expired before generating more tags

This commit is contained in:
orignal 2020-11-26 09:15:45 -05:00
parent 1c5b350c2b
commit c833b16544

View file

@ -1010,10 +1010,13 @@ namespace garlic
} }
void ECIESX25519AEADRatchetSession::GenerateMoreReceiveTags (std::shared_ptr<RatchetTagSet> receiveTagset, int numTags) void ECIESX25519AEADRatchetSession::GenerateMoreReceiveTags (std::shared_ptr<RatchetTagSet> receiveTagset, int numTags)
{
if (GetOwner ())
{ {
for (int i = 0; i < numTags; i++) for (int i = 0; i < numTags; i++)
GetOwner ()->AddECIESx25519SessionNextTag (receiveTagset); GetOwner ()->AddECIESx25519SessionNextTag (receiveTagset);
} }
}
bool ECIESX25519AEADRatchetSession::CheckExpired (uint64_t ts) bool ECIESX25519AEADRatchetSession::CheckExpired (uint64_t ts)
{ {