1160814Ssimon/* e_aep_err.c */ 2160814Ssimon/* ==================================================================== 3160814Ssimon * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 4160814Ssimon * 5160814Ssimon * Redistribution and use in source and binary forms, with or without 6160814Ssimon * modification, are permitted provided that the following conditions 7160814Ssimon * are met: 8160814Ssimon * 9160814Ssimon * 1. Redistributions of source code must retain the above copyright 10296465Sdelphij * notice, this list of conditions and the following disclaimer. 11160814Ssimon * 12160814Ssimon * 2. Redistributions in binary form must reproduce the above copyright 13160814Ssimon * notice, this list of conditions and the following disclaimer in 14160814Ssimon * the documentation and/or other materials provided with the 15160814Ssimon * distribution. 16160814Ssimon * 17160814Ssimon * 3. All advertising materials mentioning features or use of this 18160814Ssimon * software must display the following acknowledgment: 19160814Ssimon * "This product includes software developed by the OpenSSL Project 20160814Ssimon * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 21160814Ssimon * 22160814Ssimon * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23160814Ssimon * endorse or promote products derived from this software without 24160814Ssimon * prior written permission. For written permission, please contact 25160814Ssimon * openssl-core@OpenSSL.org. 26160814Ssimon * 27160814Ssimon * 5. Products derived from this software may not be called "OpenSSL" 28160814Ssimon * nor may "OpenSSL" appear in their names without prior written 29160814Ssimon * permission of the OpenSSL Project. 30160814Ssimon * 31160814Ssimon * 6. Redistributions of any form whatsoever must retain the following 32160814Ssimon * acknowledgment: 33160814Ssimon * "This product includes software developed by the OpenSSL Project 34160814Ssimon * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 35160814Ssimon * 36160814Ssimon * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37160814Ssimon * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38160814Ssimon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39160814Ssimon * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40160814Ssimon * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41160814Ssimon * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42160814Ssimon * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43160814Ssimon * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44160814Ssimon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45160814Ssimon * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46160814Ssimon * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47160814Ssimon * OF THE POSSIBILITY OF SUCH DAMAGE. 48160814Ssimon * ==================================================================== 49160814Ssimon * 50160814Ssimon * This product includes cryptographic software written by Eric Young 51160814Ssimon * (eay@cryptsoft.com). This product includes software written by Tim 52160814Ssimon * Hudson (tjh@cryptsoft.com). 53160814Ssimon * 54160814Ssimon */ 55160814Ssimon 56296465Sdelphij/* 57296465Sdelphij * NOTE: this file was auto generated by the mkerr.pl script: any changes 58160814Ssimon * made to it will be overwritten when the script next updates this file, 59160814Ssimon * only reason strings will be preserved. 60160814Ssimon */ 61160814Ssimon 62160814Ssimon#include <stdio.h> 63160814Ssimon#include <openssl/err.h> 64160814Ssimon#include "e_aep_err.h" 65160814Ssimon 66160814Ssimon/* BEGIN ERROR CODES */ 67160814Ssimon#ifndef OPENSSL_NO_ERR 68160814Ssimon 69296465Sdelphij# define ERR_FUNC(func) ERR_PACK(0,func,0) 70296465Sdelphij# define ERR_REASON(reason) ERR_PACK(0,0,reason) 71160814Ssimon 72296465Sdelphijstatic ERR_STRING_DATA AEPHK_str_functs[] = { 73296465Sdelphij {ERR_FUNC(AEPHK_F_AEP_CTRL), "AEP_CTRL"}, 74296465Sdelphij {ERR_FUNC(AEPHK_F_AEP_FINISH), "AEP_FINISH"}, 75296465Sdelphij {ERR_FUNC(AEPHK_F_AEP_GET_CONNECTION), "AEP_GET_CONNECTION"}, 76296465Sdelphij {ERR_FUNC(AEPHK_F_AEP_INIT), "AEP_INIT"}, 77296465Sdelphij {ERR_FUNC(AEPHK_F_AEP_MOD_EXP), "AEP_MOD_EXP"}, 78296465Sdelphij {ERR_FUNC(AEPHK_F_AEP_MOD_EXP_CRT), "AEP_MOD_EXP_CRT"}, 79296465Sdelphij {ERR_FUNC(AEPHK_F_AEP_RAND), "AEP_RAND"}, 80296465Sdelphij {ERR_FUNC(AEPHK_F_AEP_RSA_MOD_EXP), "AEP_RSA_MOD_EXP"}, 81296465Sdelphij {0, NULL} 82296465Sdelphij}; 83160814Ssimon 84296465Sdelphijstatic ERR_STRING_DATA AEPHK_str_reasons[] = { 85296465Sdelphij {ERR_REASON(AEPHK_R_ALREADY_LOADED), "already loaded"}, 86296465Sdelphij {ERR_REASON(AEPHK_R_CLOSE_HANDLES_FAILED), "close handles failed"}, 87296465Sdelphij {ERR_REASON(AEPHK_R_CONNECTIONS_IN_USE), "connections in use"}, 88296465Sdelphij {ERR_REASON(AEPHK_R_CTRL_COMMAND_NOT_IMPLEMENTED), 89296465Sdelphij "ctrl command not implemented"}, 90296465Sdelphij {ERR_REASON(AEPHK_R_FINALIZE_FAILED), "finalize failed"}, 91296465Sdelphij {ERR_REASON(AEPHK_R_GET_HANDLE_FAILED), "get handle failed"}, 92296465Sdelphij {ERR_REASON(AEPHK_R_GET_RANDOM_FAILED), "get random failed"}, 93296465Sdelphij {ERR_REASON(AEPHK_R_INIT_FAILURE), "init failure"}, 94296465Sdelphij {ERR_REASON(AEPHK_R_MISSING_KEY_COMPONENTS), "missing key components"}, 95296465Sdelphij {ERR_REASON(AEPHK_R_MOD_EXP_CRT_FAILED), "mod exp crt failed"}, 96296465Sdelphij {ERR_REASON(AEPHK_R_MOD_EXP_FAILED), "mod exp failed"}, 97296465Sdelphij {ERR_REASON(AEPHK_R_NOT_LOADED), "not loaded"}, 98296465Sdelphij {ERR_REASON(AEPHK_R_OK), "ok"}, 99296465Sdelphij {ERR_REASON(AEPHK_R_RETURN_CONNECTION_FAILED), 100296465Sdelphij "return connection failed"}, 101296465Sdelphij {ERR_REASON(AEPHK_R_SETBNCALLBACK_FAILURE), "setbncallback failure"}, 102296465Sdelphij {ERR_REASON(AEPHK_R_SIZE_TOO_LARGE_OR_TOO_SMALL), 103296465Sdelphij "size too large or too small"}, 104296465Sdelphij {ERR_REASON(AEPHK_R_UNIT_FAILURE), "unit failure"}, 105296465Sdelphij {0, NULL} 106296465Sdelphij}; 107160814Ssimon 108160814Ssimon#endif 109160814Ssimon 110160814Ssimon#ifdef AEPHK_LIB_NAME 111296465Sdelphijstatic ERR_STRING_DATA AEPHK_lib_name[] = { 112296465Sdelphij {0, AEPHK_LIB_NAME}, 113296465Sdelphij {0, NULL} 114296465Sdelphij}; 115160814Ssimon#endif 116160814Ssimon 117296465Sdelphijstatic int AEPHK_lib_error_code = 0; 118296465Sdelphijstatic int AEPHK_error_init = 1; 119160814Ssimon 120160814Ssimonstatic void ERR_load_AEPHK_strings(void) 121296465Sdelphij{ 122296465Sdelphij if (AEPHK_lib_error_code == 0) 123296465Sdelphij AEPHK_lib_error_code = ERR_get_next_error_library(); 124160814Ssimon 125296465Sdelphij if (AEPHK_error_init) { 126296465Sdelphij AEPHK_error_init = 0; 127160814Ssimon#ifndef OPENSSL_NO_ERR 128296465Sdelphij ERR_load_strings(AEPHK_lib_error_code, AEPHK_str_functs); 129296465Sdelphij ERR_load_strings(AEPHK_lib_error_code, AEPHK_str_reasons); 130160814Ssimon#endif 131160814Ssimon 132160814Ssimon#ifdef AEPHK_LIB_NAME 133296465Sdelphij AEPHK_lib_name->error = ERR_PACK(AEPHK_lib_error_code, 0, 0); 134296465Sdelphij ERR_load_strings(0, AEPHK_lib_name); 135160814Ssimon#endif 136296465Sdelphij } 137296465Sdelphij} 138160814Ssimon 139160814Ssimonstatic void ERR_unload_AEPHK_strings(void) 140296465Sdelphij{ 141296465Sdelphij if (AEPHK_error_init == 0) { 142160814Ssimon#ifndef OPENSSL_NO_ERR 143296465Sdelphij ERR_unload_strings(AEPHK_lib_error_code, AEPHK_str_functs); 144296465Sdelphij ERR_unload_strings(AEPHK_lib_error_code, AEPHK_str_reasons); 145160814Ssimon#endif 146160814Ssimon 147160814Ssimon#ifdef AEPHK_LIB_NAME 148296465Sdelphij ERR_unload_strings(0, AEPHK_lib_name); 149160814Ssimon#endif 150296465Sdelphij AEPHK_error_init = 1; 151296465Sdelphij } 152296465Sdelphij} 153160814Ssimon 154160814Ssimonstatic void ERR_AEPHK_error(int function, int reason, char *file, int line) 155296465Sdelphij{ 156296465Sdelphij if (AEPHK_lib_error_code == 0) 157296465Sdelphij AEPHK_lib_error_code = ERR_get_next_error_library(); 158296465Sdelphij ERR_PUT_error(AEPHK_lib_error_code, function, reason, file, line); 159296465Sdelphij} 160