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
eef905bc
Commit
eef905bc
authored
3 years ago
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
clean up logging
parent
8cfce51a
No related branches found
No related tags found
1 merge request
!170
Release
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
network/message/handler.go
+6
-8
6 additions, 8 deletions
network/message/handler.go
network/message/sendCmixUtils.go
+1
-1
1 addition, 1 deletion
network/message/sendCmixUtils.go
with
7 additions
and
9 deletions
network/message/handler.go
+
6
−
8
View file @
eef905bc
...
@@ -74,6 +74,10 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
...
@@ -74,6 +74,10 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
return
return
}
}
im
:=
fmt
.
Sprintf
(
"Received message of msg type %d from %s in round %d,msgDigest: %s, keyFP: %v"
,
encTy
,
sender
,
bundle
.
Round
,
msgDigest
,
msg
.
GetKeyFP
())
jww
.
INFO
.
Print
(
im
)
// try to get the key fingerprint, process as e2e encryption if
// try to get the key fingerprint, process as e2e encryption if
// the fingerprint is found
// the fingerprint is found
if
key
,
isE2E
:=
e2eKv
.
PopKey
(
fingerprint
);
isE2E
{
if
key
,
isE2E
:=
e2eKv
.
PopKey
(
fingerprint
);
isE2E
{
...
@@ -103,7 +107,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
...
@@ -103,7 +107,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
msg
=
ecrMsg
msg
=
ecrMsg
encTy
=
message
.
None
encTy
=
message
.
None
}
else
{
}
else
{
// if it doesnt match any form of encrypted, hear it as a raw message
// if it doesn
'
t match any form of encrypted, hear it as a raw message
// and add it to garbled messages to be handled later
// and add it to garbled messages to be handled later
msg
=
ecrMsg
msg
=
ecrMsg
raw
:=
message
.
Receive
{
raw
:=
message
.
Receive
{
...
@@ -117,7 +121,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
...
@@ -117,7 +121,7 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
RoundId
:
id
.
Round
(
bundle
.
RoundInfo
.
ID
),
RoundId
:
id
.
Round
(
bundle
.
RoundInfo
.
ID
),
RoundTimestamp
:
time
.
Unix
(
0
,
int64
(
bundle
.
RoundInfo
.
Timestamps
[
states
.
QUEUED
])),
RoundTimestamp
:
time
.
Unix
(
0
,
int64
(
bundle
.
RoundInfo
.
Timestamps
[
states
.
QUEUED
])),
}
}
im
:=
fmt
.
Sprintf
(
"Garbled/RAW Message: keyFP: %v, round: %d"
+
im
:=
fmt
.
Sprintf
(
"Garbled/RAW Message: keyFP: %v, round: %d
,
"
+
"msgDigest: %s"
,
msg
.
GetKeyFP
(),
bundle
.
Round
,
msg
.
Digest
())
"msgDigest: %s"
,
msg
.
GetKeyFP
(),
bundle
.
Round
,
msg
.
Digest
())
jww
.
INFO
.
Print
(
im
)
jww
.
INFO
.
Print
(
im
)
m
.
Internal
.
Events
.
Report
(
1
,
"MessageReception"
,
"Garbled"
,
im
)
m
.
Internal
.
Events
.
Report
(
1
,
"MessageReception"
,
"Garbled"
,
im
)
...
@@ -126,17 +130,11 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
...
@@ -126,17 +130,11 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge
return
return
}
}
// Process the decrypted/unencrypted message partition, to see if
// Process the decrypted/unencrypted message partition, to see if
// we get a full message
// we get a full message
xxMsg
,
ok
:=
m
.
partitioner
.
HandlePartition
(
sender
,
encTy
,
msg
.
GetContents
(),
xxMsg
,
ok
:=
m
.
partitioner
.
HandlePartition
(
sender
,
encTy
,
msg
.
GetContents
(),
relationshipFingerprint
)
relationshipFingerprint
)
im
:=
fmt
.
Sprintf
(
"Received message of ecr type %s and msg type "
+
"%d from %s in round %d,msgDigest: %s, keyFP: %v"
,
encTy
,
xxMsg
.
MessageType
,
sender
,
bundle
.
Round
,
msgDigest
,
msg
.
GetKeyFP
())
jww
.
INFO
.
Print
(
im
)
m
.
Internal
.
Events
.
Report
(
2
,
"MessageReception"
,
"MessagePart"
,
im
)
m
.
Internal
.
Events
.
Report
(
2
,
"MessageReception"
,
"MessagePart"
,
im
)
// If the reception completed a message, hear it on the switchboard
// If the reception completed a message, hear it on the switchboard
...
...
This diff is collapsed.
Click to expand it.
network/message/sendCmixUtils.go
+
1
−
1
View file @
eef905bc
...
@@ -158,7 +158,7 @@ func buildSlotMessage(msg format.Message, recipient *id.ID, target *id.ID,
...
@@ -158,7 +158,7 @@ func buildSlotMessage(msg format.Message, recipient *id.ID, target *id.ID,
msg
.
SetIdentityFP
(
ifp
)
msg
.
SetIdentityFP
(
ifp
)
jww
.
INFO
.
Printf
(
" Sending to %s with preimage %v, ifp:
%v, contents:
%v"
,
recipient
,
preimage
,
ifp
,
msg
.
GetContents
()
)
jww
.
INFO
.
Printf
(
" Sending to %s with preimage %v, ifp: %v"
,
recipient
,
preimage
,
ifp
)
// Encrypt the message
// Encrypt the message
salt
:=
make
([]
byte
,
32
)
salt
:=
make
([]
byte
,
32
)
...
...
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