Fix config parsing for pkcs11 module
This commit is contained in:
parent
c812e52bad
commit
b34bee54a3
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ def init(args):
|
||||||
if not args.id:
|
if not args.id:
|
||||||
raise Exception('key ID not specified')
|
raise Exception('key ID not specified')
|
||||||
if not args.module:
|
if not args.module:
|
||||||
args.module = config.get(args.module, 'module')
|
args.module = config.get(args.url, 'module', fallback=None)
|
||||||
args.module = ["--module", str(pathlib.Path(args.module))] if args.module else []
|
args.module = ["--module", str(pathlib.Path(args.module))] if args.module else []
|
||||||
args.cert = base64.b64encode(subprocess.run(['pkcs11-tool'] + args.module + ['--read-object', '--type', 'cert', '--id', args.id], capture_output=True).stdout).decode()
|
args.cert = base64.b64encode(subprocess.run(['pkcs11-tool'] + args.module + ['--read-object', '--type', 'cert', '--id', args.id], capture_output=True).stdout).decode()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue