[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [obfs4/master] Fix all go vet issues



commit 19dcb424be201c3eb5f204607d46fb78b36105c9
Author: Daniel Martí <mvdan@xxxxxxxx>
Date:   Mon Mar 16 19:47:37 2015 +0100

    Fix all go vet issues
---
 transports/obfs2/obfs2.go |    4 ++--
 transports/obfs3/obfs3.go |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/transports/obfs2/obfs2.go b/transports/obfs2/obfs2.go
index ad15671..f8efac1 100644
--- a/transports/obfs2/obfs2.go
+++ b/transports/obfs2/obfs2.go
@@ -235,7 +235,7 @@ func (conn *obfs2Conn) handshake() (err error) {
 		return
 	}
 	txStream := cipher.NewCTR(txBlock, padIV)
-	conn.tx = &cipher.StreamWriter{txStream, conn.Conn, nil}
+	conn.tx = &cipher.StreamWriter{S: txStream, W: conn.Conn}
 	if _, err = conn.Conn.Write(seed[:]); err != nil {
 		return
 	}
@@ -262,7 +262,7 @@ func (conn *obfs2Conn) handshake() (err error) {
 		return
 	}
 	rxStream := cipher.NewCTR(rxBlock, peerIV)
-	conn.rx = &cipher.StreamReader{rxStream, conn.Conn}
+	conn.rx = &cipher.StreamReader{S: rxStream, R: conn.Conn}
 	hsHdr := make([]byte, hsLen)
 	if _, err = io.ReadFull(conn, hsHdr[:]); err != nil {
 		return
diff --git a/transports/obfs3/obfs3.go b/transports/obfs3/obfs3.go
index dd9281b..53409db 100644
--- a/transports/obfs3/obfs3.go
+++ b/transports/obfs3/obfs3.go
@@ -261,13 +261,13 @@ func (conn *obfs3Conn) kdf(sharedSecret []byte) (err error) {
 	respStream := cipher.NewCTR(respBlock, respSecret[keyLen:])
 
 	if conn.isInitiator {
-		conn.tx = &cipher.StreamWriter{initStream, conn.Conn, nil}
-		conn.rx = &cipher.StreamReader{respStream, conn.rxBuf}
+		conn.tx = &cipher.StreamWriter{S: initStream, W: conn.Conn}
+		conn.rx = &cipher.StreamReader{S: respStream, R: conn.rxBuf}
 		conn.txMagic = initMagic
 		conn.rxMagic = respMagic
 	} else {
-		conn.tx = &cipher.StreamWriter{respStream, conn.Conn, nil}
-		conn.rx = &cipher.StreamReader{initStream, conn.rxBuf}
+		conn.tx = &cipher.StreamWriter{S: respStream, W: conn.Conn}
+		conn.rx = &cipher.StreamReader{S: initStream, R: conn.rxBuf}
 		conn.txMagic = respMagic
 		conn.rxMagic = initMagic
 	}



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits