From 86eee571e269e360bafd36128e80117a93838bc7 Mon Sep 17 00:00:00 2001 From: Tim Gover Date: Wed, 1 Dec 2021 21:30:50 +0000 Subject: [PATCH] rpi-eeprom-digest: Don't require xxd/openssl unless RSA signing is requested. --- rpi-eeprom-digest | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/rpi-eeprom-digest b/rpi-eeprom-digest index 58b4843..fb638f0 100755 --- a/rpi-eeprom-digest +++ b/rpi-eeprom-digest @@ -7,7 +7,7 @@ set -e -OPENSSL=${OPENSSl:-openssl} +OPENSSL=${OPENSSL:-openssl} die() { echo "$@" >&2 @@ -26,12 +26,14 @@ checkDependencies() { die "sha256sum not found. Try installing the coreutilities package." fi - if ! command -v openssl > /dev/null; then - die "openssl not found. Try installing the openssl package." - fi + if [ -n "${KEY}" ]; then + if ! command -v ${OPENSSL} > /dev/null; then + die "${OPENSSL} not found. Try installing the openssl package." + fi - if ! command -v xxd > /dev/null; then - die "xxd not found. Try installing the xxd package." + if ! command -v xxd > /dev/null; then + die "xxd not found. Try installing the xxd package." + fi fi }