From 4d8b99a3073778fb387a2ffa02198db835912331 Mon Sep 17 00:00:00 2001 From: neilpang Date: Tue, 13 Dec 2016 20:04:43 +0800 Subject: [PATCH 1/6] add more debug info --- acme.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/acme.sh b/acme.sh index 6803616a..436c3ef9 100755 --- a/acme.sh +++ b/acme.sh @@ -406,8 +406,10 @@ _getfile() { #Usage: multiline _base64() { if [ "$1" ]; then + _debug3 "base64 multiline:$1" $OPENSSL_BIN base64 -e else + _debug3 "base64 single line." $OPENSSL_BIN base64 -e | tr -d '\r\n' fi } @@ -932,6 +934,8 @@ _calcjwk() { modulus=$($OPENSSL_BIN rsa -in "$keyfile" -modulus -noout | cut -d '=' -f 2) _debug3 modulus "$modulus" n="$(printf "%s" "$modulus" | _h2b | _base64 | _urlencode)" + _debug3 n "$n" + jwk='{"e": "'$e'", "kty": "RSA", "n": "'$n'"}' _debug3 jwk "$jwk" From 24d2a8b9d52facff65e999a8a668c3720b2dbbb7 Mon Sep 17 00:00:00 2001 From: neilpang Date: Tue, 13 Dec 2016 20:27:49 +0800 Subject: [PATCH 2/6] add debug info --- acme.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acme.sh b/acme.sh index 436c3ef9..33c0ed4a 100755 --- a/acme.sh +++ b/acme.sh @@ -406,7 +406,7 @@ _getfile() { #Usage: multiline _base64() { if [ "$1" ]; then - _debug3 "base64 multiline:$1" + _debug3 "base64 multiline:'$1'" $OPENSSL_BIN base64 -e else _debug3 "base64 single line." @@ -933,7 +933,7 @@ _calcjwk() { modulus=$($OPENSSL_BIN rsa -in "$keyfile" -modulus -noout | cut -d '=' -f 2) _debug3 modulus "$modulus" - n="$(printf "%s" "$modulus" | _h2b | _base64 | _urlencode)" + n="$(printf "%s" "$modulus" | _h2b | _base64| _urlencode)" _debug3 n "$n" jwk='{"e": "'$e'", "kty": "RSA", "n": "'$n'"}' From 1f6ffa3e88c8b0719d26943aa3b065571c47140b Mon Sep 17 00:00:00 2001 From: neilpang Date: Tue, 13 Dec 2016 20:32:50 +0800 Subject: [PATCH 3/6] fix warnings --- acme.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acme.sh b/acme.sh index 33c0ed4a..c6af629a 100755 --- a/acme.sh +++ b/acme.sh @@ -933,7 +933,7 @@ _calcjwk() { modulus=$($OPENSSL_BIN rsa -in "$keyfile" -modulus -noout | cut -d '=' -f 2) _debug3 modulus "$modulus" - n="$(printf "%s" "$modulus" | _h2b | _base64| _urlencode)" + n="$(printf "%s" "$modulus" | _h2b | _base64 | _urlencode)" _debug3 n "$n" jwk='{"e": "'$e'", "kty": "RSA", "n": "'$n'"}' From b171aff4189634387be9fefbff64f716582136a4 Mon Sep 17 00:00:00 2001 From: neilpang Date: Tue, 13 Dec 2016 20:42:36 +0800 Subject: [PATCH 4/6] fix for wrt https://github.com/Neilpang/acme.sh/issues/465 I know it's a stupid fix, but it works. I will check it later. --- acme.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acme.sh b/acme.sh index c6af629a..3512b8d6 100755 --- a/acme.sh +++ b/acme.sh @@ -933,7 +933,7 @@ _calcjwk() { modulus=$($OPENSSL_BIN rsa -in "$keyfile" -modulus -noout | cut -d '=' -f 2) _debug3 modulus "$modulus" - n="$(printf "%s" "$modulus" | _h2b | _base64 | _urlencode)" + n="$(printf "%s" "$modulus" | _h2b | _base64 | tr -d '\r\n' | _urlencode)" _debug3 n "$n" jwk='{"e": "'$e'", "kty": "RSA", "n": "'$n'"}' From 329174b6d93b04cd239878f3fda07458532f7b29 Mon Sep 17 00:00:00 2001 From: klemens Date: Wed, 14 Dec 2016 21:32:24 +0100 Subject: [PATCH 5/6] spelling fixes --- README.md | 2 +- acme.sh | 4 ++-- dnsapi/dns_ali.sh | 2 +- dnsapi/dns_aws.sh | 6 +++--- dnsapi/dns_cf.sh | 2 +- dnsapi/dns_cx.sh | 2 +- dnsapi/dns_dp.sh | 2 +- dnsapi/dns_gd.sh | 2 +- dnsapi/dns_ispconfig.sh | 2 +- dnsapi/dns_lua.sh | 2 +- dnsapi/dns_me.sh | 2 +- dnsapi/dns_myapi.sh | 4 ++-- dnsapi/dns_nsupdate.sh | 2 +- dnsapi/dns_ovh.sh | 2 +- dnsapi/dns_pdns.sh | 2 +- 15 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 1e563795..a9d5d31d 100644 --- a/README.md +++ b/README.md @@ -321,7 +321,7 @@ acme.sh --renew -d example.com --force --ecc # 11. How to upgrade `acme.sh` -acme.sh is in constant developement, so it's strongly recommended to use the latest code. +acme.sh is in constant development, so it's strongly recommended to use the latest code. You can update acme.sh to the latest code: diff --git a/acme.sh b/acme.sh index 6803616a..75d4be80 100755 --- a/acme.sh +++ b/acme.sh @@ -1913,7 +1913,7 @@ _setApache() { fi _info "JFYI, Config file $httpdconf is backuped to $APACHE_CONF_BACKUP_DIR/$httpdconfname" _info "In case there is an error that can not be restored automatically, you may try restore it yourself." - _info "The backup file will be deleted on sucess, just forget it." + _info "The backup file will be deleted on success, just forget it." #add alias @@ -3780,7 +3780,7 @@ install() { if [ -z "$NO_DETECT_SH" ]; then #Modify shebang if _exists bash; then - _info "Good, bash is found, so change the shebang to use bash as prefered." + _info "Good, bash is found, so change the shebang to use bash as preferred." _shebang='#!/usr/bin/env bash' _setShebang "$LE_WORKING_DIR/$PROJECT_ENTRY" "$_shebang" for subf in $_SUB_FOLDERS; do diff --git a/dnsapi/dns_ali.sh b/dnsapi/dns_ali.sh index 30867219..98c56f87 100644 --- a/dnsapi/dns_ali.sh +++ b/dnsapi/dns_ali.sh @@ -35,7 +35,7 @@ dns_ali_rm() { _clean } -#################### Private functions bellow ################################## +#################### Private functions below ################################## _get_root() { domain=$1 diff --git a/dnsapi/dns_aws.sh b/dnsapi/dns_aws.sh index 63542ccb..86d4d044 100644 --- a/dnsapi/dns_aws.sh +++ b/dnsapi/dns_aws.sh @@ -42,7 +42,7 @@ dns_aws_add() { _aws_tmpl_xml="UPSERT$fulldomainTXT300\"$txtvalue\"" if aws_rest POST "2013-04-01$_domain_id/rrset/" "" "$_aws_tmpl_xml" && _contains "$response" "ChangeResourceRecordSetsResponse"; then - _info "txt record updated sucess." + _info "txt record updated success." return 0 fi @@ -66,7 +66,7 @@ dns_aws_rm() { _aws_tmpl_xml="DELETE\"$txtvalue\"$fulldomain.TXT300" if aws_rest POST "2013-04-01$_domain_id/rrset/" "" "$_aws_tmpl_xml" && _contains "$response" "ChangeResourceRecordSetsResponse"; then - _info "txt record deleted sucess." + _info "txt record deleted success." return 0 fi @@ -74,7 +74,7 @@ dns_aws_rm() { } -#################### Private functions bellow ################################## +#################### Private functions below ################################## _get_root() { domain=$1 diff --git a/dnsapi/dns_cf.sh b/dnsapi/dns_cf.sh index 309eee51..e13e6d7e 100755 --- a/dnsapi/dns_cf.sh +++ b/dnsapi/dns_cf.sh @@ -120,7 +120,7 @@ dns_cf_rm() { } -#################### Private functions bellow ################################## +#################### Private functions below ################################## #_acme-challenge.www.domain.com #returns # _sub_domain=_acme-challenge.www diff --git a/dnsapi/dns_cx.sh b/dnsapi/dns_cx.sh index 86a7b2d0..f7f20812 100755 --- a/dnsapi/dns_cx.sh +++ b/dnsapi/dns_cx.sh @@ -131,7 +131,7 @@ update_record() { return 1 } -#################### Private functions bellow ################################## +#################### Private functions below ################################## #_acme-challenge.www.domain.com #returns # _sub_domain=_acme-challenge.www diff --git a/dnsapi/dns_dp.sh b/dnsapi/dns_dp.sh index e2952d71..06833b4b 100755 --- a/dnsapi/dns_dp.sh +++ b/dnsapi/dns_dp.sh @@ -158,7 +158,7 @@ update_record() { return 1 #error } -#################### Private functions bellow ################################## +#################### Private functions below ################################## #_acme-challenge.www.domain.com #returns # _sub_domain=_acme-challenge.www diff --git a/dnsapi/dns_gd.sh b/dnsapi/dns_gd.sh index 9470ed22..81000561 100755 --- a/dnsapi/dns_gd.sh +++ b/dnsapi/dns_gd.sh @@ -59,7 +59,7 @@ dns_gd_rm() { } -#################### Private functions bellow ################################## +#################### Private functions below ################################## #_acme-challenge.www.domain.com #returns # _sub_domain=_acme-challenge.www diff --git a/dnsapi/dns_ispconfig.sh b/dnsapi/dns_ispconfig.sh index 789b6267..a84d95d7 100755 --- a/dnsapi/dns_ispconfig.sh +++ b/dnsapi/dns_ispconfig.sh @@ -30,7 +30,7 @@ dns_ispconfig_rm() { _ISPC_credentials && _ISPC_login && _ISPC_rmTxt } -#################### Private functions bellow ################################## +#################### Private functions below ################################## _ISPC_credentials() { if [ -z "${ISPC_User}" ] || [ -z "$ISPC_Password" ] || [ -z "${ISPC_Api}" ] || [ -z "${ISPC_Api_Insecure}" ]; then diff --git a/dnsapi/dns_lua.sh b/dnsapi/dns_lua.sh index 2c7ec4b3..bc06b3ef 100755 --- a/dnsapi/dns_lua.sh +++ b/dnsapi/dns_lua.sh @@ -84,7 +84,7 @@ dns_lua_rm() { } -#################### Private functions bellow ################################## +#################### Private functions below ################################## #_acme-challenge.www.domain.com #returns # _sub_domain=_acme-challenge.www diff --git a/dnsapi/dns_me.sh b/dnsapi/dns_me.sh index 2a03f533..d7a1b19f 100755 --- a/dnsapi/dns_me.sh +++ b/dnsapi/dns_me.sh @@ -81,7 +81,7 @@ dns_me_rm() { } -#################### Private functions bellow ################################## +#################### Private functions below ################################## #_acme-challenge.www.domain.com #returns # _sub_domain=_acme-challenge.www diff --git a/dnsapi/dns_myapi.sh b/dnsapi/dns_myapi.sh index e5a98dd9..6bf62508 100755 --- a/dnsapi/dns_myapi.sh +++ b/dnsapi/dns_myapi.sh @@ -23,7 +23,7 @@ dns_myapi_add() { } #Usage: fulldomain txtvalue -#Remove the txt record afer validation. +#Remove the txt record after validation. dns_myapi_rm() { fulldomain=$1 txtvalue=$2 @@ -32,4 +32,4 @@ dns_myapi_rm() { _debug txtvalue "$txtvalue" } -#################### Private functions bellow ################################## +#################### Private functions below ################################## diff --git a/dnsapi/dns_nsupdate.sh b/dnsapi/dns_nsupdate.sh index 8067d2fe..7acb2ef7 100755 --- a/dnsapi/dns_nsupdate.sh +++ b/dnsapi/dns_nsupdate.sh @@ -44,7 +44,7 @@ EOF return 0 } -#################### Private functions bellow ################################## +#################### Private functions below ################################## _checkKeyFile() { if [ -z "${NSUPDATE_KEY}" ]; then diff --git a/dnsapi/dns_ovh.sh b/dnsapi/dns_ovh.sh index 377b3de1..18b9c341 100755 --- a/dnsapi/dns_ovh.sh +++ b/dnsapi/dns_ovh.sh @@ -182,7 +182,7 @@ dns_ovh_rm() { } -#################### Private functions bellow ################################## +#################### Private functions below ################################## _ovh_authentication() { diff --git a/dnsapi/dns_pdns.sh b/dnsapi/dns_pdns.sh index a2c29075..06763d88 100755 --- a/dnsapi/dns_pdns.sh +++ b/dnsapi/dns_pdns.sh @@ -130,7 +130,7 @@ notify_slaves() { return 0 } -#################### Private functions bellow ################################## +#################### Private functions below ################################## #_acme-challenge.www.domain.com #returns # _domain=domain.com From a3a04b5f769f58514cce19933b44b73e798bbc5f Mon Sep 17 00:00:00 2001 From: neilpang Date: Sat, 17 Dec 2016 20:51:00 +0800 Subject: [PATCH 6/6] revert last fix --- acme.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acme.sh b/acme.sh index 3512b8d6..c6af629a 100755 --- a/acme.sh +++ b/acme.sh @@ -933,7 +933,7 @@ _calcjwk() { modulus=$($OPENSSL_BIN rsa -in "$keyfile" -modulus -noout | cut -d '=' -f 2) _debug3 modulus "$modulus" - n="$(printf "%s" "$modulus" | _h2b | _base64 | tr -d '\r\n' | _urlencode)" + n="$(printf "%s" "$modulus" | _h2b | _base64 | _urlencode)" _debug3 n "$n" jwk='{"e": "'$e'", "kty": "RSA", "n": "'$n'"}'