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
Commits
9f034c89
Commit
9f034c89
authored
3 years ago
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
finished auth (no tests)
parent
f6e604fa
No related branches found
No related tags found
3 merge requests
!510
Release
,
!207
WIP: Client Restructure
,
!203
Symmetric broadcast
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
auth/interface.go
+1
-0
1 addition, 0 deletions
auth/interface.go
auth/receivedRequest.go
+2
-2
2 additions, 2 deletions
auth/receivedRequest.go
auth/replayConfirm.go
+11
-2
11 additions, 2 deletions
auth/replayConfirm.go
with
14 additions
and
4 deletions
auth/interface.go
+
1
−
0
View file @
9f034c89
...
@@ -54,6 +54,7 @@ type State interface {
...
@@ -54,6 +54,7 @@ type State interface {
// ratcheted
// ratcheted
// The confirm sends as a critical message, if the round send on fails, it
// The confirm sends as a critical message, if the round send on fails, it
// will be auto resent by the cmix client
// will be auto resent by the cmix client
// This will not be useful if either side has ratcheted
ReplayConfirm
(
partner
*
id
.
ID
)
(
id
.
Round
,
error
)
ReplayConfirm
(
partner
*
id
.
ID
)
(
id
.
Round
,
error
)
// ReplayRequests will iterate through all pending contact requests and replay
// ReplayRequests will iterate through all pending contact requests and replay
...
...
This diff is collapsed.
Click to expand it.
auth/receivedRequest.go
+
2
−
2
View file @
9f034c89
...
@@ -7,8 +7,8 @@ import (
...
@@ -7,8 +7,8 @@ import (
"github.com/pkg/errors"
"github.com/pkg/errors"
jww
"github.com/spf13/jwalterweatherman"
jww
"github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/auth/store"
"gitlab.com/elixxir/client/auth/store"
"gitlab.com/elixxir/client/cmix/rounds"
"gitlab.com/elixxir/client/cmix/identity/receptionID"
"gitlab.com/elixxir/client/cmix/identity/receptionID"
"gitlab.com/elixxir/client/cmix/rounds"
"gitlab.com/elixxir/client/e2e/ratchet"
"gitlab.com/elixxir/client/e2e/ratchet"
"gitlab.com/elixxir/crypto/contact"
"gitlab.com/elixxir/crypto/contact"
cAuth
"gitlab.com/elixxir/crypto/e2e/auth"
cAuth
"gitlab.com/elixxir/crypto/e2e/auth"
...
@@ -236,7 +236,7 @@ func (rrs *receivedRequestService) Process(message format.Message,
...
@@ -236,7 +236,7 @@ func (rrs *receivedRequestService) Process(message format.Message,
//autoconfirm if we should
//autoconfirm if we should
if
autoConfirm
||
reset
{
if
autoConfirm
||
reset
{
_
,
_
=
state
.
confirm
RequestAuth
(
c
,
state
.
params
.
getConfirmTag
(
reset
))
_
,
_
=
state
.
confirm
(
c
,
state
.
params
.
getConfirmTag
(
reset
))
//handle callbacks
//handle callbacks
if
autoConfirm
{
if
autoConfirm
{
state
.
callbacks
.
Confirm
(
c
,
receptionID
,
round
)
state
.
callbacks
.
Confirm
(
c
,
receptionID
,
round
)
...
...
This diff is collapsed.
Click to expand it.
auth/replayConfirm.go
+
11
−
2
View file @
9f034c89
...
@@ -2,7 +2,16 @@ package auth
...
@@ -2,7 +2,16 @@ package auth
import
"gitlab.com/xx_network/primitives/id"
import
"gitlab.com/xx_network/primitives/id"
//
todo implement replay
confirm
//
ReplayConfirm is used to resend a
confirm
func
(
s
*
state
)
ReplayConfirm
(
partner
*
id
.
ID
)
(
id
.
Round
,
error
)
{
func
(
s
*
state
)
ReplayConfirm
(
partner
*
id
.
ID
)
(
id
.
Round
,
error
)
{
return
0
,
nil
confirmPayload
,
mac
,
keyfp
,
err
:=
s
.
store
.
LoadConfirmation
(
partner
)
if
err
!=
nil
{
return
0
,
err
}
rid
,
err
:=
sendAuthConfirm
(
s
.
net
,
partner
,
keyfp
,
confirmPayload
,
mac
,
s
.
event
,
s
.
params
.
ResetConfirmTag
)
return
rid
,
err
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment