|
|
@ -223,16 +223,8 @@ namespace garlic |
|
|
|
switch (blk) |
|
|
|
switch (blk) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case eECIESx25519BlkGalicClove: |
|
|
|
case eECIESx25519BlkGalicClove: |
|
|
|
GetOwner ()->HandleECIESx25519GarlicClove (buf + offset, size); |
|
|
|
if (GetOwner ()) |
|
|
|
break; |
|
|
|
GetOwner ()->HandleECIESx25519GarlicClove (buf + offset, size); |
|
|
|
case eECIESx25519BlkDateTime: |
|
|
|
|
|
|
|
LogPrint (eLogDebug, "Garlic: datetime"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case eECIESx25519BlkOptions: |
|
|
|
|
|
|
|
LogPrint (eLogDebug, "Garlic: options"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case eECIESx25519BlkPadding: |
|
|
|
|
|
|
|
LogPrint (eLogDebug, "Garlic: padding"); |
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
case eECIESx25519BlkNextKey: |
|
|
|
case eECIESx25519BlkNextKey: |
|
|
|
LogPrint (eLogDebug, "Garlic: next key"); |
|
|
|
LogPrint (eLogDebug, "Garlic: next key"); |
|
|
@ -256,6 +248,21 @@ namespace garlic |
|
|
|
m_AckRequests.push_back ({receiveTagset->GetTagSetID (), index}); |
|
|
|
m_AckRequests.push_back ({receiveTagset->GetTagSetID (), index}); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
case eECIESx25519BlkTermination: |
|
|
|
|
|
|
|
LogPrint (eLogDebug, "Garlic: termination"); |
|
|
|
|
|
|
|
if (GetOwner ()) |
|
|
|
|
|
|
|
GetOwner ()->RemoveECIESx25519Session (m_RemoteStaticKey); |
|
|
|
|
|
|
|
if (receiveTagset) receiveTagset->Expire (); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case eECIESx25519BlkDateTime: |
|
|
|
|
|
|
|
LogPrint (eLogDebug, "Garlic: datetime"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case eECIESx25519BlkOptions: |
|
|
|
|
|
|
|
LogPrint (eLogDebug, "Garlic: options"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case eECIESx25519BlkPadding: |
|
|
|
|
|
|
|
LogPrint (eLogDebug, "Garlic: padding"); |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
LogPrint (eLogWarning, "Garlic: Unknown block type ", (int)blk); |
|
|
|
LogPrint (eLogWarning, "Garlic: Unknown block type ", (int)blk); |
|
|
|
} |
|
|
|
} |
|
|
@ -852,7 +859,7 @@ namespace garlic |
|
|
|
CleanupUnconfirmedLeaseSet (ts); |
|
|
|
CleanupUnconfirmedLeaseSet (ts); |
|
|
|
return ts > m_LastActivityTimestamp + ECIESX25519_EXPIRATION_TIMEOUT; |
|
|
|
return ts > m_LastActivityTimestamp + ECIESX25519_EXPIRATION_TIMEOUT; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
std::shared_ptr<I2NPMessage> WrapECIESX25519AEADRatchetMessage (std::shared_ptr<const I2NPMessage> msg, const uint8_t * key, uint64_t tag) |
|
|
|
std::shared_ptr<I2NPMessage> WrapECIESX25519AEADRatchetMessage (std::shared_ptr<const I2NPMessage> msg, const uint8_t * key, uint64_t tag) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto m = NewI2NPMessage (); |
|
|
|
auto m = NewI2NPMessage (); |
|
|
|