1109998Smarkm/* hw_zencod_err.c */ 2109998Smarkm/* ==================================================================== 3109998Smarkm * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. 4109998Smarkm * 5109998Smarkm * Redistribution and use in source and binary forms, with or without 6109998Smarkm * modification, are permitted provided that the following conditions 7109998Smarkm * are met: 8109998Smarkm * 9109998Smarkm * 1. Redistributions of source code must retain the above copyright 10296465Sdelphij * notice, this list of conditions and the following disclaimer. 11109998Smarkm * 12109998Smarkm * 2. Redistributions in binary form must reproduce the above copyright 13109998Smarkm * notice, this list of conditions and the following disclaimer in 14109998Smarkm * the documentation and/or other materials provided with the 15109998Smarkm * distribution. 16109998Smarkm * 17109998Smarkm * 3. All advertising materials mentioning features or use of this 18109998Smarkm * software must display the following acknowledgment: 19109998Smarkm * "This product includes software developed by the OpenSSL Project 20109998Smarkm * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 21109998Smarkm * 22109998Smarkm * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23109998Smarkm * endorse or promote products derived from this software without 24109998Smarkm * prior written permission. For written permission, please contact 25109998Smarkm * openssl-core@OpenSSL.org. 26109998Smarkm * 27109998Smarkm * 5. Products derived from this software may not be called "OpenSSL" 28109998Smarkm * nor may "OpenSSL" appear in their names without prior written 29109998Smarkm * permission of the OpenSSL Project. 30109998Smarkm * 31109998Smarkm * 6. Redistributions of any form whatsoever must retain the following 32109998Smarkm * acknowledgment: 33109998Smarkm * "This product includes software developed by the OpenSSL Project 34109998Smarkm * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 35109998Smarkm * 36109998Smarkm * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37109998Smarkm * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38109998Smarkm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39109998Smarkm * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40109998Smarkm * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41109998Smarkm * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42109998Smarkm * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43109998Smarkm * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44109998Smarkm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45109998Smarkm * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46109998Smarkm * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47109998Smarkm * OF THE POSSIBILITY OF SUCH DAMAGE. 48109998Smarkm * ==================================================================== 49109998Smarkm * 50109998Smarkm * This product includes cryptographic software written by Eric Young 51109998Smarkm * (eay@cryptsoft.com). This product includes software written by Tim 52109998Smarkm * Hudson (tjh@cryptsoft.com). 53109998Smarkm * 54109998Smarkm */ 55109998Smarkm 56296465Sdelphij/* 57296465Sdelphij * NOTE: this file was auto generated by the mkerr.pl script: any changes 58109998Smarkm * made to it will be overwritten when the script next updates this file, 59109998Smarkm * only reason strings will be preserved. 60109998Smarkm */ 61109998Smarkm 62109998Smarkm#include <stdio.h> 63109998Smarkm#include <openssl/err.h> 64109998Smarkm#include "hw_zencod_err.h" 65109998Smarkm 66109998Smarkm/* BEGIN ERROR CODES */ 67109998Smarkm#ifndef OPENSSL_NO_ERR 68296465Sdelphijstatic ERR_STRING_DATA ZENCOD_str_functs[] = { 69296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_BN_MOD_EXP, 0), "ZENCOD_BN_MOD_EXP"}, 70296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_CTRL, 0), "ZENCOD_CTRL"}, 71296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_DH_COMPUTE, 0), "ZENCOD_DH_COMPUTE"}, 72296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_DH_GENERATE, 0), "ZENCOD_DH_GENERATE"}, 73296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_DSA_DO_SIGN, 0), "ZENCOD_DSA_DO_SIGN"}, 74296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_DSA_DO_VERIFY, 0), "ZENCOD_DSA_DO_VERIFY"}, 75296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_FINISH, 0), "ZENCOD_FINISH"}, 76296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_INIT, 0), "ZENCOD_INIT"}, 77296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_RAND, 0), "ZENCOD_RAND"}, 78296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_RSA_MOD_EXP, 0), "ZENCOD_RSA_MOD_EXP"}, 79296465Sdelphij {ERR_PACK(0, ZENCOD_F_ZENCOD_RSA_MOD_EXP_CRT, 0), 80296465Sdelphij "ZENCOD_RSA_MOD_EXP_CRT"}, 81296465Sdelphij {0, NULL} 82296465Sdelphij}; 83109998Smarkm 84296465Sdelphijstatic ERR_STRING_DATA ZENCOD_str_reasons[] = { 85296465Sdelphij {ZENCOD_R_ALREADY_LOADED, "already loaded"}, 86296465Sdelphij {ZENCOD_R_BAD_KEY_COMPONENTS, "bad key components"}, 87296465Sdelphij {ZENCOD_R_BN_EXPAND_FAIL, "bn expand fail"}, 88296465Sdelphij {ZENCOD_R_CTRL_COMMAND_NOT_IMPLEMENTED, "ctrl command not implemented"}, 89296465Sdelphij {ZENCOD_R_DSO_FAILURE, "dso failure"}, 90296465Sdelphij {ZENCOD_R_NOT_LOADED, "not loaded"}, 91296465Sdelphij {ZENCOD_R_REQUEST_FAILED, "request failed"}, 92296465Sdelphij {ZENCOD_R_UNIT_FAILURE, "unit failure"}, 93296465Sdelphij {0, NULL} 94296465Sdelphij}; 95109998Smarkm 96109998Smarkm#endif 97109998Smarkm 98109998Smarkm#ifdef ZENCOD_LIB_NAME 99296465Sdelphijstatic ERR_STRING_DATA ZENCOD_lib_name[] = { 100296465Sdelphij {0, ZENCOD_LIB_NAME}, 101296465Sdelphij {0, NULL} 102296465Sdelphij}; 103109998Smarkm#endif 104109998Smarkm 105296465Sdelphijstatic int ZENCOD_lib_error_code = 0; 106296465Sdelphijstatic int ZENCOD_error_init = 1; 107109998Smarkm 108109998Smarkmstatic void ERR_load_ZENCOD_strings(void) 109296465Sdelphij{ 110296465Sdelphij if (ZENCOD_lib_error_code == 0) 111296465Sdelphij ZENCOD_lib_error_code = ERR_get_next_error_library(); 112109998Smarkm 113296465Sdelphij if (ZENCOD_error_init) { 114296465Sdelphij ZENCOD_error_init = 0; 115109998Smarkm#ifndef OPENSSL_NO_ERR 116296465Sdelphij ERR_load_strings(ZENCOD_lib_error_code, ZENCOD_str_functs); 117296465Sdelphij ERR_load_strings(ZENCOD_lib_error_code, ZENCOD_str_reasons); 118109998Smarkm#endif 119109998Smarkm 120109998Smarkm#ifdef ZENCOD_LIB_NAME 121296465Sdelphij ZENCOD_lib_name->error = ERR_PACK(ZENCOD_lib_error_code, 0, 0); 122296465Sdelphij ERR_load_strings(0, ZENCOD_lib_name); 123109998Smarkm#endif 124296465Sdelphij } 125296465Sdelphij} 126109998Smarkm 127109998Smarkmstatic void ERR_unload_ZENCOD_strings(void) 128296465Sdelphij{ 129296465Sdelphij if (ZENCOD_error_init == 0) { 130109998Smarkm#ifndef OPENSSL_NO_ERR 131296465Sdelphij ERR_unload_strings(ZENCOD_lib_error_code, ZENCOD_str_functs); 132296465Sdelphij ERR_unload_strings(ZENCOD_lib_error_code, ZENCOD_str_reasons); 133109998Smarkm#endif 134109998Smarkm 135109998Smarkm#ifdef ZENCOD_LIB_NAME 136296465Sdelphij ERR_unload_strings(0, ZENCOD_lib_name); 137109998Smarkm#endif 138296465Sdelphij ZENCOD_error_init = 1; 139296465Sdelphij } 140296465Sdelphij} 141109998Smarkm 142109998Smarkmstatic void ERR_ZENCOD_error(int function, int reason, char *file, int line) 143296465Sdelphij{ 144296465Sdelphij if (ZENCOD_lib_error_code == 0) 145296465Sdelphij ZENCOD_lib_error_code = ERR_get_next_error_library(); 146296465Sdelphij ERR_PUT_error(ZENCOD_lib_error_code, function, reason, file, line); 147296465Sdelphij} 148