Skip to content

Commit

Permalink
[FAB-8387] Add gencrl to revoke command
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Saad Karim committed Feb 22, 2018
1 parent a0edc2e commit ca80163
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions fabric-ca/scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions fabric-ca/scripts/run-fabric.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ function main {
switchToUserIdentity

# Revoke the user and generate CRL using admin's credentials
revokeFabricUser
generateCRL
revokeFabricUserAndGenerateCRL

# Fetch config block
fetchConfigBlock
Expand Down

0 comments on commit ca80163

Please sign in to comment.