pk11_api.c revision e20788e1216ed720aefa84f3295f7899d9f28c22
/*
* Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id$ */
/*! \file */
/* missing code for WIN32 */
#include <config.h>
#ifdef USE_PKCS11
#include <string.h>
#include <windows.h>
#include <iscpk11/internal.h>
#define HAVE_GETPASSPHRASE
char *
getpassphrase(const char *prompt) {
static char buf[128];
HANDLE h;
int cnt;
h = GetStdHandle(STD_INPUT_HANDLE);
GetConsoleMode(h, &mode);
{
break;
}
SetConsoleMode(h, mode);
return (buf);
}
/* load PKCS11 DLL */
const char *lib_name = pk11_get_lib_name();
return (CKR_LIBRARY_ALREADY_INITIALIZED);
return (CKR_LIBRARY_FAILED_TO_LOAD);
/* Visual Studio convertion issue... */
if (*lib_name == ' ')
lib_name++;
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (rv);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_GetTokenInfo");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_GetMechanismInfo");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_CloseSession");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_CreateObject");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_DestroyObject");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_GetAttributeValue");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_SetAttributeValue");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_FindObjectsInit");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_FindObjectsFinal");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_DigestUpdate");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_VerifyUpdate");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_GenerateKeyPair");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
phKey);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
{
return (CKR_LIBRARY_FAILED_TO_LOAD);
"C_GenerateRandom");
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
#endif