hw_ibmca_err.h revision 296465
1109998Smarkm/* ==================================================================== 2109998Smarkm * Copyright (c) 2001-2002 The OpenSSL Project. All rights reserved. 3109998Smarkm * 4109998Smarkm * Redistribution and use in source and binary forms, with or without 5109998Smarkm * modification, are permitted provided that the following conditions 6109998Smarkm * are met: 7109998Smarkm * 8109998Smarkm * 1. Redistributions of source code must retain the above copyright 9296465Sdelphij * notice, this list of conditions and the following disclaimer. 10109998Smarkm * 11109998Smarkm * 2. Redistributions in binary form must reproduce the above copyright 12109998Smarkm * notice, this list of conditions and the following disclaimer in 13109998Smarkm * the documentation and/or other materials provided with the 14109998Smarkm * distribution. 15109998Smarkm * 16109998Smarkm * 3. All advertising materials mentioning features or use of this 17109998Smarkm * software must display the following acknowledgment: 18109998Smarkm * "This product includes software developed by the OpenSSL Project 19109998Smarkm * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 20109998Smarkm * 21109998Smarkm * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 22109998Smarkm * endorse or promote products derived from this software without 23109998Smarkm * prior written permission. For written permission, please contact 24109998Smarkm * openssl-core@openssl.org. 25109998Smarkm * 26109998Smarkm * 5. Products derived from this software may not be called "OpenSSL" 27109998Smarkm * nor may "OpenSSL" appear in their names without prior written 28109998Smarkm * permission of the OpenSSL Project. 29109998Smarkm * 30109998Smarkm * 6. Redistributions of any form whatsoever must retain the following 31109998Smarkm * acknowledgment: 32109998Smarkm * "This product includes software developed by the OpenSSL Project 33109998Smarkm * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 34109998Smarkm * 35109998Smarkm * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 36109998Smarkm * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 37109998Smarkm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 38109998Smarkm * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 39109998Smarkm * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40109998Smarkm * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 41109998Smarkm * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 42109998Smarkm * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 43109998Smarkm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 44109998Smarkm * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 45109998Smarkm * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 46109998Smarkm * OF THE POSSIBILITY OF SUCH DAMAGE. 47109998Smarkm * ==================================================================== 48109998Smarkm * 49109998Smarkm * This product includes cryptographic software written by Eric Young 50109998Smarkm * (eay@cryptsoft.com). This product includes software written by Tim 51109998Smarkm * Hudson (tjh@cryptsoft.com). 52109998Smarkm * 53109998Smarkm */ 54109998Smarkm 55109998Smarkm#ifndef HEADER_IBMCA_ERR_H 56296465Sdelphij# define HEADER_IBMCA_ERR_H 57109998Smarkm 58194206Ssimon#ifdef __cplusplus 59194206Ssimonextern "C" { 60194206Ssimon#endif 61194206Ssimon 62109998Smarkm/* BEGIN ERROR CODES */ 63296465Sdelphij/* 64296465Sdelphij * The following lines are auto generated by the script mkerr.pl. Any changes 65109998Smarkm * made after this point may be overwritten when the script is next run. 66109998Smarkm */ 67109998Smarkmstatic void ERR_load_IBMCA_strings(void); 68109998Smarkmstatic void ERR_unload_IBMCA_strings(void); 69109998Smarkmstatic void ERR_IBMCA_error(int function, int reason, char *file, int line); 70296465Sdelphij# define IBMCAerr(f,r) ERR_IBMCA_error((f),(r),__FILE__,__LINE__) 71109998Smarkm 72109998Smarkm/* Error codes for the IBMCA functions. */ 73109998Smarkm 74109998Smarkm/* Function codes. */ 75296465Sdelphij# define IBMCA_F_IBMCA_CTRL 100 76296465Sdelphij# define IBMCA_F_IBMCA_FINISH 101 77296465Sdelphij# define IBMCA_F_IBMCA_INIT 102 78296465Sdelphij# define IBMCA_F_IBMCA_MOD_EXP 103 79296465Sdelphij# define IBMCA_F_IBMCA_MOD_EXP_CRT 104 80296465Sdelphij# define IBMCA_F_IBMCA_RAND_BYTES 105 81296465Sdelphij# define IBMCA_F_IBMCA_RSA_MOD_EXP 106 82109998Smarkm 83109998Smarkm/* Reason codes. */ 84296465Sdelphij# define IBMCA_R_ALREADY_LOADED 100 85296465Sdelphij# define IBMCA_R_BN_CTX_FULL 101 86296465Sdelphij# define IBMCA_R_BN_EXPAND_FAIL 102 87296465Sdelphij# define IBMCA_R_CTRL_COMMAND_NOT_IMPLEMENTED 103 88296465Sdelphij# define IBMCA_R_DSO_FAILURE 104 89296465Sdelphij# define IBMCA_R_MEXP_LENGTH_TO_LARGE 105 90296465Sdelphij# define IBMCA_R_MISSING_KEY_COMPONENTS 106 91296465Sdelphij# define IBMCA_R_NOT_INITIALISED 107 92296465Sdelphij# define IBMCA_R_NOT_LOADED 108 93296465Sdelphij# define IBMCA_R_OPERANDS_TO_LARGE 109 94296465Sdelphij# define IBMCA_R_OUTLEN_TO_LARGE 110 95296465Sdelphij# define IBMCA_R_REQUEST_FAILED 111 96296465Sdelphij# define IBMCA_R_UNDERFLOW_CONDITION 112 97296465Sdelphij# define IBMCA_R_UNDERFLOW_KEYRECORD 113 98296465Sdelphij# define IBMCA_R_UNIT_FAILURE 114 99109998Smarkm 100109998Smarkm#ifdef __cplusplus 101109998Smarkm} 102109998Smarkm#endif 103109998Smarkm#endif 104