Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Trust and Identity Incubator
alternate-mdx
Commits
acd53d70
Commit
acd53d70
authored
May 06, 2022
by
Martin van Es
Browse files
Rename name to type
parent
f12bb4b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
mdsigner.yaml.example
View file @
acd53d70
---
test:
signer:
nam
e: test_signer
typ
e: test_signer
key_spec: meta.key
cert_spec: meta.crt
metadir: metadata/test
foobar:
signer:
nam
e: hsm_signer
typ
e: hsm_signer
key_spec: pkcs11:///usr/lib/softhsm/libsofthsm2.so/test?pin=secret
metadir: metadata/foobar
signers.py
View file @
acd53d70
...
...
@@ -31,9 +31,9 @@ _signers = {
class
Signers
():
def
__init__
(
self
,
signer
):
self
.
nam
e
=
signer
[
'
nam
e'
]
self
.
typ
e
=
signer
[
'
typ
e'
]
self
.
key_spec
=
signer
[
'key_spec'
]
self
.
cert_spec
=
signer
.
get
(
'cert_spec'
,
None
)
def
sign
(
self
,
xml
):
return
_signers
[
self
.
nam
e
](
xml
,
self
.
key_spec
,
self
.
cert_spec
)
return
_signers
[
self
.
typ
e
](
xml
,
self
.
key_spec
,
self
.
cert_spec
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment