mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
check garlic message payload hash
This commit is contained in:
parent
075650b6d3
commit
bc9b355d5d
3 changed files with 25 additions and 12 deletions
|
@ -163,7 +163,7 @@ namespace stream
|
|||
size++; // resend delay
|
||||
*(uint16_t *)(packet + size) = 0; // nof flags set
|
||||
size += 2; // flags
|
||||
*(uint16_t *)(packet + size) = 0; // nof flags set
|
||||
*(uint16_t *)(packet + size) = 0; // no options
|
||||
size += 2; // options size
|
||||
|
||||
I2NPMessage * msg = i2p::garlic::routing.WrapSingleMessage (m_RemoteLeaseSet,
|
||||
|
@ -207,7 +207,7 @@ namespace stream
|
|||
size++; // resend delay
|
||||
*(uint16_t *)(packet + size) = PACKET_FLAG_CLOSE | PACKET_FLAG_SIGNATURE_INCLUDED;
|
||||
size += 2; // flags
|
||||
*(uint16_t *)(packet + size) = 40; // 40 bytes signature
|
||||
*(uint16_t *)(packet + size) = htobe16 (40); // 40 bytes signature
|
||||
size += 2; // options size
|
||||
uint8_t * signature = packet + size;
|
||||
memset (packet + size, 0, 40);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue