Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
quant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
quant
Commits
043e509d
Commit
043e509d
authored
1 year ago
by
Neil-Jocelyn Schark
Browse files
Options
Downloads
Patches
Plain Diff
parameters
parent
9a4a552c
Branches
Branches containing commit
No related tags found
2 merge requests
!11
Big boom integration
,
!6
Draft: Akms ckms api implementation
Pipeline
#180987
passed
1 year ago
Stage: build
Stage: code-quality
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ekms/etsiqkdnclient/etsi-qkdn-client.go
+8
-3
8 additions, 3 deletions
ekms/etsiqkdnclient/etsi-qkdn-client.go
ekms/internal/kms/kms.go
+2
-2
2 additions, 2 deletions
ekms/internal/kms/kms.go
with
10 additions
and
5 deletions
ekms/etsiqkdnclient/etsi-qkdn-client.go
+
8
−
3
View file @
043e509d
...
@@ -54,6 +54,8 @@ type Config struct {
...
@@ -54,6 +54,8 @@ type Config struct {
Sync
bool
`yaml:"Sync"`
Sync
bool
`yaml:"Sync"`
QuantumModule
QuantumModule
`yaml:"QuantumModule"`
QuantumModule
QuantumModule
`yaml:"QuantumModule"`
}
`yaml:"Peers"`
}
`yaml:"Peers"`
AkmsURL
string
`yaml:"AkmsURL"`
AkmsCkmsServerPort
string
`yaml:"AkmsCkmsServerPort"`
}
}
type
QuantumModule
struct
{
type
QuantumModule
struct
{
...
@@ -126,8 +128,10 @@ func NewEkmsClient(bootInfo *Config) (myInfo *ekmsInfo) {
...
@@ -126,8 +128,10 @@ func NewEkmsClient(bootInfo *Config) (myInfo *ekmsInfo) {
// TODO: return an error.
// TODO: return an error.
func
emulatedKMS
(
config
*
Config
,
id
uuid
.
UUID
,
peerChannel
chan
string
)
*
kms
.
EKMS
{
func
emulatedKMS
(
config
*
Config
,
id
uuid
.
UUID
,
peerChannel
chan
string
)
*
kms
.
EKMS
{
// Attach to eKMS
// Attach to eKMS
emuKMS
:=
kms
.
NewEKMS
(
config
.
Name
,
id
,
os
.
Stdout
,
log
.
TraceLevel
,
false
,
config
.
InterComAddr
)
emuKMS
:=
kms
.
NewEKMS
(
config
.
Name
,
id
,
os
.
Stdout
,
log
.
TraceLevel
,
false
,
config
.
InterComAddr
,
config
.
AkmsURL
)
akmsCkmsReceiverServer
:=
akmsCkmsServer
.
NewAKMSReceiver
(
"4567"
,
emuKMS
)
// Create AKMSReceiverServer object
akmsCkmsReceiverServer
:=
akmsCkmsServer
.
NewAKMSReceiver
(
config
.
AkmsCkmsServerPort
,
emuKMS
)
var
qm
kms
.
QuantumModule
var
qm
kms
.
QuantumModule
var
err
error
var
err
error
...
@@ -172,8 +176,9 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM
...
@@ -172,8 +176,9 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM
// Start the SDN/management and key retrieval interface
// Start the SDN/management and key retrieval interface
go
kms
.
StartETSI
(
config
.
GRPCAddr
,
emuKMS
)
go
kms
.
StartETSI
(
config
.
GRPCAddr
,
emuKMS
)
// Start the
AKMS
ReceiverServer
// Start the
akmsCkms
ReceiverServer
go
akmsCkmsReceiverServer
.
Serve
()
go
akmsCkmsReceiverServer
.
Serve
()
return
emuKMS
return
emuKMS
}
}
...
...
This diff is collapsed.
Click to expand it.
ekms/internal/kms/kms.go
+
2
−
2
View file @
043e509d
...
@@ -65,7 +65,7 @@ type QuantumElementInterface interface {
...
@@ -65,7 +65,7 @@ type QuantumElementInterface interface {
GetQlID() qlElementId
GetQlID() qlElementId
}*/
}*/
func
NewEKMS
(
kmsName
string
,
kmsUUID
uuid
.
UUID
,
logOutput
io
.
Writer
,
logLevel
log
.
Level
,
logInJson
bool
,
interComAddr
string
)
(
newEKMS
*
EKMS
)
{
func
NewEKMS
(
kmsName
string
,
kmsUUID
uuid
.
UUID
,
logOutput
io
.
Writer
,
logLevel
log
.
Level
,
logInJson
bool
,
interComAddr
string
,
akmsURL
string
)
(
newEKMS
*
EKMS
)
{
/*
/*
* Setup logging
* Setup logging
*/
*/
...
@@ -86,7 +86,7 @@ func NewEKMS(kmsName string, kmsUUID uuid.UUID, logOutput io.Writer, logLevel lo
...
@@ -86,7 +86,7 @@ func NewEKMS(kmsName string, kmsUUID uuid.UUID, logOutput io.Writer, logLevel lo
log
.
SetReportCaller
(
false
)
log
.
SetReportCaller
(
false
)
}
}
ckmsAkmsClient
:=
akmsCkmsClient
.
NewCkmsAkmsClient
(
"127.0.0.1:1234"
)
ckmsAkmsClient
:=
akmsCkmsClient
.
NewCkmsAkmsClient
(
akmsURL
)
createdEKMS
:=
&
EKMS
{
createdEKMS
:=
&
EKMS
{
kmsName
:
kmsName
,
kmsName
:
kmsName
,
...
...
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