mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
correct signed content for peer test msg 3
This commit is contained in:
parent
821987fed7
commit
ae77d4ad22
|
@ -1525,11 +1525,12 @@ namespace transport
|
|||
// sign with Charlie's key
|
||||
uint8_t asz = buf[offset + 9];
|
||||
std::vector<uint8_t> newSignedData (asz + 10 + i2p::context.GetIdentity ()->GetSignatureLen ());
|
||||
memcpy (newSignedData.data (), buf + offset, asz + 10);
|
||||
SignedData s;
|
||||
s.Insert ((const uint8_t *)"PeerTestValidate", 16); // prologue
|
||||
s.Insert (GetRemoteIdentity ()->GetIdentHash (), 32); // bhash
|
||||
s.Insert (buf + 3, 32); // ahash
|
||||
s.Insert (buf + offset, asz + 10); // ver, nonce, ts, asz, Alice's endpoint
|
||||
s.Insert (newSignedData.data (), asz + 10); // ver, nonce, ts, asz, Alice's endpoint
|
||||
s.Sign (i2p::context.GetPrivateKeys (), newSignedData.data () + 10 + asz);
|
||||
// send response (msg 3) back and msg 5 if accepted
|
||||
SSU2PeerTestCode code = eSSU2PeerTestCodeAccept;
|
||||
|
|
Loading…
Reference in a new issue