Skip to content
Snippets Groups Projects
Commit 10a2cfe7 authored by Martin Stiemerling's avatar Martin Stiemerling :speech_balloon:
Browse files

more stuff, need to go branch...

parent d1893eee
No related branches found
No related tags found
No related merge requests found
...@@ -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
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment