From d85610b29b7308ba0f4808516f20550bb6ecbb57 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 9 Sep 2020 23:54:39 +0300 Subject: [PATCH] Fixed issue with C_FindObjectsInit, when CKU_SO does not see private objects, but CKU_USER see them --- src/pkcs11/pkcs11-object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkcs11/pkcs11-object.c b/src/pkcs11/pkcs11-object.c index a562634b..3b9be9f3 100644 --- a/src/pkcs11/pkcs11-object.c +++ b/src/pkcs11/pkcs11-object.c @@ -375,7 +375,7 @@ C_FindObjectsInit(CK_SESSION_HANDLE hSession, /* the session's handle */ /* Check whether we should hide private objects */ hide_private = 0; - if (slot->login_user != CKU_USER && (slot->token_info.flags & CKF_LOGIN_REQUIRED)) + if ((slot->login_user != CKU_SO) && (slot->login_user != CKU_USER) && (slot->token_info.flags & CKF_LOGIN_REQUIRED)) hide_private = 1; /* For each object in token do */