Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
80ec51f1
Commit
80ec51f1
authored
Sep 03, 2014
by
Brendan Mc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added last step of negotiation.
parent
0e185788
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
identify/identify.go
identify/identify.go
+9
-0
No files found.
identify/identify.go
View file @
80ec51f1
...
...
@@ -226,6 +226,15 @@ func Handshake(self, remote *peer.Peer, in, out chan []byte) (chan []byte, chan
}
}()
finished
:=
[]
byte
(
"Finished"
)
secureOut
<-
finished
resp2
:=
<-
secureIn
if
bytes
.
Compare
(
resp2
,
finished
)
!=
0
{
return
nil
,
nil
,
errors
.
New
(
"Negotiation failed."
)
}
u
.
DOut
(
"[%s] identify: Got node id: %s
\n
"
,
self
.
ID
.
Pretty
(),
remote
.
ID
.
Pretty
())
return
secureIn
,
secureOut
,
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment