|
@ -6146,9 +6146,8 @@ revoke() { |
|
|
|
|
|
|
|
|
uri="${ACME_REVOKE_CERT}" |
|
|
uri="${ACME_REVOKE_CERT}" |
|
|
|
|
|
|
|
|
if [ -f "$CERT_KEY_PATH" ]; then |
|
|
|
|
|
_info "Try domain key first." |
|
|
|
|
|
if _send_signed_request "$uri" "$data" "" "$CERT_KEY_PATH"; then |
|
|
|
|
|
|
|
|
_info "Try account key first." |
|
|
|
|
|
if _send_signed_request "$uri" "$data" "" "$ACCOUNT_KEY_PATH"; then |
|
|
if [ -z "$response" ]; then |
|
|
if [ -z "$response" ]; then |
|
|
_info "Revoke success." |
|
|
_info "Revoke success." |
|
|
rm -f "$CERT_PATH" |
|
|
rm -f "$CERT_PATH" |
|
@ -6156,17 +6155,14 @@ revoke() { |
|
|
cat "$CSR_PATH" >"$CSR_PATH.revoked" |
|
|
cat "$CSR_PATH" >"$CSR_PATH.revoked" |
|
|
return 0 |
|
|
return 0 |
|
|
else |
|
|
else |
|
|
_err "Revoke error by domain key." |
|
|
|
|
|
_err "$response" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
_err "Revoke error." |
|
|
|
|
|
_debug "$response" |
|
|
fi |
|
|
fi |
|
|
else |
|
|
|
|
|
_info "Domain key file doesn't exist." |
|
|
|
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
_info "Try account key." |
|
|
|
|
|
|
|
|
|
|
|
if _send_signed_request "$uri" "$data" "" "$ACCOUNT_KEY_PATH"; then |
|
|
|
|
|
|
|
|
if [ -f "$CERT_KEY_PATH" ]; then |
|
|
|
|
|
_info "Try domain key." |
|
|
|
|
|
if _send_signed_request "$uri" "$data" "" "$CERT_KEY_PATH"; then |
|
|
if [ -z "$response" ]; then |
|
|
if [ -z "$response" ]; then |
|
|
_info "Revoke success." |
|
|
_info "Revoke success." |
|
|
rm -f "$CERT_PATH" |
|
|
rm -f "$CERT_PATH" |
|
@ -6174,9 +6170,12 @@ revoke() { |
|
|
cat "$CSR_PATH" >"$CSR_PATH.revoked" |
|
|
cat "$CSR_PATH" >"$CSR_PATH.revoked" |
|
|
return 0 |
|
|
return 0 |
|
|
else |
|
|
else |
|
|
_err "Revoke error." |
|
|
|
|
|
_debug "$response" |
|
|
|
|
|
|
|
|
_err "Revoke error by domain key." |
|
|
|
|
|
_err "$response" |
|
|
|
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
else |
|
|
|
|
|
_info "Domain key file doesn't exist." |
|
|
fi |
|
|
fi |
|
|
return 1 |
|
|
return 1 |
|
|
} |
|
|
} |
|
|