[FAB-8387] Add gencrl to revoke command

Add --gencrl flag to revoke command to illustrate
the ability to generate a CRL while performing
a revocation.

Change-Id: I7521cfee54f8704675236d7afb2876b87eb339bf
Signed-off-by: Saad Karim <skarim@us.ibm.com>
This commit is contained in:
Saad Karim 2018-02-21 12:57:58 -05:00
parent a0edc2ece2
commit ca8016385e
2 changed files with 4 additions and 5 deletions

View file

@ -274,12 +274,12 @@ function switchToUserIdentity {
}
# Revokes the fabric user
function revokeFabricUser {
function revokeFabricUserAndGenerateCRL {
switchToAdminIdentity
export FABRIC_CA_CLIENT_HOME=$ORG_ADMIN_HOME
logr "Revoking the user '$USER_NAME' of the organization '$ORG' with Fabric CA Client home directory set to $FABRIC_CA_CLIENT_HOME ..."
logr "Revoking the user '$USER_NAME' of the organization '$ORG' with Fabric CA Client home directory set to $FABRIC_CA_CLIENT_HOME and generating CRL ..."
export FABRIC_CA_CLIENT_TLS_CERTFILES=$CA_CHAINFILE
fabric-ca-client revoke -d --revoke.name $USER_NAME
fabric-ca-client revoke -d --revoke.name $USER_NAME --gencrl
}
# Generates a CRL that contains serial numbers of all revoked enrollment certificates.

View file

@ -89,8 +89,7 @@ function main {
switchToUserIdentity
# Revoke the user and generate CRL using admin's credentials
revokeFabricUser
generateCRL
revokeFabricUserAndGenerateCRL
# Fetch config block
fetchConfigBlock