Skip to content

Commit

Permalink
[FAB-8633] Correct revoked error check
Browse files Browse the repository at this point in the history
The returned error message was changed to "access denied" when
a certificate has been revoked.  This simply changes the sample
to look for the correct error message.

Change-Id: Id107d4e1813099e2f21ba9eaffa0bd0b9912a97b
Signed-off-by: Keith Smith <bksmith@us.ibm.com>
  • Loading branch information
Keith Smith committed Mar 2, 2018
1 parent f3b55c9 commit 9f9fc7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fabric-ca/scripts/run-fabric.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function queryAsRevokedUser {
sleep 1
peer chaincode query -C $CHANNEL_NAME -n mycc -c '{"Args":["query","a"]}' >& log.txt
if [ $? -ne 0 ]; then
err=$(cat log.txt | grep "The certificate has been revoked")
err=$(cat log.txt | grep "access denied")
if [ "$err" != "" ]; then
logr "Expected error occurred when the revoked user '$USER_NAME' queried the chaincode in the channel '$CHANNEL_NAME'"
set -e
Expand Down

0 comments on commit 9f9fc7e

Please sign in to comment.