ukify: Require both key and cert be set in generate_keys

If either is None the write in this branch of the code will fail.
This commit is contained in:
Jörg Behrmann
2024-10-12 19:01:00 +02:00
parent f5698a3f41
commit 9ba53499b9
+1 -1
View File
@@ -1176,7 +1176,7 @@ def generate_keys(opts: argparse.Namespace) -> None:
# This will generate keys and certificates and write them to the paths that
# are specified as input paths.
if opts.sb_key or opts.sb_cert:
if opts.sb_key and opts.sb_cert:
fqdn = socket.getfqdn()
cn = f'SecureBoot signing key on host {fqdn}'
key_pem, cert_pem = generate_key_cert_pair(