summaryrefslogtreecommitdiff
path: root/ntor/ntor.go
diff options
context:
space:
mode:
authorYawning Angel <yawning@schwanenlied.me>2014-05-14 04:46:24 +0000
committerYawning Angel <yawning@schwanenlied.me>2014-05-14 04:46:24 +0000
commitece57277dbfa4aae86745f337229b779a9c298c2 (patch)
treef61f395c70ea079cc3755fe10c6deb0e80b9fb66 /ntor/ntor.go
parent64212e10299951efedb5637d8a137b51172bba8a (diff)
Minor stylistic fixes, no functional changes.
Diffstat (limited to 'ntor/ntor.go')
-rw-r--r--ntor/ntor.go8
1 files changed, 4 insertions, 4 deletions
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
}