Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
4962cc3d
Commit
4962cc3d
authored
Apr 26, 2019
by
neilpang
Browse files
fix idn issues
parent
52f55641
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
4962cc3d
...
@@ -1084,11 +1084,12 @@ _createcsr() {
...
@@ -1084,11 +1084,12 @@ _createcsr() {
printf
"[ req_distinguished_name ]
\n
[ req ]
\n
distinguished_name = req_distinguished_name
\n
req_extensions = v3_req
\n
[ v3_req ]
\n\n
keyUsage = nonRepudiation, digitalSignature, keyEncipherment"
>
"
$csrconf
"
printf
"[ req_distinguished_name ]
\n
[ req ]
\n
distinguished_name = req_distinguished_name
\n
req_extensions = v3_req
\n
[ v3_req ]
\n\n
keyUsage = nonRepudiation, digitalSignature, keyEncipherment"
>
"
$csrconf
"
if
[
"
$acmeValidationv1
"
]
;
then
if
[
"
$acmeValidationv1
"
]
;
then
domainlist
=
"
$(
_idn
"
$domainlist
"
)
"
printf
--
"
\n
subjectAltName=DNS:
$domainlist
"
>>
"
$csrconf
"
printf
--
"
\n
subjectAltName=DNS:
$domainlist
"
>>
"
$csrconf
"
elif
[
-z
"
$domainlist
"
]
||
[
"
$domainlist
"
=
"
$NO_VALUE
"
]
;
then
elif
[
-z
"
$domainlist
"
]
||
[
"
$domainlist
"
=
"
$NO_VALUE
"
]
;
then
#single domain
#single domain
_info
"Single domain"
"
$domain
"
_info
"Single domain"
"
$domain
"
printf -- "\nsubjectAltName=DNS:$domain" >>"$csrconf"
printf
--
"
\n
subjectAltName=DNS:
$(
_idn
$domain
)
"
>>
"
$csrconf
"
else
else
domainlist
=
"
$(
_idn
"
$domainlist
"
)
"
domainlist
=
"
$(
_idn
"
$domainlist
"
)
"
_debug2 domainlist
"
$domainlist
"
_debug2 domainlist
"
$domainlist
"
...
@@ -3557,7 +3558,9 @@ _check_dns_entries() {
...
@@ -3557,7 +3558,9 @@ _check_dns_entries() {
for
entry
in
$dns_entries
;
do
for
entry
in
$dns_entries
;
do
d
=
$(
_getfield
"
$entry
"
1
)
d
=
$(
_getfield
"
$entry
"
1
)
txtdomain
=
$(
_getfield
"
$entry
"
2
)
txtdomain
=
$(
_getfield
"
$entry
"
2
)
txtdomain
=
$(
_idn
$txtdomain
)
aliasDomain
=
$(
_getfield
"
$entry
"
3
)
aliasDomain
=
$(
_getfield
"
$entry
"
3
)
aliasDomain
=
$(
_idn
$aliasDomain
)
txt
=
$(
_getfield
"
$entry
"
5
)
txt
=
$(
_getfield
"
$entry
"
5
)
d_api
=
$(
_getfield
"
$entry
"
6
)
d_api
=
$(
_getfield
"
$entry
"
6
)
_debug
"d"
"
$d
"
_debug
"d"
"
$d
"
...
@@ -3754,7 +3757,7 @@ issue() {
...
@@ -3754,7 +3757,7 @@ issue() {
if
[
-z
"
$vlist
"
]
;
then
if
[
-z
"
$vlist
"
]
;
then
if
[
"
$ACME_VERSION
"
=
"2"
]
;
then
if
[
"
$ACME_VERSION
"
=
"2"
]
;
then
#make new order request
#make new order request
_identifiers="{\"type\":\"dns\",\"value\":\"$_main_domain\"}"
_identifiers
=
"{
\"
type
\"
:
\"
dns
\"
,
\"
value
\"
:
\"
$(
_idn
$_main_domain
)
\"
}"
_w_index
=
1
_w_index
=
1
while
true
;
do
while
true
;
do
d
=
"
$(
echo
"
$_alt_domains
,"
|
cut
-d
,
-f
"
$_w_index
"
)
"
d
=
"
$(
echo
"
$_alt_domains
,"
|
cut
-d
,
-f
"
$_w_index
"
)
"
...
@@ -3851,7 +3854,7 @@ $_authorizations_map"
...
@@ -3851,7 +3854,7 @@ $_authorizations_map"
fi
fi
if
[
"
$ACME_VERSION
"
=
"2"
]
;
then
if
[
"
$ACME_VERSION
"
=
"2"
]
;
then
response="$(echo "$_authorizations_map" | grep "^$
d
," | sed "s/$d,//")"
response
=
"
$(
echo
"
$_authorizations_map
"
|
grep
"^
$
(
_idn
$d
)
,"
|
sed
"s/
$d
,//"
)
"
_debug2
"response"
"
$response
"
_debug2
"response"
"
$response
"
if
[
-z
"
$response
"
]
;
then
if
[
-z
"
$response
"
]
;
then
_err
"get to authz error."
_err
"get to authz error."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment