summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-08-06 10:37:15 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-08-06 10:37:31 +0200
commit8996b97a0add0cc8408bad5b2521703afc371c67 (patch)
tree444a042a5ffd5056717057c2fcb857af372e7ace
parentf1f36d660cefecc2443467aeea813b22cec212e2 (diff)
downloadgnutls-8996b97a0add0cc8408bad5b2521703afc371c67.tar.gz
p11tool: test-sign will not fail if a pubkey is not found
-rw-r--r--src/pkcs11.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkcs11.c b/src/pkcs11.c
index effee75160..5fbb4a9712 100644
--- a/src/pkcs11.c
+++ b/src/pkcs11.c
@@ -312,6 +312,8 @@ pkcs11_test_sign(FILE * outfile, const char *url, unsigned int flags,
if (ret < 0) {
fprintf(stderr, "Cannot find a corresponding public key object in token: %s\n",
gnutls_strerror(ret));
+ if (ret == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE)
+ exit(0);
exit(1);
}