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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
e6d6fb53
Commit
e6d6fb53
authored
Apr 1, 2021
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
fixed an edge case in auth confirmation
parent
a30fc1f6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
auth/callback.go
+3
-3
3 additions, 3 deletions
auth/callback.go
network/follow.go
+0
-1
0 additions, 1 deletion
network/follow.go
network/polltracker.go
+2
-2
2 additions, 2 deletions
network/polltracker.go
with
5 additions
and
6 deletions
auth/callback.go
+
3
−
3
View file @
e6d6fb53
...
@@ -152,7 +152,7 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
...
@@ -152,7 +152,7 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
" msgDigest: %s which has been requested, auto-confirming"
,
" msgDigest: %s which has been requested, auto-confirming"
,
partnerID
,
cmixMsg
.
Digest
())
partnerID
,
cmixMsg
.
Digest
())
// do the confirmation
// do the confirmation
if
err
:=
m
.
doConfirm
(
sr2
,
grp
,
partnerPubKey
,
my
PubKey
,
if
err
:=
m
.
doConfirm
(
sr2
,
grp
,
partnerPubKey
,
sr2
.
GetPartnerHistorical
PubKey
()
,
ecrFmt
.
GetOwnership
());
err
!=
nil
{
ecrFmt
.
GetOwnership
());
err
!=
nil
{
jww
.
WARN
.
Printf
(
"Auto Confirmation with %s failed: %s"
,
jww
.
WARN
.
Printf
(
"Auto Confirmation with %s failed: %s"
,
partnerID
,
err
)
partnerID
,
err
)
...
@@ -250,10 +250,10 @@ func (m *Manager) handleConfirm(cmixMsg format.Message, sr *auth.SentRequest,
...
@@ -250,10 +250,10 @@ func (m *Manager) handleConfirm(cmixMsg format.Message, sr *auth.SentRequest,
}
}
func
(
m
*
Manager
)
doConfirm
(
sr
*
auth
.
SentRequest
,
grp
*
cyclic
.
Group
,
func
(
m
*
Manager
)
doConfirm
(
sr
*
auth
.
SentRequest
,
grp
*
cyclic
.
Group
,
partnerPubKey
,
my
PubKeyOwnershipProof
*
cyclic
.
Int
,
ownershipProof
[]
byte
)
error
{
partnerPubKey
,
partner
PubKeyOwnershipProof
*
cyclic
.
Int
,
ownershipProof
[]
byte
)
error
{
// verify the message came from the intended recipient
// verify the message came from the intended recipient
if
!
cAuth
.
VerifyOwnershipProof
(
sr
.
GetMyPrivKey
(),
if
!
cAuth
.
VerifyOwnershipProof
(
sr
.
GetMyPrivKey
(),
my
PubKeyOwnershipProof
,
grp
,
ownershipProof
)
{
partner
PubKeyOwnershipProof
,
grp
,
ownershipProof
)
{
return
errors
.
Errorf
(
"Failed authenticate identity for auth "
+
return
errors
.
Errorf
(
"Failed authenticate identity for auth "
+
"confirmation of %s"
,
sr
.
GetPartner
())
"confirmation of %s"
,
sr
.
GetPartner
())
}
}
...
...
This diff is collapsed.
Click to expand it.
network/follow.go
+
0
−
1
View file @
e6d6fb53
...
@@ -41,7 +41,6 @@ import (
...
@@ -41,7 +41,6 @@ import (
)
)
const
debugTrackPeriod
=
1
*
time
.
Minute
const
debugTrackPeriod
=
1
*
time
.
Minute
const
maxChecked
=
100000
//comms interface makes testing easier
//comms interface makes testing easier
type
followNetworkComms
interface
{
type
followNetworkComms
interface
{
...
...
This diff is collapsed.
Click to expand it.
network/polltracker.go
+
2
−
2
View file @
e6d6fb53
...
@@ -17,9 +17,9 @@ func newPollTracker() *pollTracker {
...
@@ -17,9 +17,9 @@ func newPollTracker() *pollTracker {
func
(
pt
*
pollTracker
)
Track
(
ephID
ephemeral
.
Id
,
source
*
id
.
ID
)
{
func
(
pt
*
pollTracker
)
Track
(
ephID
ephemeral
.
Id
,
source
*
id
.
ID
)
{
if
_
,
exists
:=
(
*
pt
)[
*
source
];
!
exists
{
if
_
,
exists
:=
(
*
pt
)[
*
source
];
!
exists
{
(
*
pt
)[
*
source
]
=
make
(
map
[
int64
]
uint
)
(
*
pt
)[
*
source
]
=
make
(
map
[
int64
]
uint
)
(
*
pt
)[
*
source
][
ephID
.
Int64
()]
=
0
(
*
pt
)[
*
source
][
ephID
.
Int64
()]
=
1
}
else
if
_
,
exists
:=
(
*
pt
)[
*
source
][
ephID
.
Int64
()];
!
exists
{
}
else
if
_
,
exists
:=
(
*
pt
)[
*
source
][
ephID
.
Int64
()];
!
exists
{
(
*
pt
)[
*
source
][
ephID
.
Int64
()]
=
0
(
*
pt
)[
*
source
][
ephID
.
Int64
()]
=
1
}
else
{
}
else
{
(
*
pt
)[
*
source
][
ephID
.
Int64
()]
=
(
*
pt
)[
*
source
][
ephID
.
Int64
()]
+
1
(
*
pt
)[
*
source
][
ephID
.
Int64
()]
=
(
*
pt
)[
*
source
][
ephID
.
Int64
()]
+
1
}
}
...
...
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