If we've not been inited don't deinit
[openssl.git] / crypto / store / str_err.c
1 /* ====================================================================
2  * Copyright (c) 1999-2015 The OpenSSL Project.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  *
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in
13  *    the documentation and/or other materials provided with the
14  *    distribution.
15  *
16  * 3. All advertising materials mentioning features or use of this
17  *    software must display the following acknowledgment:
18  *    "This product includes software developed by the OpenSSL Project
19  *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
20  *
21  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
22  *    endorse or promote products derived from this software without
23  *    prior written permission. For written permission, please contact
24  *    openssl-core@OpenSSL.org.
25  *
26  * 5. Products derived from this software may not be called "OpenSSL"
27  *    nor may "OpenSSL" appear in their names without prior written
28  *    permission of the OpenSSL Project.
29  *
30  * 6. Redistributions of any form whatsoever must retain the following
31  *    acknowledgment:
32  *    "This product includes software developed by the OpenSSL Project
33  *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
34  *
35  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
36  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
38  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
39  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
41  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
42  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
43  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
44  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
45  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
46  * OF THE POSSIBILITY OF SUCH DAMAGE.
47  * ====================================================================
48  *
49  * This product includes cryptographic software written by Eric Young
50  * (eay@cryptsoft.com).  This product includes software written by Tim
51  * Hudson (tjh@cryptsoft.com).
52  *
53  */
54
55 /*
56  * NOTE: this file was auto generated by the mkerr.pl script: any changes
57  * made to it will be overwritten when the script next updates this file,
58  * only reason strings will be preserved.
59  */
60
61 #include <stdio.h>
62 #include <openssl/err.h>
63 #include <openssl/store.h>
64
65 /* BEGIN ERROR CODES */
66 #ifndef OPENSSL_NO_ERR
67
68 # define ERR_FUNC(func) ERR_PACK(ERR_LIB_STORE,func,0)
69 # define ERR_REASON(reason) ERR_PACK(ERR_LIB_STORE,0,reason)
70
71 static ERR_STRING_DATA STORE_str_functs[] = {
72     {ERR_FUNC(STORE_F_MEM_DELETE), "mem_delete"},
73     {ERR_FUNC(STORE_F_MEM_GENERATE), "mem_generate"},
74     {ERR_FUNC(STORE_F_MEM_LIST_END), "mem_list_end"},
75     {ERR_FUNC(STORE_F_MEM_LIST_NEXT), "mem_list_next"},
76     {ERR_FUNC(STORE_F_MEM_LIST_START), "mem_list_start"},
77     {ERR_FUNC(STORE_F_MEM_MODIFY), "mem_modify"},
78     {ERR_FUNC(STORE_F_MEM_STORE), "mem_store"},
79     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_GET0_CSTR),
80      "STORE_ATTR_INFO_get0_cstr"},
81     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_GET0_DN), "STORE_ATTR_INFO_get0_dn"},
82     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_GET0_NUMBER),
83      "STORE_ATTR_INFO_get0_number"},
84     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_GET0_SHA1STR),
85      "STORE_ATTR_INFO_get0_sha1str"},
86     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_MODIFY_CSTR),
87      "STORE_ATTR_INFO_modify_cstr"},
88     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_MODIFY_DN),
89      "STORE_ATTR_INFO_modify_dn"},
90     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_MODIFY_NUMBER),
91      "STORE_ATTR_INFO_modify_number"},
92     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_MODIFY_SHA1STR),
93      "STORE_ATTR_INFO_modify_sha1str"},
94     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_SET_CSTR), "STORE_ATTR_INFO_set_cstr"},
95     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_SET_DN), "STORE_ATTR_INFO_set_dn"},
96     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_SET_NUMBER),
97      "STORE_ATTR_INFO_set_number"},
98     {ERR_FUNC(STORE_F_STORE_ATTR_INFO_SET_SHA1STR),
99      "STORE_ATTR_INFO_set_sha1str"},
100     {ERR_FUNC(STORE_F_STORE_CERTIFICATE), "STORE_store_certificate"},
101     {ERR_FUNC(STORE_F_STORE_CTRL), "STORE_ctrl"},
102     {ERR_FUNC(STORE_F_STORE_DELETE_ARBITRARY), "STORE_delete_arbitrary"},
103     {ERR_FUNC(STORE_F_STORE_DELETE_CERTIFICATE), "STORE_delete_certificate"},
104     {ERR_FUNC(STORE_F_STORE_DELETE_CRL), "STORE_delete_crl"},
105     {ERR_FUNC(STORE_F_STORE_DELETE_NUMBER), "STORE_delete_number"},
106     {ERR_FUNC(STORE_F_STORE_DELETE_PRIVATE_KEY), "STORE_delete_private_key"},
107     {ERR_FUNC(STORE_F_STORE_DELETE_PUBLIC_KEY), "STORE_delete_public_key"},
108     {ERR_FUNC(STORE_F_STORE_GENERATE_CRL), "STORE_generate_crl"},
109     {ERR_FUNC(STORE_F_STORE_GENERATE_KEY), "STORE_generate_key"},
110     {ERR_FUNC(STORE_F_STORE_GET_ARBITRARY), "STORE_get_arbitrary"},
111     {ERR_FUNC(STORE_F_STORE_GET_CERTIFICATE), "STORE_get_certificate"},
112     {ERR_FUNC(STORE_F_STORE_GET_CRL), "STORE_get_crl"},
113     {ERR_FUNC(STORE_F_STORE_GET_NUMBER), "STORE_get_number"},
114     {ERR_FUNC(STORE_F_STORE_GET_PRIVATE_KEY), "STORE_get_private_key"},
115     {ERR_FUNC(STORE_F_STORE_GET_PUBLIC_KEY), "STORE_get_public_key"},
116     {ERR_FUNC(STORE_F_STORE_LIST_CERTIFICATE_END),
117      "STORE_list_certificate_end"},
118     {ERR_FUNC(STORE_F_STORE_LIST_CERTIFICATE_ENDP),
119      "STORE_list_certificate_endp"},
120     {ERR_FUNC(STORE_F_STORE_LIST_CERTIFICATE_NEXT),
121      "STORE_list_certificate_next"},
122     {ERR_FUNC(STORE_F_STORE_LIST_CERTIFICATE_START),
123      "STORE_list_certificate_start"},
124     {ERR_FUNC(STORE_F_STORE_LIST_CRL_END), "STORE_list_crl_end"},
125     {ERR_FUNC(STORE_F_STORE_LIST_CRL_ENDP), "STORE_list_crl_endp"},
126     {ERR_FUNC(STORE_F_STORE_LIST_CRL_NEXT), "STORE_list_crl_next"},
127     {ERR_FUNC(STORE_F_STORE_LIST_CRL_START), "STORE_list_crl_start"},
128     {ERR_FUNC(STORE_F_STORE_LIST_PRIVATE_KEY_END),
129      "STORE_list_private_key_end"},
130     {ERR_FUNC(STORE_F_STORE_LIST_PRIVATE_KEY_ENDP),
131      "STORE_list_private_key_endp"},
132     {ERR_FUNC(STORE_F_STORE_LIST_PRIVATE_KEY_NEXT),
133      "STORE_list_private_key_next"},
134     {ERR_FUNC(STORE_F_STORE_LIST_PRIVATE_KEY_START),
135      "STORE_list_private_key_start"},
136     {ERR_FUNC(STORE_F_STORE_LIST_PUBLIC_KEY_END),
137      "STORE_list_public_key_end"},
138     {ERR_FUNC(STORE_F_STORE_LIST_PUBLIC_KEY_ENDP),
139      "STORE_list_public_key_endp"},
140     {ERR_FUNC(STORE_F_STORE_LIST_PUBLIC_KEY_NEXT),
141      "STORE_list_public_key_next"},
142     {ERR_FUNC(STORE_F_STORE_LIST_PUBLIC_KEY_START),
143      "STORE_list_public_key_start"},
144     {ERR_FUNC(STORE_F_STORE_MODIFY_ARBITRARY), "STORE_modify_arbitrary"},
145     {ERR_FUNC(STORE_F_STORE_MODIFY_CERTIFICATE), "STORE_modify_certificate"},
146     {ERR_FUNC(STORE_F_STORE_MODIFY_CRL), "STORE_modify_crl"},
147     {ERR_FUNC(STORE_F_STORE_MODIFY_NUMBER), "STORE_modify_number"},
148     {ERR_FUNC(STORE_F_STORE_MODIFY_PRIVATE_KEY), "STORE_modify_private_key"},
149     {ERR_FUNC(STORE_F_STORE_MODIFY_PUBLIC_KEY), "STORE_modify_public_key"},
150     {ERR_FUNC(STORE_F_STORE_NEW_ENGINE), "STORE_new_engine"},
151     {ERR_FUNC(STORE_F_STORE_NEW_METHOD), "STORE_new_method"},
152     {ERR_FUNC(STORE_F_STORE_PARSE_ATTRS_END), "STORE_parse_attrs_end"},
153     {ERR_FUNC(STORE_F_STORE_PARSE_ATTRS_ENDP), "STORE_parse_attrs_endp"},
154     {ERR_FUNC(STORE_F_STORE_PARSE_ATTRS_NEXT), "STORE_parse_attrs_next"},
155     {ERR_FUNC(STORE_F_STORE_PARSE_ATTRS_START), "STORE_parse_attrs_start"},
156     {ERR_FUNC(STORE_F_STORE_REVOKE_CERTIFICATE), "STORE_revoke_certificate"},
157     {ERR_FUNC(STORE_F_STORE_REVOKE_PRIVATE_KEY), "STORE_revoke_private_key"},
158     {ERR_FUNC(STORE_F_STORE_REVOKE_PUBLIC_KEY), "STORE_revoke_public_key"},
159     {ERR_FUNC(STORE_F_STORE_STORE_ARBITRARY), "STORE_store_arbitrary"},
160     {ERR_FUNC(STORE_F_STORE_STORE_CERTIFICATE), "STORE_store_certificate"},
161     {ERR_FUNC(STORE_F_STORE_STORE_CRL), "STORE_store_crl"},
162     {ERR_FUNC(STORE_F_STORE_STORE_NUMBER), "STORE_store_number"},
163     {ERR_FUNC(STORE_F_STORE_STORE_PRIVATE_KEY), "STORE_store_private_key"},
164     {ERR_FUNC(STORE_F_STORE_STORE_PUBLIC_KEY), "STORE_store_public_key"},
165     {0, NULL}
166 };
167
168 static ERR_STRING_DATA STORE_str_reasons[] = {
169     {ERR_REASON(STORE_R_ALREADY_HAS_A_VALUE), "already has a value"},
170     {ERR_REASON(STORE_R_FAILED_DELETING_ARBITRARY),
171      "failed deleting arbitrary"},
172     {ERR_REASON(STORE_R_FAILED_DELETING_CERTIFICATE),
173      "failed deleting certificate"},
174     {ERR_REASON(STORE_R_FAILED_DELETING_KEY), "failed deleting key"},
175     {ERR_REASON(STORE_R_FAILED_DELETING_NUMBER), "failed deleting number"},
176     {ERR_REASON(STORE_R_FAILED_GENERATING_CRL), "failed generating crl"},
177     {ERR_REASON(STORE_R_FAILED_GENERATING_KEY), "failed generating key"},
178     {ERR_REASON(STORE_R_FAILED_GETTING_ARBITRARY),
179      "failed getting arbitrary"},
180     {ERR_REASON(STORE_R_FAILED_GETTING_CERTIFICATE),
181      "failed getting certificate"},
182     {ERR_REASON(STORE_R_FAILED_GETTING_KEY), "failed getting key"},
183     {ERR_REASON(STORE_R_FAILED_GETTING_NUMBER), "failed getting number"},
184     {ERR_REASON(STORE_R_FAILED_LISTING_CERTIFICATES),
185      "failed listing certificates"},
186     {ERR_REASON(STORE_R_FAILED_LISTING_KEYS), "failed listing keys"},
187     {ERR_REASON(STORE_R_FAILED_MODIFYING_ARBITRARY),
188      "failed modifying arbitrary"},
189     {ERR_REASON(STORE_R_FAILED_MODIFYING_CERTIFICATE),
190      "failed modifying certificate"},
191     {ERR_REASON(STORE_R_FAILED_MODIFYING_CRL), "failed modifying crl"},
192     {ERR_REASON(STORE_R_FAILED_MODIFYING_NUMBER), "failed modifying number"},
193     {ERR_REASON(STORE_R_FAILED_MODIFYING_PRIVATE_KEY),
194      "failed modifying private key"},
195     {ERR_REASON(STORE_R_FAILED_MODIFYING_PUBLIC_KEY),
196      "failed modifying public key"},
197     {ERR_REASON(STORE_R_FAILED_REVOKING_CERTIFICATE),
198      "failed revoking certificate"},
199     {ERR_REASON(STORE_R_FAILED_REVOKING_KEY), "failed revoking key"},
200     {ERR_REASON(STORE_R_FAILED_STORING_ARBITRARY),
201      "failed storing arbitrary"},
202     {ERR_REASON(STORE_R_FAILED_STORING_CERTIFICATE),
203      "failed storing certificate"},
204     {ERR_REASON(STORE_R_FAILED_STORING_KEY), "failed storing key"},
205     {ERR_REASON(STORE_R_FAILED_STORING_NUMBER), "failed storing number"},
206     {ERR_REASON(STORE_R_NOT_IMPLEMENTED), "not implemented"},
207     {ERR_REASON(STORE_R_NO_CONTROL_FUNCTION), "no control function"},
208     {ERR_REASON(STORE_R_NO_DELETE_ARBITRARY_FUNCTION),
209      "no delete arbitrary function"},
210     {ERR_REASON(STORE_R_NO_DELETE_NUMBER_FUNCTION),
211      "no delete number function"},
212     {ERR_REASON(STORE_R_NO_DELETE_OBJECT_FUNCTION),
213      "no delete object function"},
214     {ERR_REASON(STORE_R_NO_GENERATE_CRL_FUNCTION),
215      "no generate crl function"},
216     {ERR_REASON(STORE_R_NO_GENERATE_OBJECT_FUNCTION),
217      "no generate object function"},
218     {ERR_REASON(STORE_R_NO_GET_OBJECT_ARBITRARY_FUNCTION),
219      "no get object arbitrary function"},
220     {ERR_REASON(STORE_R_NO_GET_OBJECT_FUNCTION), "no get object function"},
221     {ERR_REASON(STORE_R_NO_GET_OBJECT_NUMBER_FUNCTION),
222      "no get object number function"},
223     {ERR_REASON(STORE_R_NO_LIST_OBJECT_ENDP_FUNCTION),
224      "no list object endp function"},
225     {ERR_REASON(STORE_R_NO_LIST_OBJECT_END_FUNCTION),
226      "no list object end function"},
227     {ERR_REASON(STORE_R_NO_LIST_OBJECT_NEXT_FUNCTION),
228      "no list object next function"},
229     {ERR_REASON(STORE_R_NO_LIST_OBJECT_START_FUNCTION),
230      "no list object start function"},
231     {ERR_REASON(STORE_R_NO_MODIFY_OBJECT_FUNCTION),
232      "no modify object function"},
233     {ERR_REASON(STORE_R_NO_REVOKE_OBJECT_FUNCTION),
234      "no revoke object function"},
235     {ERR_REASON(STORE_R_NO_STORE), "no store"},
236     {ERR_REASON(STORE_R_NO_STORE_OBJECT_ARBITRARY_FUNCTION),
237      "no store object arbitrary function"},
238     {ERR_REASON(STORE_R_NO_STORE_OBJECT_FUNCTION),
239      "no store object function"},
240     {ERR_REASON(STORE_R_NO_STORE_OBJECT_NUMBER_FUNCTION),
241      "no store object number function"},
242     {ERR_REASON(STORE_R_NO_VALUE), "no value"},
243     {0, NULL}
244 };
245
246 #endif
247
248 void ERR_load_STORE_strings(void)
249 {
250 #ifndef OPENSSL_NO_ERR
251
252     if (ERR_func_error_string(STORE_str_functs[0].error) == NULL) {
253         ERR_load_strings(0, STORE_str_functs);
254         ERR_load_strings(0, STORE_str_reasons);
255     }
256 #endif
257 }