diff options
Diffstat (limited to 'ckcapi-trust.c')
-rw-r--r-- | ckcapi-trust.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 */ |