/*
*/
/* crypto/engine/e_pk11_err.c */
/*
* This product includes software developed by the OpenSSL Project for
* use in the OpenSSL Toolkit (http://www.openssl.org/).
*
* This project also referenced hw_pkcs11-0.9.7b.patch written by
* Afchine Madjlessi.
*/
/*
* ====================================================================
* Copyright (c) 2000-2001 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* licensing@OpenSSL.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
#include <stdio.h>
#include "e_pk11_err.h"
/* BEGIN ERROR CODES */
#ifndef OPENSSL_NO_ERR
{
{ 0, NULL}
};
{
{ PK11_R_ALREADY_LOADED, "PKCS#11 DSO already loaded"},
{ PK11_R_DSO_FAILURE, "unable to load PKCS#11 DSO"},
{ PK11_R_NOT_LOADED, "PKCS#11 DSO not loaded"},
{ PK11_R_PASSED_NULL_PARAMETER, "null parameter passed"},
{ PK11_R_COMMAND_NOT_IMPLEMENTED, "command not implemented"},
{ PK11_R_INITIALIZE, "C_Initialize failed"},
{ PK11_R_FINALIZE, "C_Finalize failed"},
{ PK11_R_GETINFO, "C_GetInfo faile"},
{ PK11_R_GETSLOTLIST, "C_GetSlotList failed"},
{ PK11_R_NO_MODULUS_OR_NO_EXPONENT, "no modulus or no exponent"},
{ PK11_R_ATTRIBUT_SENSITIVE_OR_INVALID, "attr sensitive or invalid"},
{ PK11_R_GETATTRIBUTVALUE, "C_GetAttributeValue failed"},
{ PK11_R_NO_MODULUS, "no modulus"},
{ PK11_R_NO_EXPONENT, "no exponent"},
{ PK11_R_FINDOBJECTSINIT, "C_FindObjectsInit failed"},
{ PK11_R_FINDOBJECTS, "C_FindObjects failed"},
{ PK11_R_FINDOBJECTSFINAL, "C_FindObjectsFinal failed"},
{ PK11_R_CREATEOBJECT, "C_CreateObject failed"},
{ PK11_R_DESTROYOBJECT, "C_DestroyObject failed"},
{ PK11_R_OPENSESSION, "C_OpenSession failed"},
{ PK11_R_CLOSESESSION, "C_CloseSession failed"},
{ PK11_R_ENCRYPTINIT, "C_EncryptInit failed"},
{ PK11_R_ENCRYPT, "C_Encrypt failed"},
{ PK11_R_SIGNINIT, "C_SignInit failed"},
{ PK11_R_SIGN, "C_Sign failed"},
{ PK11_R_DECRYPTINIT, "C_DecryptInit failed"},
{ PK11_R_DECRYPT, "C_Decrypt failed"},
{ PK11_R_VERIFYINIT, "C_VerifyRecover failed"},
{ PK11_R_VERIFY, "C_Verify failed"},
{ PK11_R_VERIFYRECOVERINIT, "C_VerifyRecoverInit failed"},
{ PK11_R_VERIFYRECOVER, "C_VerifyRecover failed"},
{ PK11_R_GEN_KEY, "C_GenerateKeyPair failed"},
{ PK11_R_SEEDRANDOM, "C_SeedRandom failed"},
{ PK11_R_GENERATERANDOM, "C_GenerateRandom failed"},
{ PK11_R_INVALID_MESSAGE_LENGTH, "invalid message length"},
{ PK11_R_UNKNOWN_ALGORITHM_TYPE, "unknown algorithm type"},
{ PK11_R_UNKNOWN_ASN1_OBJECT_ID, "unknown asn1 onject id"},
{ PK11_R_UNKNOWN_PADDING_TYPE, "unknown padding type"},
{ PK11_R_PADDING_CHECK_FAILED, "padding check failed"},
{ PK11_R_DIGEST_TOO_BIG, "digest too big"},
{ PK11_R_MALLOC_FAILURE, "malloc failure"},
{ PK11_R_CTRL_COMMAND_NOT_IMPLEMENTED, "ctl command not implemented"},
{ PK11_R_DATA_GREATER_THAN_MOD_LEN, "data is bigger than mod"},
{ PK11_R_DATA_TOO_LARGE_FOR_MODULUS, "data is too larger for mod"},
{ PK11_R_MISSING_KEY_COMPONENT, "a dsa component is missing"},
{ PK11_R_INVALID_SIGNATURE_LENGTH, "invalid signature length"},
{ PK11_R_INVALID_DSA_SIGNATURE_R, "missing r in dsa verify"},
{ PK11_R_INVALID_DSA_SIGNATURE_S, "missing s in dsa verify"},
{ PK11_R_INCONSISTENT_KEY, "inconsistent key type"},
{ PK11_R_ENCRYPTUPDATE, "C_EncryptUpdate failed"},
{ PK11_R_DECRYPTUPDATE, "C_DecryptUpdate failed"},
{ PK11_R_DIGESTINIT, "C_DigestInit failed"},
{ PK11_R_DIGESTUPDATE, "C_DigestUpdate failed"},
{ PK11_R_DIGESTFINAL, "C_DigestFinal failed"},
{ PK11_R_ENCRYPTFINAL, "C_EncryptFinal failed"},
{ PK11_R_DECRYPTFINAL, "C_DecryptFinal failed"},
{ PK11_R_NO_PRNG_SUPPORT, "Slot does not support PRNG"},
{ PK11_R_GETTOKENINFO, "C_GetTokenInfo failed"},
{ PK11_R_DERIVEKEY, "C_DeriveKey failed"},
{ PK11_R_GET_OPERATION_STATE, "C_GetOperationState failed"},
{ PK11_R_SET_OPERATION_STATE, "C_SetOperationState failed"},
{ PK11_R_INVALID_HANDLE, "invalid PKCS#11 object handle"},
{ PK11_R_KEY_OR_IV_LEN_PROBLEM, "IV or key length incorrect"},
{ PK11_R_INVALID_OPERATION_TYPE, "invalid operation type"},
{ PK11_R_ADD_NID_FAILED, "failed to add NID" },
{ PK11_R_ATFORK_FAILED, "atfork failed" },
{ PK11_R_TOKEN_LOGIN_FAILED, "C_Login failed on token" },
{ PK11_R_MORE_THAN_ONE_OBJECT_FOUND, "more than one object found" },
{ PK11_R_INVALID_PKCS11_URI, "pkcs11 URI provided is invalid" },
{ PK11_R_COULD_NOT_READ_PIN, "could not read PIN from terminal" },
{ PK11_R_PIN_NOT_READ_FROM_COMMAND, "PIN not read from external command" },
{ PK11_R_COULD_NOT_OPEN_COMMAND, "could not popen dialog command" },
{ PK11_R_PIPE_FAILED, "pipe failed" },
{ PK11_R_BAD_PASSPHRASE_SPEC, "bad passphrasedialog specification" },
{ PK11_R_TOKEN_NOT_INITIALIZED, "token not initialized" },
{ PK11_R_TOKEN_PIN_NOT_SET, "token PIN required but not set" },
{ PK11_R_TOKEN_PIN_NOT_PROVIDED, "token PIN required but not provided" },
{ PK11_R_MISSING_OBJECT_LABEL, "missing mandatory 'object' keyword" },
{ PK11_R_TOKEN_ATTRS_DO_NOT_MATCH, "token attrs provided do not match" },
{ PK11_R_PRIV_KEY_NOT_FOUND, "private key not found in keystore" },
{ PK11_R_NO_OBJECT_FOUND, "specified object not found" },
{ PK11_R_PIN_CACHING_POLICY_INVALID, "PIN set but caching policy invalid" },
{ PK11_R_SYSCONF_FAILED, "sysconf failed" },
{ PK11_R_MMAP_FAILED, "mmap failed" },
{ PK11_R_PRIV_PROC_LOCK_MEMORY_MISSING, "PROC_LOCK_MEMORY privilege missing" },
{ PK11_R_MLOCK_FAILED, "mlock failed" },
{ PK11_R_FORK_FAILED, "fork failed" },
{ 0, NULL}
};
#endif /* OPENSSL_NO_ERR */
static int pk11_lib_error_code = 0;
#ifdef PK11_ENGINE_LIB_NAME
{
{0, PK11_ENGINE_LIB_NAME},
{0, NULL}
};
#endif
static void
ERR_load_pk11_strings(void)
{
if (pk11_lib_error_code == 0) {
}
if (pk11_error_init) {
pk11_error_init = 0;
#ifndef OPENSSL_NO_ERR
#endif
#ifdef PK11_ENGINE_LIB_NAME
ERR_PACK(pk11_lib_error_code, 0, 0);
#endif
}
}
static void
ERR_unload_pk11_strings(void)
{
if (pk11_error_init == 0) {
#ifndef OPENSSL_NO_ERR
#endif
#ifdef PK11_ENGINE_LIB_NAME
#endif
pk11_error_init = 1;
}
}
void
{
if (pk11_lib_error_code == 0) {
}
}
void
{
}