From 4fefa43e034bb22e630186d0316a926843875a4b Mon Sep 17 00:00:00 2001 From: Lukas Schauer Date: Mon, 14 Dec 2015 14:04:11 +0100 Subject: [PATCH] use sha in openssl instead of shasum, fixes #42 --- letsencrypt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt.sh b/letsencrypt.sh index 8a95674..aa64cd0 100755 --- a/letsencrypt.sh +++ b/letsencrypt.sh @@ -132,7 +132,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' "$(printf '%s' '{"e":"'"${pubExponent64}"'","kty":"RSA","n":"'"${pubMod64}"'"}' | shasum -a 256 | awk '{print $1}')" | hex2bin | urlbase64)" + thumbprint="$(printf '%s' "$(printf '%s' '{"e":"'"${pubExponent64}"'","kty":"RSA","n":"'"${pubMod64}"'"}' | openssl sha -sha256)" | hex2bin | 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