From a6014bf04e9245028bc0a86b1c69bd23f05aa7ae Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 24 Aug 2016 18:46:23 +0800 Subject: [PATCH] support sha1 --- acme.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acme.sh b/acme.sh index 571d4280..ceb02d3e 100755 --- a/acme.sh +++ b/acme.sh @@ -334,11 +334,11 @@ _digest() { outputhex="$2" - if [ "$alg" = "sha256" ] ; then + if [ "$alg" = "sha256" ] || [ "$alg" = "sha1" ]; then if [ "$outputhex" ] ; then - echo $(openssl dgst -sha256 -hex | cut -d = -f 2) + echo $(openssl dgst -$alg -hex | cut -d = -f 2) else - openssl dgst -sha256 -binary | _base64 + openssl dgst -$alg -binary | _base64 fi else _err "$alg is not supported yet"