hw_ibmca_err.h revision 109998
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
9109998Smarkm *    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
56109998Smarkm#define HEADER_IBMCA_ERR_H
57109998Smarkm
58109998Smarkm/* BEGIN ERROR CODES */
59109998Smarkm/* The following lines are auto generated by the script mkerr.pl. Any changes
60109998Smarkm * made after this point may be overwritten when the script is next run.
61109998Smarkm */
62109998Smarkmstatic void ERR_load_IBMCA_strings(void);
63109998Smarkmstatic void ERR_unload_IBMCA_strings(void);
64109998Smarkmstatic void ERR_IBMCA_error(int function, int reason, char *file, int line);
65109998Smarkm#define IBMCAerr(f,r) ERR_IBMCA_error((f),(r),__FILE__,__LINE__)
66109998Smarkm
67109998Smarkm/* Error codes for the IBMCA functions. */
68109998Smarkm
69109998Smarkm/* Function codes. */
70109998Smarkm#define IBMCA_F_IBMCA_CTRL				 100
71109998Smarkm#define IBMCA_F_IBMCA_FINISH				 101
72109998Smarkm#define IBMCA_F_IBMCA_INIT				 102
73109998Smarkm#define IBMCA_F_IBMCA_MOD_EXP				 103
74109998Smarkm#define IBMCA_F_IBMCA_MOD_EXP_CRT			 104
75109998Smarkm#define IBMCA_F_IBMCA_RAND_BYTES			 105
76109998Smarkm#define IBMCA_F_IBMCA_RSA_MOD_EXP			 106
77109998Smarkm
78109998Smarkm/* Reason codes. */
79109998Smarkm#define IBMCA_R_ALREADY_LOADED				 100
80109998Smarkm#define IBMCA_R_BN_CTX_FULL				 101
81109998Smarkm#define IBMCA_R_BN_EXPAND_FAIL				 102
82109998Smarkm#define IBMCA_R_CTRL_COMMAND_NOT_IMPLEMENTED		 103
83109998Smarkm#define IBMCA_R_DSO_FAILURE				 104
84109998Smarkm#define IBMCA_R_MEXP_LENGTH_TO_LARGE			 105
85109998Smarkm#define IBMCA_R_MISSING_KEY_COMPONENTS			 106
86109998Smarkm#define IBMCA_R_NOT_INITIALISED				 107
87109998Smarkm#define IBMCA_R_NOT_LOADED				 108
88109998Smarkm#define IBMCA_R_OPERANDS_TO_LARGE			 109
89109998Smarkm#define IBMCA_R_OUTLEN_TO_LARGE				 110
90109998Smarkm#define IBMCA_R_REQUEST_FAILED				 111
91109998Smarkm#define IBMCA_R_UNDERFLOW_CONDITION			 112
92109998Smarkm#define IBMCA_R_UNDERFLOW_KEYRECORD			 113
93109998Smarkm#define IBMCA_R_UNIT_FAILURE				 114
94109998Smarkm
95109998Smarkm#ifdef  __cplusplus
96109998Smarkm}
97109998Smarkm#endif
98109998Smarkm#endif
99