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

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