Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Merge requests
!614
Xx 4681/restlike modifications
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Xx 4681/restlike modifications
XX-4681/RestlikeModifications
into
release
Overview
0
Commits
2
Pipelines
0
Changes
4
Open
Josh Brooks
requested to merge
XX-4681/RestlikeModifications
into
release
1 year ago
Overview
0
Commits
2
Pipelines
0
Changes
4
Expand
0
0
Merge request reports
Compare
release
release (HEAD)
and
latest version
latest version
2c4a07e4
2 commits,
1 year ago
4 files
+
111
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
connect/authenticated.go
+
26
−
0
Options
@@ -75,6 +75,32 @@ func ConnectWithAuthentication(recipient contact.Contact, user *xxdk.E2e,
identity
.
Salt
,
privKey
,
user
.
GetRng
(),
user
.
GetCmix
(),
p
)
}
// AuthenticatedConnectWithoutReset is called by the client, ie the one
// establishing connection with the server. Once a connect.Connection has been
// established with the server and then authenticate their identity to the
// server.
func
AuthenticatedConnectWithoutReset
(
recipient
contact
.
Contact
,
user
*
xxdk
.
E2e
,
p
xxdk
.
E2EParams
)
(
AuthenticatedConnection
,
error
)
{
// Track the time since we started to attempt to establish a connection
timeStart
:=
netTime
.
Now
()
conn
,
err
:=
ConnectWithoutReset
(
recipient
,
user
,
p
)
if
err
!=
nil
{
return
nil
,
errors
.
Errorf
(
"failed to establish connection "
+
"with recipient %s: %+v"
,
recipient
.
ID
,
err
)
}
// Build the authenticated connection and return
identity
:=
user
.
GetReceptionIdentity
()
privKey
,
err
:=
identity
.
GetRSAPrivateKey
()
if
err
!=
nil
{
return
nil
,
err
}
return
connectWithAuthentication
(
conn
,
timeStart
,
recipient
,
identity
.
Salt
,
privKey
,
user
.
GetRng
(),
user
.
GetCmix
(),
p
)
}
// connectWithAuthentication builds and sends an IdentityAuthentication to
// the server. This will wait until the round it sends on completes or a
// timeout occurs.
Loading