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
d0401047
Commit
d0401047
authored
Sep 19, 2014
by
Juan Batiz-Benet
Committed by
Brian Tiger Chow
Sep 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handshake: setting remote key expects it to match
parent
4284e8e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
crypto/spipe/handshake.go
crypto/spipe/handshake.go
+8
-1
No files found.
crypto/spipe/handshake.go
View file @
d0401047
...
...
@@ -87,11 +87,18 @@ func (s *SecurePipe) handshake() error {
return
err
}
s
.
remote
.
ID
,
err
=
IDFromPubKey
(
s
.
remote
.
PubKey
)
remoteID
,
err
:
=
IDFromPubKey
(
s
.
remote
.
PubKey
)
if
err
!=
nil
{
return
err
}
if
s
.
remote
.
ID
!=
nil
&&
!
remoteID
.
Equal
(
s
.
remote
.
ID
)
{
e
:=
"Expected pubkey does not match sent pubkey: %v - %v"
return
fmt
.
Errorf
(
e
,
s
.
remote
.
ID
.
Pretty
(),
remoteID
.
Pretty
())
}
else
if
s
.
remote
.
ID
==
nil
{
s
.
remote
.
ID
=
remoteID
}
exchange
,
err
:=
selectBest
(
SupportedExchanges
,
proposeResp
.
GetExchanges
())
if
err
!=
nil
{
return
err
...
...
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