From f0b342973656ced59955be083435b5f59736bae0 Mon Sep 17 00:00:00 2001 From: Sergey Popov Date: Tue, 10 Jan 2017 18:31:24 +0300 Subject: net-p2p/transmission: revision bump Backport upstream fix for handshaking. Committed straight to stable Package-Manager: portage-2.3.3 RepoMan-Options: --force --- .../files/transmission-2.92-handshake.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 net-p2p/transmission/files/transmission-2.92-handshake.patch (limited to 'net-p2p/transmission/files/transmission-2.92-handshake.patch') diff --git a/net-p2p/transmission/files/transmission-2.92-handshake.patch b/net-p2p/transmission/files/transmission-2.92-handshake.patch new file mode 100644 index 000000000000..a30cd583fae0 --- /dev/null +++ b/net-p2p/transmission/files/transmission-2.92-handshake.patch @@ -0,0 +1,33 @@ +commit 4c00df9463ea4fd70b73c620e439f5c3ee5efa60 +Author: Mike Gelfand +Date: Sun Sep 18 13:58:15 2016 +0300 + + Abort handshake if establishing DH shared secret fails + + Fixes #27 + +diff --git a/libtransmission/handshake.c b/libtransmission/handshake.c +index c728696..e7ff131 100644 +--- a/libtransmission/handshake.c ++++ b/libtransmission/handshake.c +@@ -425,7 +425,8 @@ readYb (tr_handshake * handshake, struct evbuffer * inbuf) + + /* compute the secret */ + 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), + * ENCRYPT (VC, crypto_provide, len (PadC), PadC, len (IA)), ENCRYPT (IA) */ +@@ -741,7 +742,9 @@ readYa (tr_handshake * handshake, + + /* read the incoming peer's public key */ + 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); + + /* send our public key to the peer */ -- cgit v1.2.3-65-gdbad