Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dfss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mpcs
dfss
Commits
95f67bf7
Commit
95f67bf7
authored
May 18, 2016
by
Richer Maximilien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[c][p] Add ip as seen by platform
parent
7a912bbd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
dfssc/sign/starter.go
dfssc/sign/starter.go
+0
-1
dfssp/contract/join.go
dfssp/contract/join.go
+4
-2
No files found.
dfssc/sign/starter.go
View file @
95f67bf7
...
...
@@ -156,7 +156,6 @@ func (m *SignatureManager) addPeer(user *pAPI.User) (ready bool, err error) {
// This is an certificate authentificated TLS connection
conn
,
err
=
net
.
Connect
(
addrPort
,
m
.
auth
.
Cert
,
m
.
auth
.
Key
,
m
.
auth
.
CA
,
user
.
KeyHash
)
if
err
==
nil
{
break
}
}
...
...
dfssp/contract/join.go
View file @
95f67bf7
package
contract
import
(
n
"net"
"time"
"dfss/auth"
...
...
@@ -20,7 +21,7 @@ import (
// There is no timeout, this function will shut down on stream disconnection or on error.
func
JoinSignature
(
db
*
mgdb
.
MongoManager
,
rooms
*
common
.
WaitingGroupMap
,
in
*
api
.
JoinSignatureRequest
,
stream
api
.
Platform_JoinSignatureServer
)
{
ctx
:=
stream
.
Context
()
state
,
_
,
_
:=
net
.
GetTLSState
(
&
ctx
)
state
,
addr
,
_
:=
net
.
GetTLSState
(
&
ctx
)
hash
:=
auth
.
GetCertificateHash
(
state
.
VerifiedChains
[
0
][
0
])
if
!
checkJoinSignatureRequest
(
db
,
&
stream
,
in
.
ContractUuid
,
hash
)
{
...
...
@@ -41,10 +42,11 @@ func JoinSignature(db *mgdb.MongoManager, rooms *common.WaitingGroupMap, in *api
}
// Broadcast self identity
host
,
_
,
_
:=
n
.
SplitHostPort
(
addr
.
String
())
rooms
.
Broadcast
(
roomID
,
&
api
.
User
{
KeyHash
:
hash
,
Email
:
net
.
GetCN
(
&
ctx
),
Ip
:
in
.
Ip
,
Ip
:
append
(
in
.
Ip
,
host
)
,
Port
:
in
.
Port
,
})
...
...
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