Hi,
I refer to #100
We have this issue if Windows Hello is used connecting to an Azure account ('local' logon with PIN code is no problem).
We can pinpoint the problem to following code (code used from sdk40 (example data.c file):
retVal = (pFunctions->C_GetSlotList) (CK_TRUE, 0, &slot_count);
Appareantly (card) reader cannot be accessed, no 'slots' are found.
Anyone experiencing the same problem and any idea to solve this ?
Tested with latest middleware version 5.0.17 (but alo 4.4.4 gave same error).
`
CK_ULONG beidsdk_GetData()
{
void *pkcs11Handle; //handle to the pkcs11 library
CK_FUNCTION_LIST_PTR pFunctions; //list of the pkcs11 function pointers
CK_C_GetFunctionList pC_GetFunctionList;
CK_RV retVal = CKR_OK;
DWORD err;
//Open the pkcs11 library
pkcs11Handle = dlopen(PKCS11_LIB, RTLD_LAZY); // RTLD_NOW is slower
if (pkcs11Handle != NULL)
{
// Get function pointer to C_GetFunctionList
pC_GetFunctionList = (CK_C_GetFunctionList)dlsym(pkcs11Handle, "C_GetFunctionList");
if (pC_GetFunctionList != NULL)
{
// Invoke C_GetFunctionList to get the list of pkcs11 function pointers
retVal = (*pC_GetFunctionList) (&pFunctions);
if (retVal == CKR_OK)
{
// initialize Cryptoki
retVal = (pFunctions->C_Initialize) (NULL);
if (retVal == CKR_OK)
{
CK_ULONG slot_count = 0;
// retrieve the number of slots (cardreaders) found
//set first parameter to CK_FALSE if you also want to find the slots without a card inserted
retVal = (pFunctions->C_GetSlotList) (CK_TRUE, 0, &slot_count);
if ((retVal == CKR_OK) && (slot_count > 0) )
{
CK_SLOT_ID_PTR slotIds = (CK_SLOT_ID_PTR)malloc(slot_count * sizeof(CK_SLOT_INFO));
if(slotIds != NULL)
{
...`
Hi,
I refer to #100
We have this issue if Windows Hello is used connecting to an Azure account ('local' logon with PIN code is no problem).
We can pinpoint the problem to following code (code used from sdk40 (example data.c file):
retVal = (pFunctions->C_GetSlotList) (CK_TRUE, 0, &slot_count);Appareantly (card) reader cannot be accessed, no 'slots' are found.
Anyone experiencing the same problem and any idea to solve this ?
Tested with latest middleware version 5.0.17 (but alo 4.4.4 gave same error).
`
CK_ULONG beidsdk_GetData()
{
void *pkcs11Handle; //handle to the pkcs11 library
CK_FUNCTION_LIST_PTR pFunctions; //list of the pkcs11 function pointers
CK_C_GetFunctionList pC_GetFunctionList;
CK_RV retVal = CKR_OK;
DWORD err;
...`