Skip to content
Snippets Groups Projects
Commit 9fe0e02e authored by Neil-Jocelyn Schark's avatar Neil-Jocelyn Schark
Browse files

start server only when config is set

parent 043e509d
No related branches found
No related tags found
2 merge requests!11Big boom integration,!6Draft: Akms ckms api implementation
Pipeline #180989 passed
This commit is part of merge request !6. Comments created here will be created in the context of that merge request.
......@@ -130,9 +130,6 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM
// Attach to eKMS
emuKMS := kms.NewEKMS(config.Name, id, os.Stdout, log.TraceLevel, false, config.InterComAddr, config.AkmsURL)
// Create AKMSReceiverServer object
akmsCkmsReceiverServer := akmsCkmsServer.NewAKMSReceiver(config.AkmsCkmsServerPort, emuKMS)
var qm kms.QuantumModule
var err error
for _, peer := range config.Peers {
......@@ -177,7 +174,10 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM
go kms.StartETSI(config.GRPCAddr, emuKMS)
// Start the akmsCkmsReceiverServer
go akmsCkmsReceiverServer.Serve()
if config.AkmsCkmsServerPort != "" {
akmsCkmsReceiverServer := akmsCkmsServer.NewAKMSReceiver(config.AkmsCkmsServerPort, emuKMS)
go akmsCkmsReceiverServer.Serve()
}
return emuKMS
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment