mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 06:54:15 +00:00
correct timestamp size for peer test message
This commit is contained in:
parent
0cf9478cd4
commit
38d6c29ce9
@ -1614,15 +1614,15 @@ namespace transport
|
|||||||
signedData[0] = 2; // ver
|
signedData[0] = 2; // ver
|
||||||
htobe32buf (signedData + 1, nonce);
|
htobe32buf (signedData + 1, nonce);
|
||||||
htobe32buf (signedData + 5, ts);
|
htobe32buf (signedData + 5, ts);
|
||||||
size_t asz = CreateEndpoint (signedData + 7, 86, boost::asio::ip::udp::endpoint (localAddress->host, localAddress->port));
|
size_t asz = CreateEndpoint (signedData + 10, 86, boost::asio::ip::udp::endpoint (localAddress->host, localAddress->port));
|
||||||
signedData[6] = asz;
|
signedData[9] = asz;
|
||||||
// signature
|
// signature
|
||||||
SignedData s;
|
SignedData s;
|
||||||
s.Insert ((const uint8_t *)"PeerTestValidate", 16); // prologue
|
s.Insert ((const uint8_t *)"PeerTestValidate", 16); // prologue
|
||||||
s.Insert (GetRemoteIdentity ()->GetIdentHash (), 32); // bhash
|
s.Insert (GetRemoteIdentity ()->GetIdentHash (), 32); // bhash
|
||||||
s.Insert (signedData, 7 + asz); // ver, nonce, ts, asz, Alice's endpoint
|
s.Insert (signedData, 10 + asz); // ver, nonce, ts, asz, Alice's endpoint
|
||||||
s.Sign (i2p::context.GetPrivateKeys (), signedData + 7 + asz);
|
s.Sign (i2p::context.GetPrivateKeys (), signedData + 10 + asz);
|
||||||
return CreatePeerTestBlock (buf, len, 1, nullptr, signedData, 7 + asz + i2p::context.GetIdentity ()->GetSignatureLen ());
|
return CreatePeerTestBlock (buf, len, 1, nullptr, signedData, 10 + asz + i2p::context.GetIdentity ()->GetSignatureLen ());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<const i2p::data::RouterInfo> SSU2Session::ExtractRouterInfo (const uint8_t * buf, size_t size)
|
std::shared_ptr<const i2p::data::RouterInfo> SSU2Session::ExtractRouterInfo (const uint8_t * buf, size_t size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user