- testing 257.7-1
- unstable 257.7-1
- experimental 258~rc1-1
SYSTEMD-SBSIGN(1) | systemd-sbsign | SYSTEMD-SBSIGN(1) |
NAME¶
systemd-sbsign - Sign PE binaries for EFI Secure Boot
SYNOPSIS¶
systemd-sbsign [OPTIONS...] {COMMAND}
DESCRIPTION¶
systemd-sbsign can be used to sign PE binaries for EFI Secure Boot.
COMMANDS¶
sign
Added in version 257.
OPTIONS¶
The following options are understood:
--output=PATH
Added in version 257.
--private-key=PATH/URI, --private-key-source=TYPE[:NAME], --certificate=PATH, --certificate-source=TYPE[:NAME]
Added in version 257.
--prepare-offline-signing
Added in version 258.
--signed-data=PATH, --signed-data-signature=PATH
Added in version 258.
-h, --help
--version
EXAMPLES¶
Example 1. Offline EFI secure boot signing of a PE binary
The following does offline secure boot signing of systemd-boot:
SD_BOOT="$(find /usr/lib/systemd/boot/efi/ -name "systemd-boot*.efi" | head -n1)" # Extract the data that should be signed offline. /usr/lib/systemd/systemd-sbsign \
sign \
--certificate=secure-boot-certificate.pem \
--output=signed-data.bin \
--prepare-offline-signing \
"$SD_BOOT" # Sign the data out-of-band. This step usually happens out-of-band on a separate system. openssl dgst -sha256 -sign secure-boot-private-key.pem -out signed-data.sig signed-data.bin # Attach the signed data and its signature to the systemd-boot PE binary. /usr/lib/systemd/systemd-sbsign \
sign \
--certificate=secure-boot-certificate.pem \
--output="$SD_BOOT.signed" \
--signed-data=signed-data.bin \
--signed-data-signature=signed-data.sig \
"$SD_BOOT"
SEE ALSO¶
systemd 258~rc1 |