Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
053f4a9a
Unverified
Commit
053f4a9a
authored
Sep 05, 2020
by
neil
Committed by
GitHub
Sep 05, 2020
Browse files
Merge pull request #3154 from acmesh-official/dev
sync
parents
da0e0bda
2c7d2230
Changes
2
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
053f4a9a
...
...
@@ -956,9 +956,9 @@ _dbase64() {
_checkcert
()
{
_cf
=
"
$1
"
if
[
"
$DEBUG
"
]
;
then
openssl x509
-noout
-text
-in
"
$_cf
"
${
ACME_OPENSSL_BIN
:-
openssl
}
x509
-noout
-text
-in
"
$_cf
"
else
openssl x509
-noout
-text
-in
"
$_cf
"
>
/dev/null 2>&1
${
ACME_OPENSSL_BIN
:-
openssl
}
x509
-noout
-text
-in
"
$_cf
"
>
/dev/null 2>&1
fi
}
...
...
@@ -3994,7 +3994,7 @@ _check_dns_entries() {
_get_cert_issuers
()
{
_cfile
=
"
$1
"
if
_contains
"
$(
${
ACME_OPENSSL_BIN
:-
openssl
}
help
crl2pkcs7 2>&1
)
"
"Usage: crl2pkcs7"
;
then
${
ACME_OPENSSL_BIN
:-
openssl
}
crl2pkcs7
-nocrl
-certfile
$_cfile
| openssl pkcs7
-print_certs
-text
-noout
|
grep
'Issuer:'
| _egrep_o
"CN *=[^,]*"
|
cut
-d
=
-f
2
${
ACME_OPENSSL_BIN
:-
openssl
}
crl2pkcs7
-nocrl
-certfile
$_cfile
|
${
ACME_OPENSSL_BIN
:-
openssl
}
pkcs7
-print_certs
-text
-noout
|
grep
'Issuer:'
| _egrep_o
"CN *=[^,]*"
|
cut
-d
=
-f
2
else
${
ACME_OPENSSL_BIN
:-
openssl
}
x509
-in
$_cfile
-text
-noout
|
grep
'Issuer:'
| _egrep_o
"CN *=[^,]*"
|
cut
-d
=
-f
2
fi
...
...
@@ -4714,7 +4714,7 @@ $_authorizations_map"
return
1
fi
if
[
-z
"
$Le_LinkOrder
"
]
;
then
Le_LinkOrder
=
"
$(
echo
"
$responseHeaders
"
|
grep
-i
'^Location.*$'
| _tail_n 1 |
tr
-d
"
\r\n
"
|
cut
-d
":"
-f
2-
)
"
Le_LinkOrder
=
"
$(
echo
"
$responseHeaders
"
|
grep
-i
'^Location.*$'
| _tail_n 1 |
tr
-d
"
\r\n
\t
"
|
cut
-d
":"
-f
2-
)
"
fi
_savedomainconf
"Le_LinkOrder"
"
$Le_LinkOrder
"
...
...
dnsapi/dns_misaka.sh
View file @
053f4a9a
...
...
@@ -47,7 +47,7 @@ dns_misaka_add() {
if
[
"
$count
"
=
"0"
]
;
then
_info
"Adding record"
if
_misaka_rest P
U
T
"zones/
${
_domain
}
/recordsets/
${
_sub_domain
}
/TXT"
"{
\"
records
\"
:[{
\"
value
\"
:
\"\\\"
$txtvalue
\\\"\"
}],
\"
filters
\"
:[],
\"
ttl
\"
:1}"
;
then
if
_misaka_rest P
OS
T
"zones/
${
_domain
}
/recordsets/
${
_sub_domain
}
/TXT"
"{
\"
records
\"
:[{
\"
value
\"
:
\"\\\"
$txtvalue
\\\"\"
}],
\"
filters
\"
:[],
\"
ttl
\"
:1}"
;
then
_debug response
"
$response
"
if
_contains
"
$response
"
"
$_sub_domain
"
;
then
_info
"Added"
...
...
@@ -61,7 +61,7 @@ dns_misaka_add() {
else
_info
"Updating record"
_misaka_rest P
OS
T
"zones/
${
_domain
}
/recordsets/
${
_sub_domain
}
/TXT?append=true"
"{
\"
records
\"
: [{
\"
value
\"
:
\"\\\"
$txtvalue
\\\"\"
}],
\"
ttl
\"
:1}"
_misaka_rest P
U
T
"zones/
${
_domain
}
/recordsets/
${
_sub_domain
}
/TXT?append=true"
"{
\"
records
\"
: [{
\"
value
\"
:
\"\\\"
$txtvalue
\\\"\"
}],
\"
ttl
\"
:1}"
if
[
"
$?
"
=
"0"
]
&&
_contains
"
$response
"
"
$_sub_domain
"
;
then
_info
"Updated!"
#todo: check if the record takes effect
...
...
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