don't calculate checsum for Data message send through ECIESX25519AEADRatchet session

This commit is contained in:
orignal 2020-05-02 11:13:40 -04:00
parent c49e544781
commit e301387896
6 changed files with 15 additions and 11 deletions

View file

@ -39,14 +39,14 @@ namespace i2p
return (len < I2NP_MAX_SHORT_MESSAGE_SIZE - I2NP_HEADER_SIZE - 2) ? NewI2NPShortMessage () : NewI2NPMessage ();
}
void I2NPMessage::FillI2NPMessageHeader (I2NPMessageType msgType, uint32_t replyMsgID)
void I2NPMessage::FillI2NPMessageHeader (I2NPMessageType msgType, uint32_t replyMsgID, bool checksum)
{
SetTypeID (msgType);
if (!replyMsgID) RAND_bytes ((uint8_t *)&replyMsgID, 4);
SetMsgID (replyMsgID);
SetExpiration (i2p::util::GetMillisecondsSinceEpoch () + I2NP_MESSAGE_EXPIRATION_TIMEOUT);
UpdateSize ();
UpdateChks ();
if (checksum) UpdateChks ();
}
void I2NPMessage::RenewI2NPMessageHeader ()