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
8eb608a8
You need to sign in or sign up before continuing.
Unverified
Commit
8eb608a8
authored
Apr 18, 2020
by
neil
Committed by
GitHub
Apr 18, 2020
Browse files
Merge pull request #2866 from acmesh-official/reason
support revoke reason.
parents
1564742b
1041c9f9
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
8eb608a8
...
@@ -138,6 +138,8 @@ _NOTIFY_WIKI="https://github.com/acmesh-official/acme.sh/wiki/notify"
...
@@ -138,6 +138,8 @@ _NOTIFY_WIKI="https://github.com/acmesh-official/acme.sh/wiki/notify"
_SUDO_WIKI="https://github.com/acmesh-official/acme.sh/wiki/sudo"
_SUDO_WIKI="https://github.com/acmesh-official/acme.sh/wiki/sudo"
_REVOKE_WIKI="https://github.com/acmesh-official/acme.sh/wiki/revokecert"
_DNS_MANUAL_ERR="The dns manual mode can not renew automatically, you must issue it again manually. You'd better use the other modes instead."
_DNS_MANUAL_ERR="The dns manual mode can not renew automatically, you must issue it again manually. You'd better use the other modes instead."
_DNS_MANUAL_WARN="It seems that you are using dns manual mode. please take care: $_DNS_MANUAL_ERR"
_DNS_MANUAL_WARN="It seems that you are using dns manual mode. please take care: $_DNS_MANUAL_ERR"
...
@@ -5456,6 +5458,7 @@ uninstallcronjob() {
...
@@ -5456,6 +5458,7 @@ uninstallcronjob() {
}
}
#domain isECC revokeReason
revoke() {
revoke() {
Le_Domain="$1"
Le_Domain="$1"
if [ -z "$Le_Domain" ]; then
if [ -z "$Le_Domain" ]; then
...
@@ -5464,7 +5467,10 @@ revoke() {
...
@@ -5464,7 +5467,10 @@ revoke() {
fi
fi
_isEcc="$2"
_isEcc="$2"
_reason="$3"
if [ -z "$_reason" ]; then
_reason="0"
fi
_initpath "$Le_Domain" "$_isEcc"
_initpath "$Le_Domain" "$_isEcc"
if [ ! -f "$DOMAIN_CONF" ]; then
if [ ! -f "$DOMAIN_CONF" ]; then
_err "$Le_Domain is not a issued domain, skip."
_err "$Le_Domain is not a issued domain, skip."
...
@@ -5486,7 +5492,7 @@ revoke() {
...
@@ -5486,7 +5492,7 @@ revoke() {
_initAPI
_initAPI
if [ "$ACME_VERSION" = "2" ]; then
if [ "$ACME_VERSION" = "2" ]; then
data
=
"{
\"
certificate
\"
:
\"
$cert
\"
}"
data="{\"certificate\": \"$cert\"
,\"reason\":$_reason
}"
else
else
data="{\"resource\": \"revoke-cert\", \"certificate\": \"$cert\"}"
data="{\"resource\": \"revoke-cert\", \"certificate\": \"$cert\"}"
fi
fi
...
@@ -6295,6 +6301,7 @@ Parameters:
...
@@ -6295,6 +6301,7 @@ Parameters:
0: Bulk mode. Send all the domain's notifications in one message(mail).
0: Bulk mode. Send all the domain's notifications in one message(mail).
1: Cert mode. Send a message for every single cert.
1: Cert mode. Send a message for every single cert.
--notify-hook [hookname] Set the notify hook
--notify-hook [hookname] Set the notify hook
--revoke-reason [0-10] The reason for '--revoke' command. See: $_REVOKE_WIKI
"
"
}
}
...
@@ -6470,6 +6477,7 @@ _process() {
...
@@ -6470,6 +6477,7 @@ _process() {
_notify_hook=""
_notify_hook=""
_notify_level=""
_notify_level=""
_notify_mode=""
_notify_mode=""
_revoke_reason=""
while [ ${#} -gt 0 ]; do
while [ ${#} -gt 0 ]; do
case "${1}" in
case "${1}" in
...
@@ -6941,6 +6949,14 @@ _process() {
...
@@ -6941,6 +6949,14 @@ _process() {
fi
fi
_notify_mode="$_nmode"
_notify_mode="$_nmode"
shift
shift
;;
--revoke-reason)
_revoke_reason="$2"
if _startswith "$_revoke_reason" "-"; then
_err "'$_revoke_reason' is not a integer for '$1'"
return 1
fi
shift
;;
;;
*)
*)
_err "Unknown parameter : $1"
_err "Unknown parameter : $1"
...
@@ -7029,7 +7045,7 @@ _process() {
...
@@ -7029,7 +7045,7 @@ _process() {
renewAll "$_stopRenewOnError"
renewAll "$_stopRenewOnError"
;;
;;
revoke)
revoke)
revoke
"
$_domain
"
"
$_ecc
"
revoke "$_domain" "$_ecc"
"$_revoke_reason"
;;
;;
remove)
remove)
remove "$_domain" "$_ecc"
remove "$_domain" "$_ecc"
...
...
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