diff options
author | Stef Walter <stef@memberwebs.com> | 2007-04-28 22:39:24 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2007-04-28 22:39:24 +0000 |
commit | 31366290fcfbb7b51332e41755ba3f0c4b01084f (patch) | |
tree | 00f34d27b7d610e11b1fc71d0a45ec5af8ade028 /ckcapi.c | |
parent | 0ba89ba85a58264e4b1b44a5593e84fb070126e3 (diff) |
A complete but slow implementation for certificate listing.
Diffstat (limited to 'ckcapi.c')
-rw-r--r-- | ckcapi.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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); } |