From 0714919600ee2f782f4edef0531dabc7889b4d76 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sat, 19 Dec 2015 23:26:49 +0100 Subject: [PATCH] when using printf, we do not need inline expansion of variables --- letsencrypt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt.sh b/letsencrypt.sh index 30507f5..7164db3 100755 --- a/letsencrypt.sh +++ b/letsencrypt.sh @@ -130,7 +130,7 @@ init_system() { pubExponent64="$(printf "%06x" "$(openssl rsa -in "${PRIVATE_KEY}" -noout -text | grep publicExponent | head -1 | cut -d' ' -f2)" | hex2bin | urlbase64)" pubMod64="$(printf '%s' "$(openssl rsa -in "${PRIVATE_KEY}" -noout -modulus | cut -d'=' -f2)" | hex2bin | urlbase64)" - thumbprint="$(printf '%s' '{"e":"'"${pubExponent64}"'","kty":"RSA","n":"'"${pubMod64}"'"}' | openssl sha -sha256 -binary | urlbase64)" + thumbprint="$(printf '{"e":"%s","kty":"RSA","n":"%s"}' "${pubExponent64}" "${pubMod64}" | openssl sha -sha256 -binary | urlbase64)" # If we generated a new private key in the step above we have to register it with the acme-server if [[ "${register}" = "1" ]]; then -- 2.47.2