|
@@ -1114,14 +1114,14 @@ _createcsr() {
|
|
|
elif [ -z "$domainlist" ] || [ "$domainlist" = "$NO_VALUE" ]; then
|
|
|
#single domain
|
|
|
_info "Single domain" "$domain"
|
|
|
- printf -- "\nsubjectAltName=DNS:$(_idn $domain)" >>"$csrconf"
|
|
|
+ printf -- "\nsubjectAltName=DNS:$(_idn "$domain")" >>"$csrconf"
|
|
|
else
|
|
|
domainlist="$(_idn "$domainlist")"
|
|
|
_debug2 domainlist "$domainlist"
|
|
|
if _contains "$domainlist" ","; then
|
|
|
- alt="DNS:$(_idn $domain),DNS:$(echo "$domainlist" | sed "s/,,/,/g" | sed "s/,/,DNS:/g")"
|
|
|
+ alt="DNS:$(_idn "$domain"),DNS:$(echo "$domainlist" | sed "s/,,/,/g" | sed "s/,/,DNS:/g")"
|
|
|
else
|
|
|
- alt="DNS:$(_idn $domain),DNS:$domainlist"
|
|
|
+ alt="DNS:$(_idn "$domain"),DNS:$domainlist"
|
|
|
fi
|
|
|
#multi
|
|
|
_info "Multi domain" "$alt"
|
|
@@ -3044,11 +3044,12 @@ _clearupdns() {
|
|
|
_err "It seems that your api file doesn't define $rmcommand"
|
|
|
return 1
|
|
|
fi
|
|
|
-
|
|
|
+ _info "Removing txt: $txt for domain: $txtdomain"
|
|
|
if ! $rmcommand "$txtdomain" "$txt"; then
|
|
|
_err "Error removing txt for domain:$txtdomain"
|
|
|
return 1
|
|
|
fi
|
|
|
+ _info "Removed: Success"
|
|
|
)
|
|
|
|
|
|
done
|
|
@@ -3648,9 +3649,9 @@ _check_dns_entries() {
|
|
|
for entry in $dns_entries; do
|
|
|
d=$(_getfield "$entry" 1)
|
|
|
txtdomain=$(_getfield "$entry" 2)
|
|
|
- txtdomain=$(_idn $txtdomain)
|
|
|
+ txtdomain=$(_idn "$txtdomain")
|
|
|
aliasDomain=$(_getfield "$entry" 3)
|
|
|
- aliasDomain=$(_idn $aliasDomain)
|
|
|
+ aliasDomain=$(_idn "$aliasDomain")
|
|
|
txt=$(_getfield "$entry" 5)
|
|
|
d_api=$(_getfield "$entry" 6)
|
|
|
_debug "d" "$d"
|
|
@@ -3847,7 +3848,7 @@ issue() {
|
|
|
if [ -z "$vlist" ]; then
|
|
|
if [ "$ACME_VERSION" = "2" ]; then
|
|
|
#make new order request
|
|
|
- _identifiers="{\"type\":\"dns\",\"value\":\"$(_idn $_main_domain)\"}"
|
|
|
+ _identifiers="{\"type\":\"dns\",\"value\":\"$(_idn "$_main_domain")\"}"
|
|
|
_w_index=1
|
|
|
while true; do
|
|
|
d="$(echo "$_alt_domains," | cut -d , -f "$_w_index")"
|
|
@@ -3856,7 +3857,7 @@ issue() {
|
|
|
if [ -z "$d" ]; then
|
|
|
break
|
|
|
fi
|
|
|
- _identifiers="$_identifiers,{\"type\":\"dns\",\"value\":\"$(_idn $d)\"}"
|
|
|
+ _identifiers="$_identifiers,{\"type\":\"dns\",\"value\":\"$(_idn "$d")\"}"
|
|
|
done
|
|
|
_debug2 _identifiers "$_identifiers"
|
|
|
if ! _send_signed_request "$ACME_NEW_ORDER" "{\"identifiers\": [$_identifiers]}"; then
|
|
@@ -3944,7 +3945,7 @@ $_authorizations_map"
|
|
|
fi
|
|
|
|
|
|
if [ "$ACME_VERSION" = "2" ]; then
|
|
|
- response="$(echo "$_authorizations_map" | grep "^$(_idn $d)," | sed "s/$d,//")"
|
|
|
+ response="$(echo "$_authorizations_map" | grep "^$(_idn "$d")," | sed "s/$d,//")"
|
|
|
_debug2 "response" "$response"
|
|
|
if [ -z "$response" ]; then
|
|
|
_err "get to authz error."
|
|
@@ -4063,7 +4064,7 @@ $_authorizations_map"
|
|
|
dns_entry="$dns_entry$dvsep$txt${dvsep}$d_api"
|
|
|
_debug2 dns_entry "$dns_entry"
|
|
|
if [ "$d_api" ]; then
|
|
|
- _info "Found domain api file: $d_api"
|
|
|
+ _debug "Found domain api file: $d_api"
|
|
|
else
|
|
|
if [ "$_currentRoot" != "$W_DNS" ]; then
|
|
|
_err "Can not find dns api hook for: $_currentRoot"
|
|
@@ -4088,11 +4089,12 @@ $_authorizations_map"
|
|
|
_err "It seems that your api file is not correct, it must have a function named: $addcommand"
|
|
|
return 1
|
|
|
fi
|
|
|
-
|
|
|
+ _info "Adding txt value: $txt for domain: $txtdomain"
|
|
|
if ! $addcommand "$txtdomain" "$txt"; then
|
|
|
_err "Error add txt for domain:$txtdomain"
|
|
|
return 1
|
|
|
fi
|
|
|
+ _info "The txt record is added: Success."
|
|
|
)
|
|
|
|
|
|
if [ "$?" != "0" ]; then
|