e_capi_err.h revision 237998
1183234Ssimon/* ====================================================================
2183234Ssimon * Copyright (c) 2001-2008 The OpenSSL Project.  All rights reserved.
3183234Ssimon *
4183234Ssimon * Redistribution and use in source and binary forms, with or without
5183234Ssimon * modification, are permitted provided that the following conditions
6183234Ssimon * are met:
7183234Ssimon *
8183234Ssimon * 1. Redistributions of source code must retain the above copyright
9183234Ssimon *    notice, this list of conditions and the following disclaimer.
10183234Ssimon *
11183234Ssimon * 2. Redistributions in binary form must reproduce the above copyright
12183234Ssimon *    notice, this list of conditions and the following disclaimer in
13183234Ssimon *    the documentation and/or other materials provided with the
14183234Ssimon *    distribution.
15183234Ssimon *
16183234Ssimon * 3. All advertising materials mentioning features or use of this
17183234Ssimon *    software must display the following acknowledgment:
18183234Ssimon *    "This product includes software developed by the OpenSSL Project
19183234Ssimon *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20183234Ssimon *
21183234Ssimon * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
22183234Ssimon *    endorse or promote products derived from this software without
23183234Ssimon *    prior written permission. For written permission, please contact
24183234Ssimon *    openssl-core@openssl.org.
25183234Ssimon *
26183234Ssimon * 5. Products derived from this software may not be called "OpenSSL"
27183234Ssimon *    nor may "OpenSSL" appear in their names without prior written
28183234Ssimon *    permission of the OpenSSL Project.
29183234Ssimon *
30183234Ssimon * 6. Redistributions of any form whatsoever must retain the following
31183234Ssimon *    acknowledgment:
32183234Ssimon *    "This product includes software developed by the OpenSSL Project
33183234Ssimon *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
34183234Ssimon *
35183234Ssimon * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
36183234Ssimon * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37183234Ssimon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
38183234Ssimon * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
39183234Ssimon * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40183234Ssimon * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
41183234Ssimon * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
42183234Ssimon * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
43183234Ssimon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
44183234Ssimon * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
45183234Ssimon * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
46183234Ssimon * OF THE POSSIBILITY OF SUCH DAMAGE.
47183234Ssimon * ====================================================================
48183234Ssimon *
49183234Ssimon * This product includes cryptographic software written by Eric Young
50183234Ssimon * (eay@cryptsoft.com).  This product includes software written by Tim
51183234Ssimon * Hudson (tjh@cryptsoft.com).
52183234Ssimon *
53183234Ssimon */
54183234Ssimon
55183234Ssimon#ifndef HEADER_CAPI_ERR_H
56183234Ssimon#define HEADER_CAPI_ERR_H
57183234Ssimon
58237998Sjkim#ifdef  __cplusplus
59237998Sjkimextern "C" {
60237998Sjkim#endif
61237998Sjkim
62183234Ssimon/* BEGIN ERROR CODES */
63183234Ssimon/* The following lines are auto generated by the script mkerr.pl. Any changes
64183234Ssimon * made after this point may be overwritten when the script is next run.
65183234Ssimon */
66183234Ssimonstatic void ERR_load_CAPI_strings(void);
67183234Ssimonstatic void ERR_unload_CAPI_strings(void);
68183234Ssimonstatic void ERR_CAPI_error(int function, int reason, char *file, int line);
69183234Ssimon#define CAPIerr(f,r) ERR_CAPI_error((f),(r),__FILE__,__LINE__)
70183234Ssimon
71183234Ssimon/* Error codes for the CAPI functions. */
72183234Ssimon
73183234Ssimon/* Function codes. */
74183234Ssimon#define CAPI_F_CAPI_CERT_GET_FNAME			 99
75183234Ssimon#define CAPI_F_CAPI_CTRL				 100
76183234Ssimon#define CAPI_F_CAPI_CTX_NEW				 101
77183234Ssimon#define CAPI_F_CAPI_CTX_SET_PROVNAME			 102
78183234Ssimon#define CAPI_F_CAPI_DSA_DO_SIGN				 114
79183234Ssimon#define CAPI_F_CAPI_GET_KEY				 103
80183234Ssimon#define CAPI_F_CAPI_GET_PKEY				 115
81183234Ssimon#define CAPI_F_CAPI_GET_PROVNAME			 104
82183234Ssimon#define CAPI_F_CAPI_GET_PROV_INFO			 105
83183234Ssimon#define CAPI_F_CAPI_INIT				 106
84183234Ssimon#define CAPI_F_CAPI_LIST_CONTAINERS			 107
85183234Ssimon#define CAPI_F_CAPI_LOAD_PRIVKEY			 108
86183234Ssimon#define CAPI_F_CAPI_OPEN_STORE				 109
87183234Ssimon#define CAPI_F_CAPI_RSA_PRIV_DEC			 110
88183234Ssimon#define CAPI_F_CAPI_RSA_PRIV_ENC			 111
89183234Ssimon#define CAPI_F_CAPI_RSA_SIGN				 112
90183234Ssimon#define CAPI_F_CERT_SELECT_DIALOG			 117
91183234Ssimon#define CAPI_F_CLIENT_CERT_SELECT			 116
92183234Ssimon#define CAPI_F_WIDE_TO_ASC				 113
93183234Ssimon
94183234Ssimon/* Reason codes. */
95183234Ssimon#define CAPI_R_CANT_CREATE_HASH_OBJECT			 99
96183234Ssimon#define CAPI_R_CANT_FIND_CAPI_CONTEXT			 100
97183234Ssimon#define CAPI_R_CANT_GET_KEY				 101
98183234Ssimon#define CAPI_R_CANT_SET_HASH_VALUE			 102
99183234Ssimon#define CAPI_R_CRYPTACQUIRECONTEXT_ERROR		 103
100183234Ssimon#define CAPI_R_CRYPTENUMPROVIDERS_ERROR			 104
101183234Ssimon#define CAPI_R_DECRYPT_ERROR				 105
102183234Ssimon#define CAPI_R_ENGINE_NOT_INITIALIZED			 106
103183234Ssimon#define CAPI_R_ENUMCONTAINERS_ERROR			 107
104183234Ssimon#define CAPI_R_ERROR_ADDING_CERT			 125
105183234Ssimon#define CAPI_R_ERROR_CREATING_STORE			 126
106183234Ssimon#define CAPI_R_ERROR_GETTING_FRIENDLY_NAME		 108
107183234Ssimon#define CAPI_R_ERROR_GETTING_KEY_PROVIDER_INFO		 109
108183234Ssimon#define CAPI_R_ERROR_OPENING_STORE			 110
109183234Ssimon#define CAPI_R_ERROR_SIGNING_HASH			 111
110183234Ssimon#define CAPI_R_FUNCTION_NOT_SUPPORTED			 112
111183234Ssimon#define CAPI_R_GETUSERKEY_ERROR				 113
112183234Ssimon#define CAPI_R_INVALID_DIGEST_LENGTH			 124
113183234Ssimon#define CAPI_R_INVALID_DSA_PUBLIC_KEY_BLOB_MAGIC_NUMBER	 122
114183234Ssimon#define CAPI_R_INVALID_LOOKUP_METHOD			 114
115183234Ssimon#define CAPI_R_INVALID_PUBLIC_KEY_BLOB			 115
116183234Ssimon#define CAPI_R_INVALID_RSA_PUBLIC_KEY_BLOB_MAGIC_NUMBER	 123
117183234Ssimon#define CAPI_R_PUBKEY_EXPORT_ERROR			 116
118183234Ssimon#define CAPI_R_PUBKEY_EXPORT_LENGTH_ERROR		 117
119183234Ssimon#define CAPI_R_UNKNOWN_COMMAND				 118
120183234Ssimon#define CAPI_R_UNSUPPORTED_ALGORITHM_NID		 119
121183234Ssimon#define CAPI_R_UNSUPPORTED_PADDING			 120
122183234Ssimon#define CAPI_R_UNSUPPORTED_PUBLIC_KEY_ALGORITHM		 121
123205128Ssimon#define CAPI_R_WIN32_ERROR				 127
124183234Ssimon
125183234Ssimon#ifdef  __cplusplus
126183234Ssimon}
127183234Ssimon#endif
128183234Ssimon#endif
129