From 31366290fcfbb7b51332e41755ba3f0c4b01084f Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Sat, 28 Apr 2007 22:39:24 +0000 Subject: A complete but slow implementation for certificate listing. --- ckcapi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'ckcapi.c') diff --git a/ckcapi.c b/ckcapi.c index 84538c8..a1243b8 100644 --- a/ckcapi.c +++ b/ckcapi.c @@ -20,7 +20,7 @@ static HANDLE global_mutex = NULL; #define LIBRARY_DESCRIPTION "Cryptoki CAPI Provider " #define LIBRARY_VERSION_MAJOR 1 #define LIBRARY_VERSION_MINOR 1 -#define SLOT_DESCRIPTION "Windows CAPI Certificates and Keys " +#define SLOT_DESCRIPTION "Windows Certificates and Keys " #define HARDWARE_VERSION_MAJOR 0 #define HARDWARE_VERSION_MINOR 0 #define FIRMWARE_VERSION_MAJOR 0 @@ -44,6 +44,8 @@ ckcapi_debug(const char* msg, ...) _vsnprintf(buf, 1024, msg, va); va_end(va); + strncat(buf, "\n", 1024); + buf[1024 - 1] = 0; OutputDebugStringA(buf); } @@ -306,18 +308,18 @@ CC_C_GetMechanismList(CK_SLOT_ID id, CK_MECHANISM_TYPE_PTR mechanism_list, if(mechanism_list == NULL) { - *count = 1; + *count = 0; RETURN(CKR_OK); } - if(*count < 1) + if(*count < 0) { - *count = 1; + *count = 0; RETURN(CKR_BUFFER_TOO_SMALL); } - mechanism_list[0] = CKM_RSA_PKCS; - *count = 1; + /* mechanism_list[0] = CKM_RSA_PKCS; */ + *count = 0; RETURN(CKR_OK); } -- cgit v1.2.3