1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 12:24:19 +00:00

correct header decryption for Data message

This commit is contained in:
orignal 2022-03-25 17:57:59 -04:00
parent 44735681af
commit 56b6de6962

View File

@ -530,7 +530,8 @@ namespace transport
void SSU2Session::ProcessData (uint8_t * buf, size_t len) void SSU2Session::ProcessData (uint8_t * buf, size_t len)
{ {
Header header; Header header;
memcpy (header.buf, buf, 16); header.ll[0] = m_SourceConnID;
memcpy (header.buf + 8, buf + 8, 8);
header.ll[1] ^= CreateHeaderMask (m_KeyDataReceive + 32, buf + (len - 12)); header.ll[1] ^= CreateHeaderMask (m_KeyDataReceive + 32, buf + (len - 12));
if (header.h.type != eSSU2Data) if (header.h.type != eSSU2Data)
{ {