]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
fixed usage of openssl sha in newer openssl versions by using direct binary output
authorLukas Schauer <lukas@schauer.so>
Mon, 14 Dec 2015 13:10:54 +0000 (14:10 +0100)
committerLukas Schauer <lukas@schauer.so>
Mon, 14 Dec 2015 13:10:54 +0000 (14:10 +0100)
letsencrypt.sh

index aa64cd063e83806d2ad616db04e51515b3a1db11..45d728f8115319c4904c3e92bfeb496046e40396 100755 (executable)
@@ -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}"'"}' | openssl sha -sha256)" | hex2bin | urlbase64)"
+  thumbprint="$(printf '%s' '{"e":"'"${pubExponent64}"'","kty":"RSA","n":"'"${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