From ece57277dbfa4aae86745f337229b779a9c298c2 Mon Sep 17 00:00:00 2001 From: Yawning Angel Date: Wed, 14 May 2014 04:46:24 +0000 Subject: Minor stylistic fixes, no functional changes. --- ntor/ntor.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ntor') diff --git a/ntor/ntor.go b/ntor/ntor.go index 9dbed7f..0744d20 100644 --- a/ntor/ntor.go +++ b/ntor/ntor.go @@ -314,7 +314,7 @@ func KeypairFromBase64(encoded string) (*Keypair, error) { // ServerHandshake does the server side of a ntor handshake and returns status, // KEY_SEED, and AUTH. If status is not true, the handshake MUST be aborted. -func ServerHandshake(clientPublic *PublicKey, serverKeypair *Keypair, idKeypair *Keypair, id *NodeID) (bool, *KeySeed, *Auth) { +func ServerHandshake(clientPublic *PublicKey, serverKeypair *Keypair, idKeypair *Keypair, id *NodeID) (ok bool, keySeed *KeySeed, auth *Auth) { var notOk int var secretInput bytes.Buffer @@ -330,7 +330,7 @@ func ServerHandshake(clientPublic *PublicKey, serverKeypair *Keypair, idKeypair notOk |= constantTimeIsZero(exp[:]) secretInput.Write(exp[:]) - keySeed, auth := ntorCommon(secretInput, id, idKeypair.public, + keySeed, auth = ntorCommon(secretInput, id, idKeypair.public, clientPublic, serverKeypair.public) return notOk == 0, keySeed, auth } @@ -338,7 +338,7 @@ func ServerHandshake(clientPublic *PublicKey, serverKeypair *Keypair, idKeypair // ClientHandshake does the client side of a ntor handshake and returnes // status, KEY_SEED, and AUTH. If status is not true or AUTH does not match // the value recieved from the server, the handshake MUST be aborted. -func ClientHandshake(clientKeypair *Keypair, serverPublic *PublicKey, idPublic *PublicKey, id *NodeID) (bool, *KeySeed, *Auth) { +func ClientHandshake(clientKeypair *Keypair, serverPublic *PublicKey, idPublic *PublicKey, id *NodeID) (ok bool, keySeed *KeySeed, auth *Auth) { var notOk int var secretInput bytes.Buffer @@ -354,7 +354,7 @@ func ClientHandshake(clientKeypair *Keypair, serverPublic *PublicKey, idPublic * notOk |= constantTimeIsZero(exp[:]) secretInput.Write(exp[:]) - keySeed, auth := ntorCommon(secretInput, id, idPublic, + keySeed, auth = ntorCommon(secretInput, id, idPublic, clientKeypair.public, serverPublic) return notOk == 0, keySeed, auth } -- cgit v1.2.3