Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Proto Kms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
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
danet
Proto Kms
Commits
10a2cfe7
Commit
10a2cfe7
authored
2 years ago
by
Martin Stiemerling
Browse files
Options
Downloads
Patches
Plain Diff
more stuff, need to go branch...
parent
d1893eee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.go
+12
-2
12 additions, 2 deletions
main.go
with
12 additions
and
2 deletions
main.go
+
12
−
2
View file @
10a2cfe7
...
@@ -10,6 +10,8 @@ import (
...
@@ -10,6 +10,8 @@ import (
)
)
func
main
()
{
func
main
()
{
// run a self-test if set to yes
var
selfTesting
bool
// my own Name
// my own Name
var
udpQL1AddrString
string
var
udpQL1AddrString
string
var
ql1Name
string
var
ql1Name
string
...
@@ -19,6 +21,10 @@ func main() {
...
@@ -19,6 +21,10 @@ func main() {
// Setup flags that allows to initially provide a address to a second
// Setup flags that allows to initially provide a address to a second
// quantumlayer so generated keys can be fetched. This is mainly to simplify
// quantumlayer so generated keys can be fetched. This is mainly to simplify
// the initial setup process.
// the initial setup process.
flag
.
BoolVar
(
&
selfTesting
,
"selfTesting"
,
false
,
"Will perform self-testing with second quantum link if set to true"
)
flag
.
StringVar
(
&
udpQL1AddrString
,
"address"
,
"[::1]:50900"
,
flag
.
StringVar
(
&
udpQL1AddrString
,
"address"
,
"[::1]:50900"
,
"The UDP address for my quantumlayer so keys can be fetched"
)
"The UDP address for my quantumlayer so keys can be fetched"
)
...
@@ -36,8 +42,12 @@ func main() {
...
@@ -36,8 +42,12 @@ func main() {
log
.
Println
(
"Welcome to the proto-kms called: "
,
ql1Name
)
log
.
Println
(
"Welcome to the proto-kms called: "
,
ql1Name
)
go
emulatedKMS
(
ql2Name
,
udpQL2AddrString
,
udpQL1AddrString
)
if
selfTesting
==
true
{
emulatedKMS
(
ql1Name
,
udpQL1AddrString
,
udpQL2AddrString
)
go
emulatedKMS
(
ql2Name
,
udpQL2AddrString
,
udpQL1AddrString
)
emulatedKMS
(
ql1Name
,
udpQL1AddrString
,
udpQL2AddrString
)
}
else
{
emulatedKMS
(
ql1Name
,
udpQL1AddrString
,
""
)
}
return
return
}
}
...
...
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