File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,8 @@ cp "$(get_fastboot_config_file)" "${RPI_SB_WORKDIR}"/config.txt
212212# boot.sig generation
213213sha256sum " ${RPI_SB_WORKDIR} " /boot.img | awk ' {print $1}' > " ${RPI_SB_WORKDIR} " /boot.sig
214214echo -n " rsa2048: " >> " ${RPI_SB_WORKDIR} " /boot.sig
215- ${OPENSSL} dgst -sign " ${CUSTOMER_KEY_FILE_PEM} " -keyform PEM -sha256 " ${RPI_SB_WORKDIR} " /boot.img | xxd -c 4096 -p >> " ${RPI_SB_WORKDIR} " /boot.sig
215+ # Prefer PKCS11 over PEM keyfiles, if both are specified.
216+ ${OPENSSL} dgst -sign " $( get_signing_directives) " -sha256 " ${RPI_SB_WORKDIR} " /boot.img | xxd -c 4096 -p >> " ${RPI_SB_WORKDIR} " /boot.sig
216217
217218announce_stop " Finding/generating fastboot image"
218219
@@ -378,7 +379,7 @@ if [[ -z $(check_file_is_expected "${RPI_SB_WORKDIR}"/bootfs-temporary.img "img"
378379 # N.B. rpi-eeprom-digest could be used here but it includes a timestamp that is not required for this use-case
379380 sha256sum " ${TMP_DIR} " /boot.img | awk ' {print $1}' > " ${TMP_DIR} " /boot.sig
380381 echo -n " rsa2048: " >> " ${TMP_DIR} " /boot.sig
381- ${OPENSSL} dgst -sign " ${CUSTOMER_KEY_FILE_PEM} " -keyform PEM -sha256 " ${TMP_DIR} " /boot.img | xxd -c 4096 -p >> " ${TMP_DIR} " /boot.sig
382+ ${OPENSSL} dgst -sign " $( get_signing_directives ) " -sha256 " ${TMP_DIR} " /boot.img | xxd -c 4096 -p >> " ${TMP_DIR} " /boot.sig
382383 announce_stop " boot.img signing"
383384
384385 announce_start " Boot Image partition extraction"
You can’t perform that action at this time.
0 commit comments