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
75f2b03c
Commit
75f2b03c
authored
Aug 17, 2019
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
small QOL changes
parent
702174e5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/client.go
+2
-1
2 additions, 1 deletion
api/client.go
cmd/root.go
+0
-6
0 additions, 6 deletions
cmd/root.go
with
2 additions
and
7 deletions
api/client.go
+
2
−
1
View file @
75f2b03c
...
@@ -269,12 +269,13 @@ func (cl *Client) Register(preCan bool, registrationCode, nick, email string) (*
...
@@ -269,12 +269,13 @@ func (cl *Client) Register(preCan bool, registrationCode, nick, email string) (*
receptionHash
:=
sha256
.
New
()
receptionHash
:=
sha256
.
New
()
// Loop over all Servers
// Loop over all Servers
globals
.
Log
.
INFO
.
Println
(
"Register: Requesting nonces"
)
for
i
:=
range
cl
.
ndf
.
Gateways
{
for
i
:=
range
cl
.
ndf
.
Gateways
{
gwID
:=
id
.
NewNodeFromBytes
(
cl
.
ndf
.
Nodes
[
i
]
.
ID
)
.
NewGateway
()
gwID
:=
id
.
NewNodeFromBytes
(
cl
.
ndf
.
Nodes
[
i
]
.
ID
)
.
NewGateway
()
// Request nonce message from gateway
// Request nonce message from gateway
globals
.
Log
.
INFO
.
Print
ln
(
"Register: Requesting nonce from gateway
"
)
globals
.
Log
.
INFO
.
Print
f
(
"Register: Requesting nonce from gateway
%v/%v"
,
i
,
len
(
cl
.
ndf
.
Gateways
)
)
nonce
,
dhPub
,
err
:=
cl
.
requestNonce
(
salt
,
regHash
,
publicKeyDH
,
publicKeyRSA
,
privateKeyRSA
,
gwID
)
nonce
,
dhPub
,
err
:=
cl
.
requestNonce
(
salt
,
regHash
,
publicKeyDH
,
publicKeyRSA
,
privateKeyRSA
,
gwID
)
if
err
!=
nil
{
if
err
!=
nil
{
globals
.
Log
.
ERROR
.
Printf
(
"Register: Failed requesting nonce from gateway: %+v"
,
err
)
globals
.
Log
.
ERROR
.
Printf
(
"Register: Failed requesting nonce from gateway: %+v"
,
err
)
...
...
This diff is collapsed.
Click to expand it.
cmd/root.go
+
0
−
6
View file @
75f2b03c
...
@@ -45,7 +45,6 @@ var rateLimiting uint32
...
@@ -45,7 +45,6 @@ var rateLimiting uint32
var
showVer
bool
var
showVer
bool
var
gwCertPath
string
var
gwCertPath
string
var
registrationCertPath
string
var
registrationCertPath
string
var
registrationAddr
string
var
registrationCode
string
var
registrationCode
string
var
userEmail
string
var
userEmail
string
var
userNick
string
var
userNick
string
...
@@ -523,11 +522,6 @@ func init() {
...
@@ -523,11 +522,6 @@ func init() {
""
,
""
,
"Path to the certificate file for connecting to registration server"
+
"Path to the certificate file for connecting to registration server"
+
" using TLS"
)
" using TLS"
)
rootCmd
.
PersistentFlags
()
.
StringVarP
(
&
registrationAddr
,
"registrationaddr"
,
"a"
,
""
,
"Address:Port for connecting to registration server"
+
" using TLS"
)
rootCmd
.
PersistentFlags
()
.
StringVarP
(
&
registrationCode
,
rootCmd
.
PersistentFlags
()
.
StringVarP
(
&
registrationCode
,
"regcode"
,
"e"
,
"regcode"
,
"e"
,
...
...
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