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
82d7c69b
Commit
82d7c69b
authored
Apr 4, 2022
by
Jonah Husson
Browse files
Options
Downloads
Plain Diff
Merge branch 'restructure' of git.xx.network:elixxir/client into restructure
parents
79cbc843
74573154
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!510
Release
,
!207
WIP: Client Restructure
,
!203
Symmetric broadcast
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
e2e/rekey/rekey.go
+4
-5
4 additions, 5 deletions
e2e/rekey/rekey.go
e2e/sendE2E.go
+1
-1
1 addition, 1 deletion
e2e/sendE2E.go
with
5 additions
and
6 deletions
e2e/rekey/rekey.go
+
4
−
5
View file @
82d7c69b
...
...
@@ -12,7 +12,6 @@ import (
"github.com/golang/protobuf/proto"
"github.com/pkg/errors"
jww
"github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/catalog"
"gitlab.com/elixxir/client/e2e/ratchet/partner"
session
"gitlab.com/elixxir/client/e2e/ratchet/partner/session"
"gitlab.com/elixxir/client/event"
...
...
@@ -28,7 +27,7 @@ import (
func
CheckKeyExchanges
(
instance
*
commsNetwork
.
Instance
,
grp
*
cyclic
.
Group
,
sendE2E
E2eSender
,
events
event
.
Manager
,
manager
*
partner
.
Manager
,
sendTimeout
time
.
Duration
)
{
param
Params
,
sendTimeout
time
.
Duration
)
{
//get all sessions that may need a key exchange
sessions
:=
manager
.
TriggerNegotiations
()
...
...
@@ -36,7 +35,7 @@ func CheckKeyExchanges(instance *commsNetwork.Instance, grp *cyclic.Group,
//start an exchange for every session that needs one
for
_
,
sess
:=
range
sessions
{
go
trigger
(
instance
,
grp
,
sendE2E
,
events
,
manager
,
sess
,
sendTimeout
)
sendTimeout
,
param
)
}
}
...
...
@@ -46,7 +45,7 @@ func CheckKeyExchanges(instance *commsNetwork.Instance, grp *cyclic.Group,
// session while the latter on an extant session
func
trigger
(
instance
*
commsNetwork
.
Instance
,
grp
*
cyclic
.
Group
,
sendE2E
E2eSender
,
events
event
.
Manager
,
manager
*
partner
.
Manager
,
inputSession
*
session
.
Session
,
sendTimeout
time
.
Duration
)
{
sendTimeout
time
.
Duration
,
params
Params
)
{
var
negotiatingSession
*
session
.
Session
jww
.
INFO
.
Printf
(
"[REKEY] Negotiation triggered for session %s with "
+
...
...
@@ -81,7 +80,7 @@ func trigger(instance *commsNetwork.Instance, grp *cyclic.Group, sendE2E E2eSend
}
// send the rekey notification to the partner
err
:=
negotiate
(
instance
,
grp
,
sendE2E
,
negotiatingSession
,
err
:=
negotiate
(
instance
,
grp
,
sendE2E
,
params
,
negotiatingSession
,
sendTimeout
)
// if sending the negotiation fails, revert the state of the session to
...
...
This diff is collapsed.
Click to expand it.
e2e/sendE2E.go
+
1
−
1
View file @
82d7c69b
...
...
@@ -89,7 +89,7 @@ func (m *manager) sendE2E(mt catalog.MessageType, recipient *id.ID,
return
m
.
SendE2E
(
mt
,
recipient
,
payload
,
par
)
}
rekey
.
CheckKeyExchanges
(
m
.
net
.
GetInstance
(),
m
.
grp
,
rekeySendFunc
,
m
.
events
,
partner
,
1
*
time
.
Minute
)
m
.
events
,
partner
,
m
.
rekeyParams
,
1
*
time
.
Minute
)
}
//get a key to end to end encrypt
...
...
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