pk11_api.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* 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 */
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);
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);
}