summaryrefslogtreecommitdiff
path: root/ckcapi.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2007-04-28 22:39:24 +0000
committerStef Walter <stef@memberwebs.com>2007-04-28 22:39:24 +0000
commit31366290fcfbb7b51332e41755ba3f0c4b01084f (patch)
tree00f34d27b7d610e11b1fc71d0a45ec5af8ade028 /ckcapi.c
parent0ba89ba85a58264e4b1b44a5593e84fb070126e3 (diff)
A complete but slow implementation for certificate listing.
Diffstat (limited to 'ckcapi.c')
-rw-r--r--ckcapi.c14
1 files changed, 8 insertions, 6 deletions
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);
}