diff --git a/src/pkcs11/pkcs11-global.c b/src/pkcs11/pkcs11-global.c index a3260314..67189030 100644 --- a/src/pkcs11/pkcs11-global.c +++ b/src/pkcs11/pkcs11-global.c @@ -456,7 +456,12 @@ CK_RV C_GetSlotList(CK_BBOOL tokenPresent, /* only slots with token prese card_detect_all(); - DEBUG_VSS(NULL, "C_GetSlotList after card_detect_all"); + if (list_empty(&virtual_slots)) { + sc_log(context, "returned 0 slots\n"); + *pulCount = 0; + rv = CKR_OK; + goto out; + } found = calloc(list_size(&virtual_slots), sizeof(CK_SLOT_ID)); diff --git a/win32/Make.rules.mak b/win32/Make.rules.mak index 4f4971a7..c6b1aac3 100644 --- a/win32/Make.rules.mak +++ b/win32/Make.rules.mak @@ -1,7 +1,7 @@ OPENSC_FEATURES = pcsc #Include support for minidriver -MINIDRIVER_DEF = /DENABLE_MINIDRIVER +#MINIDRIVER_DEF = /DENABLE_MINIDRIVER #Build MSI with the Windows Installer XML (WIX) toolkit, requires WIX >= 3.9 !IF "$(WIX)" == "" @@ -33,7 +33,7 @@ WIX_LIBS = "$(WIX)\SDK\$(WIXVSVER)\lib\$(PLATFORM)\dutil.lib" "$(WIX)\SDK\$(WIXV SM_DEF = /DENABLE_SM #Build with debugging support -#DEBUG_DEF = /DDEBUG +DEBUG_DEF = /DDEBUG # If you want support for OpenSSL (needed for pkcs15-init tool, software hashing in PKCS#11 library and verification): # - download and build OpenSSL diff --git a/win32/winconfig.h.in b/win32/winconfig.h.in index 94ed9b54..fa682c5b 100644 --- a/win32/winconfig.h.in +++ b/win32/winconfig.h.in @@ -103,6 +103,8 @@ #define DEFAULT_ONEPIN_PKCS11_PROVIDER "@DEFAULT_ONEPIN_PKCS11_PROVIDER@" #endif +#define PKCS11_THREAD_LOCKING + #ifndef DEFAULT_SM_MODULE #define DEFAULT_SM_MODULE "@DEFAULT_SM_MODULE@" #endif