mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
parent
67ef7b888c
commit
7cc4cfbe7b
1 changed files with 5 additions and 2 deletions
|
@ -426,7 +426,8 @@ readYb (tr_handshake * handshake, struct evbuffer * inbuf)
|
||||||
|
|
||||||
/* compute the secret */
|
/* compute the secret */
|
||||||
evbuffer_remove (inbuf, yb, KEY_LEN);
|
evbuffer_remove (inbuf, yb, KEY_LEN);
|
||||||
tr_cryptoComputeSecret (handshake->crypto, yb);
|
if (!tr_cryptoComputeSecret (handshake->crypto, yb))
|
||||||
|
return tr_handshakeDone (handshake, false);
|
||||||
|
|
||||||
/* now send these: HASH ('req1', S), HASH ('req2', SKEY) xor HASH ('req3', S),
|
/* now send these: HASH ('req1', S), HASH ('req2', SKEY) xor HASH ('req3', S),
|
||||||
* ENCRYPT (VC, crypto_provide, len (PadC), PadC, len (IA)), ENCRYPT (IA) */
|
* ENCRYPT (VC, crypto_provide, len (PadC), PadC, len (IA)), ENCRYPT (IA) */
|
||||||
|
@ -742,7 +743,9 @@ readYa (tr_handshake * handshake,
|
||||||
|
|
||||||
/* read the incoming peer's public key */
|
/* read the incoming peer's public key */
|
||||||
evbuffer_remove (inbuf, ya, KEY_LEN);
|
evbuffer_remove (inbuf, ya, KEY_LEN);
|
||||||
tr_cryptoComputeSecret (handshake->crypto, ya);
|
if (!tr_cryptoComputeSecret (handshake->crypto, ya))
|
||||||
|
return tr_handshakeDone (handshake, false);
|
||||||
|
|
||||||
computeRequestHash (handshake, "req1", handshake->myReq1);
|
computeRequestHash (handshake, "req1", handshake->myReq1);
|
||||||
|
|
||||||
/* send our public key to the peer */
|
/* send our public key to the peer */
|
||||||
|
|
Loading…
Reference in a new issue