Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Timotej Lazar
b34bee54a3 Fix config parsing for pkcs11 module 2026-03-11 10:50:47 +01:00

View file

@ -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()