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
2c77896a
Commit
2c77896a
authored
4 years ago
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
fixed pem handling in new manager
parent
57eb9893
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
network/manager.go
+4
-2
4 additions, 2 deletions
network/manager.go
with
4 additions
and
2 deletions
network/manager.go
+
4
−
2
View file @
2c77896a
...
@@ -16,6 +16,7 @@ import (
...
@@ -16,6 +16,7 @@ import (
"gitlab.com/elixxir/client/network/health"
"gitlab.com/elixxir/client/network/health"
"gitlab.com/elixxir/comms/client"
"gitlab.com/elixxir/comms/client"
"gitlab.com/elixxir/comms/network"
"gitlab.com/elixxir/comms/network"
"gitlab.com/xx_network/crypto/signature/rsa"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/ndf"
"gitlab.com/xx_network/primitives/ndf"
"time"
"time"
...
@@ -50,13 +51,14 @@ type Manager struct {
...
@@ -50,13 +51,14 @@ type Manager struct {
// NewManager builds a new reception manager object using inputted key fields
// NewManager builds a new reception manager object using inputted key fields
func
NewManager
(
ctx
*
context
.
Context
)
(
*
Manager
,
error
)
{
func
NewManager
(
ctx
*
context
.
Context
)
(
*
Manager
,
error
)
{
//start comms
//get the user from storage
//get the user from storage
user
:=
ctx
.
Session
.
User
()
user
:=
ctx
.
Session
.
User
()
cryptoUser
:=
user
.
GetCryptographicIdentity
()
cryptoUser
:=
user
.
GetCryptographicIdentity
()
//start comms
comms
,
err
:=
client
.
NewClientComms
(
cryptoUser
.
GetUserID
(),
comms
,
err
:=
client
.
NewClientComms
(
cryptoUser
.
GetUserID
(),
cryptoUser
.
GetRSA
()
.
GetPublic
(),
cryptoUser
.
GetRSA
(),
rsa
.
CreatePublicKeyPem
(
cryptoUser
.
GetRSA
()
.
GetPublic
()),
rsa
.
CreatePrivateKeyPem
(
cryptoUser
.
GetRSA
()),
cryptoUser
.
GetSalt
())
cryptoUser
.
GetSalt
())
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
errors
.
WithMessage
(
err
,
"failed to create"
+
return
nil
,
errors
.
WithMessage
(
err
,
"failed to create"
+
...
...
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