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
9191feb3
Commit
9191feb3
authored
Feb 23, 2021
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
added more debug prints
parent
be096603
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
auth/callback.go
+15
-6
15 additions, 6 deletions
auth/callback.go
interfaces/message/encryptionType.go
+11
-0
11 additions, 0 deletions
interfaces/message/encryptionType.go
network/message/handler.go
+3
-0
3 additions, 0 deletions
network/message/handler.go
with
29 additions
and
6 deletions
auth/callback.go
+
15
−
6
View file @
9191feb3
...
...
@@ -42,7 +42,7 @@ func (m *Manager) StartProcessies() stoppable.Stoppable {
// specific
fpType
,
sr
,
myHistoricalPrivKey
,
err
:=
authStore
.
GetFingerprint
(
fp
)
if
err
!=
nil
{
jww
.
INFO
.
Printf
(
"FINGERPRINT FAILURE: %s"
,
err
.
Error
())
jww
.
TRACE
.
Printf
(
"FINGERPRINT FAILURE: %s"
,
err
.
Error
())
// if the lookup fails, ignore the message. It is likely
// garbled or for a different protocol
break
...
...
@@ -58,6 +58,8 @@ func (m *Manager) StartProcessies() stoppable.Stoppable {
// if it is specific, that means the original request was sent
// by this users and a confirmation has been received
case
auth
.
Specific
:
jww
.
INFO
.
Printf
(
"Received AutConfirm from %s,"
+
" msgDigest: %s"
,
sr
.
GetPartner
(),
cmixMsg
.
Digest
())
m
.
handleConfirm
(
cmixMsg
,
sr
,
grp
)
}
}
...
...
@@ -76,8 +78,8 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
myPubKey
:=
diffieHellman
.
GeneratePublicKey
(
myHistoricalPrivKey
,
grp
)
jww
.
INFO
.
Printf
(
"handleRequest MYPUBKEY: %v"
,
myPubKey
.
Bytes
())
jww
.
INFO
.
Printf
(
"handleRequest PARTNERPUBKEY: %v"
,
partnerPubKey
.
Bytes
())
jww
.
TRACE
.
Printf
(
"handleRequest MYPUBKEY: %v"
,
myPubKey
.
Bytes
())
jww
.
TRACE
.
Printf
(
"handleRequest PARTNERPUBKEY: %v"
,
partnerPubKey
.
Bytes
())
//decrypt the message
success
,
payload
:=
cAuth
.
Decrypt
(
myHistoricalPrivKey
,
...
...
@@ -113,6 +115,9 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
return
}
jww
.
INFO
.
Printf
(
"Received AuthRequest from %s,"
+
" msgDigest: %s"
,
partnerID
,
cmixMsg
.
Digest
())
/*do state edge checks*/
// check if a relationship already exists.
// if it does and the keys used are the same as we have, send a
...
...
@@ -143,10 +148,14 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
// if we sent a request, then automatically confirm
// then exit, nothing else needed
case
auth
.
Sent
:
jww
.
INFO
.
Printf
(
"Received AuthRequest from %s,"
+
" msgDigest: %s which has been requested, auto-confirming"
,
partnerID
,
cmixMsg
.
Digest
())
// do the confirmation
if
err
:=
m
.
doConfirm
(
sr2
,
grp
,
partnerPubKey
,
myPubKey
,
ecrFmt
.
GetOwnership
());
err
!=
nil
{
jww
.
WARN
.
Printf
(
"Confirmation failed: %s"
,
err
)
jww
.
WARN
.
Printf
(
"Auto Confirmation with %s failed: %s"
,
partnerID
,
err
)
}
//exit
return
...
...
@@ -208,8 +217,8 @@ func (m *Manager) handleConfirm(cmixMsg format.Message, sr *auth.SentRequest,
return
}
jww
.
INFO
.
Printf
(
"handleConfirm PARTNERPUBKEY: %v"
,
partnerPubKey
.
Bytes
())
jww
.
INFO
.
Printf
(
"handleConfirm SRMYPUBKEY: %v"
,
sr
.
GetMyPubKey
()
.
Bytes
())
jww
.
TRACE
.
Printf
(
"handleConfirm PARTNERPUBKEY: %v"
,
partnerPubKey
.
Bytes
())
jww
.
TRACE
.
Printf
(
"handleConfirm SRMYPUBKEY: %v"
,
sr
.
GetMyPubKey
()
.
Bytes
())
// decrypt the payload
success
,
payload
:=
cAuth
.
Decrypt
(
sr
.
GetMyPrivKey
(),
...
...
This diff is collapsed.
Click to expand it.
interfaces/message/encryptionType.go
+
11
−
0
View file @
9191feb3
...
...
@@ -13,3 +13,14 @@ const (
None
EncryptionType
=
0
E2E
EncryptionType
=
1
)
func
(
et
EncryptionType
)
String
()
string
{
switch
et
{
case
None
:
return
"None"
case
E2E
:
return
"E2E"
default
:
return
"Unknown"
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
network/message/handler.go
+
3
−
0
View file @
9191feb3
...
...
@@ -103,6 +103,9 @@ func (m *Manager) handleMessage(ecrMsg format.Message, identity reception.Identi
return
}
jww
.
INFO
.
Printf
(
"Received message of type %s from %s,"
+
" msgDigest: %s"
,
encTy
,
sender
,
msg
.
Digest
())
// Process the decrypted/unencrypted message partition, to see if
// we get a full message
xxMsg
,
ok
:=
m
.
partitioner
.
HandlePartition
(
sender
,
encTy
,
msg
.
GetContents
(),
...
...
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