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
de8b8719
Commit
de8b8719
authored
3 years ago
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
added debug logs
parent
99205801
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!67
Release
,
!60
Hotfic/preimage
,
!55
fully implemented trial hashing of identity fingerprints. Needs tests.
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
network/message/handler.go
+2
-1
2 additions, 1 deletion
network/message/handler.go
network/message/sendCmixUtils.go
+2
-0
2 additions, 0 deletions
network/message/sendCmixUtils.go
storage/edge/edge.go
+1
-0
1 addition, 0 deletions
storage/edge/edge.go
with
5 additions
and
1 deletion
network/message/handler.go
+
2
−
1
View file @
de8b8719
...
...
@@ -56,6 +56,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
//if it exists, check against all in the list
has
,
forMe
,
_
:=
m
.
Session
.
GetEdge
()
.
Check
(
identity
.
Source
,
fingerprint
[
:
],
ecrMsg
.
GetContents
())
if
!
has
{
jww
.
INFO
.
Printf
(
"checking backup %v"
,
preimage
.
MakeDefault
(
identity
.
Source
))
//if it doesnt exist, check against the default fingerprint for the identity
forMe
=
fingerprint2
.
CheckIdentityFP
(
ecrMsg
.
GetIdentityFP
(),
ecrMsg
.
GetContents
(),
preimage
.
MakeDefault
(
identity
.
Source
))
...
...
@@ -64,7 +65,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
if
!
forMe
{
if
jww
.
GetLogThreshold
()
==
jww
.
LevelTrace
{
expectedFP
:=
fingerprint2
.
IdentityFP
(
ecrMsg
.
GetContents
(),
identity
.
Source
[
:
]
)
preimage
.
MakeDefault
(
identity
.
Source
)
)
jww
.
TRACE
.
Printf
(
"Message for %d (%s) failed identity "
+
"check: %v (expected-default) vs %v (received)"
,
identity
.
EphId
,
identity
.
Source
,
expectedFP
,
ecrMsg
.
GetIdentityFP
())
...
...
This diff is collapsed.
Click to expand it.
network/message/sendCmixUtils.go
+
2
−
0
View file @
de8b8719
...
...
@@ -145,8 +145,10 @@ func buildSlotMessage(msg format.Message, recipient *id.ID, target *id.ID,
var
preimage
[]
byte
if
param
.
IdentityPreimage
!=
nil
{
preimage
=
param
.
IdentityPreimage
jww
.
INFO
.
Printf
(
"Sending to %s with override preimage %v"
,
preimage
)
}
else
{
preimage
=
preimage2
.
MakeDefault
(
recipient
)
jww
.
INFO
.
Printf
(
"Sending to %s with default preimage %v"
,
preimage
)
}
// Set the identity fingerprint
...
...
This diff is collapsed.
Click to expand it.
storage/edge/edge.go
+
1
−
0
View file @
de8b8719
...
...
@@ -177,6 +177,7 @@ func (s *Store) Check(identity *id.ID, identityFP []byte, messageContents []byte
}
for
_
,
preimage
:=
range
preimages
{
jww
.
INFO
.
Printf
(
"checking %v"
,
preimage
)
if
fingerprint2
.
CheckIdentityFP
(
identityFP
,
messageContents
,
preimage
.
Data
)
{
return
true
,
true
,
preimage
}
...
...
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