Add optional CRL reason parameter
This commit is contained in:
parent
96696bcc7b
commit
23d7051e76
@ -33,7 +33,7 @@ Here is the list of commands available with a short syntax reminder. Use the
|
|||||||
sign-req <type> <filename_base>
|
sign-req <type> <filename_base>
|
||||||
build-client-full <filename_base> [ cmd-opts ]
|
build-client-full <filename_base> [ cmd-opts ]
|
||||||
build-server-full <filename_base> [ cmd-opts ]
|
build-server-full <filename_base> [ cmd-opts ]
|
||||||
revoke <filename_base>
|
revoke <filename_base> [cmd-opts]
|
||||||
gen-crl
|
gen-crl
|
||||||
update-db
|
update-db
|
||||||
show-req <filename_base> [ cmd-opts ]
|
show-req <filename_base> [ cmd-opts ]
|
||||||
@ -98,8 +98,16 @@ cmd_help() {
|
|||||||
opts="
|
opts="
|
||||||
nopass - do not encrypt the private key (default is encrypted)" ;;
|
nopass - do not encrypt the private key (default is encrypted)" ;;
|
||||||
revoke) text="
|
revoke) text="
|
||||||
revoke <filename_base>
|
revoke <filename_base> [reason]
|
||||||
Revoke a certificate specified by the filename_base" ;;
|
Revoke a certificate specified by the filename_base, with an optional
|
||||||
|
revocation reason that is one of:
|
||||||
|
unspecified
|
||||||
|
keyCompromise
|
||||||
|
CACompromise
|
||||||
|
affiliationChanged
|
||||||
|
superseded
|
||||||
|
cessationOfOperation
|
||||||
|
certificateHold";;
|
||||||
gen-crl) text="
|
gen-crl) text="
|
||||||
gen-crl
|
gen-crl
|
||||||
Generate a CRL" ;;
|
Generate a CRL" ;;
|
||||||
@ -841,6 +849,11 @@ Error: didn't find a file base name as the first argument.
|
|||||||
Run easyrsa without commands for usage and command help."
|
Run easyrsa without commands for usage and command help."
|
||||||
crt_in="$EASYRSA_PKI/issued/$1.crt"
|
crt_in="$EASYRSA_PKI/issued/$1.crt"
|
||||||
|
|
||||||
|
opts=""
|
||||||
|
if [ "$2" ]; then
|
||||||
|
opts="$opts -crl_reason $2"
|
||||||
|
fi
|
||||||
|
|
||||||
verify_file x509 "$crt_in" || die "\
|
verify_file x509 "$crt_in" || die "\
|
||||||
Unable to revoke as the input file is not a valid certificate. Unexpected
|
Unable to revoke as the input file is not a valid certificate. Unexpected
|
||||||
input in file: $crt_in"
|
input in file: $crt_in"
|
||||||
@ -860,7 +873,7 @@ at: $crt_in"
|
|||||||
# make safessl-easyrsa.cnf
|
# make safessl-easyrsa.cnf
|
||||||
make_ssl_config
|
make_ssl_config
|
||||||
|
|
||||||
"$EASYRSA_OPENSSL" ca -utf8 -revoke "$crt_in" -config "$EASYRSA_SAFE_CONF" || die "\
|
"$EASYRSA_OPENSSL" ca -utf8 -revoke "$crt_in" -config "$EASYRSA_SAFE_CONF" $opts || die "\
|
||||||
Failed to revoke certificate: revocation command failed."
|
Failed to revoke certificate: revocation command failed."
|
||||||
|
|
||||||
notice "\
|
notice "\
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user