From: Lukas Schauer Date: Mon, 14 Dec 2015 13:04:11 +0000 (+0100) Subject: use sha in openssl instead of shasum, fixes #42 X-Git-Tag: v0.1.0~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fefa43e034bb22e630186d0316a926843875a4b;p=thirdparty%2Fdehydrated.git use sha in openssl instead of shasum, fixes #42 --- 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