mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-04-30 04:22:44 +00:00
Did not working dns_regru.sh with utf and punycode
Previous commit bd73823 broke everything: Certificates do not work on utf or punycode domains! I tried to make both utf and unicode domains work. Now this acme.sh --issue --dns dns_regru --dnssleep 2500 -d 'сайт.рф' -d '*.сайт.рф' --debug and this acme.sh --issue --dns dns_regru --dnssleep 2500 -d 'xn--80aswg.xn--p1ai.рф' -d '*.xn--80aswg.xn--p1ai.рф' --debug works perfect. I need to work punycode domains due to "Error parsing certificate request: x509: SAN dNSName is malformed" in past with utf.
This commit is contained in:
parent
ef26075a1c
commit
09a625946a
@ -91,11 +91,13 @@ _get_root() {
|
|||||||
_regru_rest POST "service/get_list" "username=${REGRU_API_Username}&password=${REGRU_API_Password}&output_format=xml&servtype=domain"
|
_regru_rest POST "service/get_list" "username=${REGRU_API_Username}&password=${REGRU_API_Password}&output_format=xml&servtype=domain"
|
||||||
domains_list=$(echo "${response}" | grep dname | sed -r "s/.*dname=\"([^\"]+)\".*/\\1/g")
|
domains_list=$(echo "${response}" | grep dname | sed -r "s/.*dname=\"([^\"]+)\".*/\\1/g")
|
||||||
|
|
||||||
|
if [ "$(_idn "${domain}")" != "${domain}" ]; then
|
||||||
|
|
||||||
|
_debug "OK! UTF domain!"
|
||||||
for ITEM in ${domains_list}; do
|
for ITEM in ${domains_list}; do
|
||||||
IDN_ITEM=${ITEM}
|
|
||||||
case "${domain}" in
|
case "${domain}" in
|
||||||
*${IDN_ITEM}*)
|
*${ITEM}*)
|
||||||
_domain="$(_idn "${ITEM}")"
|
_domain=${ITEM}
|
||||||
_debug _domain "${_domain}"
|
_debug _domain "${_domain}"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
@ -103,6 +105,26 @@ _get_root() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
_debug "OK! Idn domain!"
|
||||||
|
|
||||||
|
for ITEM in ${domains_list}; do
|
||||||
|
IDN_ITEM="$(_idn "${ITEM}")"
|
||||||
|
case "${domain}" in
|
||||||
|
*${IDN_ITEM}*)
|
||||||
|
_domain=${IDN_ITEM}
|
||||||
|
_debug _domain "${_domain}"
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#returns
|
#returns
|
||||||
|
Loading…
x
Reference in New Issue
Block a user