From 4b5eb21486d188f57f2bf7a91cd5da225dd3e0d1 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 2 Dec 2008 20:56:41 +0000 Subject: Add concept of slots without any certificates. --- ckcapi-trust.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ckcapi-trust.c') diff --git a/ckcapi-trust.c b/ckcapi-trust.c index 2212d42..98c0046 100644 --- a/ckcapi-trust.c +++ b/ckcapi-trust.c @@ -520,7 +520,12 @@ ckcapi_trust_find(CkCapiSession* sess, CK_OBJECT_CLASS cls, CK_RV ret = CKR_OK; CK_ULONG i; - if(cls != CKO_NETSCAPE_TRUST) + /* We only have trust objects in here */ + if(cls != CKO_NETSCAPE_TRUST && cls != CKO_ANY) + return CKR_OK; + + /* Only work with slots that have certificates */ + if(!(ckcapi_token_get_flags (sess->slot) & CKCAPI_SLOT_CERTS)) return CKR_OK; /* Get a list of all certificates */ -- cgit v1.2.3