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
9296465Sdelphij *    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
56296465Sdelphij# define HEADER_CAPI_ERR_H
57183234Ssimon
58237998Sjkim#ifdef  __cplusplus
59237998Sjkimextern "C" {
60237998Sjkim#endif
61237998Sjkim
62183234Ssimon/* BEGIN ERROR CODES */
63296465Sdelphij/*
64296465Sdelphij * The following lines are auto generated by the script mkerr.pl. Any changes
65183234Ssimon * made after this point may be overwritten when the script is next run.
66183234Ssimon */
67183234Ssimonstatic void ERR_load_CAPI_strings(void);
68183234Ssimonstatic void ERR_unload_CAPI_strings(void);
69183234Ssimonstatic void ERR_CAPI_error(int function, int reason, char *file, int line);
70296465Sdelphij# define CAPIerr(f,r) ERR_CAPI_error((f),(r),__FILE__,__LINE__)
71183234Ssimon
72183234Ssimon/* Error codes for the CAPI functions. */
73183234Ssimon
74183234Ssimon/* Function codes. */
75296465Sdelphij# define CAPI_F_CAPI_CERT_GET_FNAME                       99
76296465Sdelphij# define CAPI_F_CAPI_CTRL                                 100
77296465Sdelphij# define CAPI_F_CAPI_CTX_NEW                              101
78296465Sdelphij# define CAPI_F_CAPI_CTX_SET_PROVNAME                     102
79296465Sdelphij# define CAPI_F_CAPI_DSA_DO_SIGN                          114
80296465Sdelphij# define CAPI_F_CAPI_GET_KEY                              103
81296465Sdelphij# define CAPI_F_CAPI_GET_PKEY                             115
82296465Sdelphij# define CAPI_F_CAPI_GET_PROVNAME                         104
83296465Sdelphij# define CAPI_F_CAPI_GET_PROV_INFO                        105
84296465Sdelphij# define CAPI_F_CAPI_INIT                                 106
85296465Sdelphij# define CAPI_F_CAPI_LIST_CONTAINERS                      107
86296465Sdelphij# define CAPI_F_CAPI_LOAD_PRIVKEY                         108
87296465Sdelphij# define CAPI_F_CAPI_OPEN_STORE                           109
88296465Sdelphij# define CAPI_F_CAPI_RSA_PRIV_DEC                         110
89296465Sdelphij# define CAPI_F_CAPI_RSA_PRIV_ENC                         111
90296465Sdelphij# define CAPI_F_CAPI_RSA_SIGN                             112
91296465Sdelphij# define CAPI_F_CERT_SELECT_DIALOG                        117
92296465Sdelphij# define CAPI_F_CLIENT_CERT_SELECT                        116
93296465Sdelphij# define CAPI_F_WIDE_TO_ASC                               113
94183234Ssimon
95183234Ssimon/* Reason codes. */
96296465Sdelphij# define CAPI_R_CANT_CREATE_HASH_OBJECT                   99
97296465Sdelphij# define CAPI_R_CANT_FIND_CAPI_CONTEXT                    100
98296465Sdelphij# define CAPI_R_CANT_GET_KEY                              101
99296465Sdelphij# define CAPI_R_CANT_SET_HASH_VALUE                       102
100296465Sdelphij# define CAPI_R_CRYPTACQUIRECONTEXT_ERROR                 103
101296465Sdelphij# define CAPI_R_CRYPTENUMPROVIDERS_ERROR                  104
102296465Sdelphij# define CAPI_R_DECRYPT_ERROR                             105
103296465Sdelphij# define CAPI_R_ENGINE_NOT_INITIALIZED                    106
104296465Sdelphij# define CAPI_R_ENUMCONTAINERS_ERROR                      107
105296465Sdelphij# define CAPI_R_ERROR_ADDING_CERT                         125
106296465Sdelphij# define CAPI_R_ERROR_CREATING_STORE                      126
107296465Sdelphij# define CAPI_R_ERROR_GETTING_FRIENDLY_NAME               108
108296465Sdelphij# define CAPI_R_ERROR_GETTING_KEY_PROVIDER_INFO           109
109296465Sdelphij# define CAPI_R_ERROR_OPENING_STORE                       110
110296465Sdelphij# define CAPI_R_ERROR_SIGNING_HASH                        111
111296465Sdelphij# define CAPI_R_FUNCTION_NOT_SUPPORTED                    112
112296465Sdelphij# define CAPI_R_GETUSERKEY_ERROR                          113
113296465Sdelphij# define CAPI_R_INVALID_DIGEST_LENGTH                     124
114296465Sdelphij# define CAPI_R_INVALID_DSA_PUBLIC_KEY_BLOB_MAGIC_NUMBER  122
115296465Sdelphij# define CAPI_R_INVALID_LOOKUP_METHOD                     114
116296465Sdelphij# define CAPI_R_INVALID_PUBLIC_KEY_BLOB                   115
117296465Sdelphij# define CAPI_R_INVALID_RSA_PUBLIC_KEY_BLOB_MAGIC_NUMBER  123
118296465Sdelphij# define CAPI_R_PUBKEY_EXPORT_ERROR                       116
119296465Sdelphij# define CAPI_R_PUBKEY_EXPORT_LENGTH_ERROR                117
120296465Sdelphij# define CAPI_R_UNKNOWN_COMMAND                           118
121296465Sdelphij# define CAPI_R_UNSUPPORTED_ALGORITHM_NID                 119
122296465Sdelphij# define CAPI_R_UNSUPPORTED_PADDING                       120
123296465Sdelphij# define CAPI_R_UNSUPPORTED_PUBLIC_KEY_ALGORITHM          121
124296465Sdelphij# define CAPI_R_WIN32_ERROR                               127
125183234Ssimon
126183234Ssimon#ifdef  __cplusplus
127183234Ssimon}
128183234Ssimon#endif
129183234Ssimon#endif
130