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
12634940
Commit
12634940
authored
2 years ago
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Fix rekey bug
parent
20b28cd5
No related branches found
No related tags found
2 merge requests
!510
Release
,
!253
General Cleanup
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
e2e/rekey/trigger.go
+10
-3
10 additions, 3 deletions
e2e/rekey/trigger.go
with
10 additions
and
3 deletions
e2e/rekey/trigger.go
+
10
−
3
View file @
12634940
...
...
@@ -53,6 +53,10 @@ func startTrigger(ratchet *ratchet.Ratchet, sender E2eSender, net cmix.Client,
func
handleTrigger
(
ratchet
*
ratchet
.
Ratchet
,
sender
E2eSender
,
net
cmix
.
Client
,
grp
*
cyclic
.
Group
,
request
receive
.
Message
,
param
Params
,
stop
*
stoppable
.
Single
)
error
{
jww
.
DEBUG
.
Printf
(
"[REKEY] handleTrigger(partner: %s)"
,
request
.
Sender
)
//ensure the message was encrypted properly
if
!
request
.
Encrypted
{
errMsg
:=
fmt
.
Sprintf
(
errBadTrigger
,
request
.
Sender
)
...
...
@@ -105,9 +109,12 @@ func handleTrigger(ratchet *ratchet.Ratchet, sender E2eSender,
}
//Send the Confirmation Message
//build the payload
// build the payload, note that for confirmations, we need only send the
// (generated from new keys) session id, which the other side should
// know about already.
// When sending a trigger, the source session id is sent instead
payload
,
err
:=
proto
.
Marshal
(
&
RekeyConfirm
{
SessionID
:
sess
.
Get
Source
()
.
Marshal
(),
SessionID
:
sess
.
Get
ID
()
.
Marshal
(),
})
//If the payload cannot be marshaled, panic
...
...
@@ -116,7 +123,7 @@ func handleTrigger(ratchet *ratchet.Ratchet, sender E2eSender,
"Negotation Confirmation with %s"
,
sess
.
GetPartner
())
}
//send the trigger
//send the trigger
confirmation
params
:=
cmix
.
GetDefaultCMIXParams
()
params
.
Critical
=
true
//ignore results, the passed sender interface makes it a critical message
...
...
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