pk11_api.c revision 0b756d60e59d0a563fa69857f5422f44776313ed
/*
* Copyright (C) 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id$ */
/*! \file */
/* missing code for WIN32 */
#include <config.h>
#include <string.h>
#include <windows.h>
#include <pk11/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 */
static char loaderrmsg[1024];
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++;
"LoadLibraryA(\"%s\") failed with 0x%X\n",
return (CKR_LIBRARY_FAILED_TO_LOAD);
}
return (CKR_SYMBOL_RESOLUTION_FAILED);
}
char *pk11_get_load_error_message(void) {
return (loaderrmsg);
}
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);
}
{
"LoadLibraryA(\"%s\") failed with 0x%X\n",
pk11_get_lib_name(), err);
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);
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);
}