mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-22 09:35:10 +00:00
[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:
parent
a0edc2ece2
commit
ca8016385e
2 changed files with 4 additions and 5 deletions
|
|
@ -274,12 +274,12 @@ function switchToUserIdentity {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Revokes the fabric user
|
# Revokes the fabric user
|
||||||
function revokeFabricUser {
|
function revokeFabricUserAndGenerateCRL {
|
||||||
switchToAdminIdentity
|
switchToAdminIdentity
|
||||||
export FABRIC_CA_CLIENT_HOME=$ORG_ADMIN_HOME
|
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
|
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.
|
# Generates a CRL that contains serial numbers of all revoked enrollment certificates.
|
||||||
|
|
|
||||||
|
|
@ -89,8 +89,7 @@ function main {
|
||||||
switchToUserIdentity
|
switchToUserIdentity
|
||||||
|
|
||||||
# Revoke the user and generate CRL using admin's credentials
|
# Revoke the user and generate CRL using admin's credentials
|
||||||
revokeFabricUser
|
revokeFabricUserAndGenerateCRL
|
||||||
generateCRL
|
|
||||||
|
|
||||||
# Fetch config block
|
# Fetch config block
|
||||||
fetchConfigBlock
|
fetchConfigBlock
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue