1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-13 12:58:20 +03:00

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.

(cherry picked from commit 9ba53499b97d59cc57ce763b8ba7f272a876dd25)
(cherry picked from commit 39a46aced6a0e462a1ec6daabdba5c924757ee09)
This commit is contained in:
Jörg Behrmann 2024-10-11 14:34:15 +02:00 committed by Luca Boccassi
parent b095673440
commit 9dd3a25fdd

View File

@ -988,7 +988,7 @@ def generate_keys(opts):
# 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(