summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2011-06-18 15:56:50 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2011-06-18 15:56:50 +0200
commit78d848bf3bc52b0f4b1fcdbc3e2eb4ca721c95d4 (patch)
treee53da9f44eeb736b22a8a8c80327828f4e173fcf
parenta23c33bd2e4f300d85edd362b63f37754088f040 (diff)
downloadfribid-78d848bf3bc52b0f4b1fcdbc3e2eb4ca721c95d4.tar.gz
fribid-78d848bf3bc52b0f4b1fcdbc3e2eb4ca721c95d4.tar.bz2
fribid-78d848bf3bc52b0f4b1fcdbc3e2eb4ca721c95d4.zip
Check return value of PKCS11_enumerate_certs
-rw-r--r--client/pkcs11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/pkcs11.c b/client/pkcs11.c
index 870a01b..d8cb1c9 100644
--- a/client/pkcs11.c
+++ b/client/pkcs11.c
@@ -163,7 +163,7 @@ static void pkcs11_found_token(Backend *backend, PKCS11_SLOT *slot) {
// Scan card
rc = PKCS11_enumerate_certs(slot->token, &token->certs, &token->ncerts);
- if (token->ncerts == 0)
+ if (rc || token->ncerts == 0)
goto fail;
// Firts cert in the chain is the user cert. Rest is associated authority certs