dso_err.c revision 167612
168651Skris/* crypto/dso/dso_err.c */
268651Skris/* ====================================================================
3160814Ssimon * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.
468651Skris *
568651Skris * Redistribution and use in source and binary forms, with or without
668651Skris * modification, are permitted provided that the following conditions
768651Skris * are met:
868651Skris *
968651Skris * 1. Redistributions of source code must retain the above copyright
1068651Skris *    notice, this list of conditions and the following disclaimer.
1168651Skris *
1268651Skris * 2. Redistributions in binary form must reproduce the above copyright
1368651Skris *    notice, this list of conditions and the following disclaimer in
1468651Skris *    the documentation and/or other materials provided with the
1568651Skris *    distribution.
1668651Skris *
1768651Skris * 3. All advertising materials mentioning features or use of this
1868651Skris *    software must display the following acknowledgment:
1968651Skris *    "This product includes software developed by the OpenSSL Project
2068651Skris *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
2168651Skris *
2268651Skris * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
2368651Skris *    endorse or promote products derived from this software without
2468651Skris *    prior written permission. For written permission, please contact
2568651Skris *    openssl-core@OpenSSL.org.
2668651Skris *
2768651Skris * 5. Products derived from this software may not be called "OpenSSL"
2868651Skris *    nor may "OpenSSL" appear in their names without prior written
2968651Skris *    permission of the OpenSSL Project.
3068651Skris *
3168651Skris * 6. Redistributions of any form whatsoever must retain the following
3268651Skris *    acknowledgment:
3368651Skris *    "This product includes software developed by the OpenSSL Project
3468651Skris *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
3568651Skris *
3668651Skris * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
3768651Skris * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3868651Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
3968651Skris * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
4068651Skris * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
4168651Skris * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4268651Skris * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
4368651Skris * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4468651Skris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
4568651Skris * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
4668651Skris * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
4768651Skris * OF THE POSSIBILITY OF SUCH DAMAGE.
4868651Skris * ====================================================================
4968651Skris *
5068651Skris * This product includes cryptographic software written by Eric Young
5168651Skris * (eay@cryptsoft.com).  This product includes software written by Tim
5268651Skris * Hudson (tjh@cryptsoft.com).
5368651Skris *
5468651Skris */
5568651Skris
5668651Skris/* NOTE: this file was auto generated by the mkerr.pl script: any changes
5768651Skris * made to it will be overwritten when the script next updates this file,
5868651Skris * only reason strings will be preserved.
5968651Skris */
6068651Skris
6168651Skris#include <stdio.h>
6268651Skris#include <openssl/err.h>
6368651Skris#include <openssl/dso.h>
6468651Skris
6568651Skris/* BEGIN ERROR CODES */
66109998Smarkm#ifndef OPENSSL_NO_ERR
67160814Ssimon
68160814Ssimon#define ERR_FUNC(func) ERR_PACK(ERR_LIB_DSO,func,0)
69160814Ssimon#define ERR_REASON(reason) ERR_PACK(ERR_LIB_DSO,0,reason)
70160814Ssimon
7168651Skrisstatic ERR_STRING_DATA DSO_str_functs[]=
7268651Skris	{
73160814Ssimon{ERR_FUNC(DSO_F_DLFCN_BIND_FUNC),	"DLFCN_BIND_FUNC"},
74160814Ssimon{ERR_FUNC(DSO_F_DLFCN_BIND_VAR),	"DLFCN_BIND_VAR"},
75160814Ssimon{ERR_FUNC(DSO_F_DLFCN_LOAD),	"DLFCN_LOAD"},
76160814Ssimon{ERR_FUNC(DSO_F_DLFCN_MERGER),	"DLFCN_MERGER"},
77160814Ssimon{ERR_FUNC(DSO_F_DLFCN_NAME_CONVERTER),	"DLFCN_NAME_CONVERTER"},
78160814Ssimon{ERR_FUNC(DSO_F_DLFCN_UNLOAD),	"DLFCN_UNLOAD"},
79160814Ssimon{ERR_FUNC(DSO_F_DL_BIND_FUNC),	"DL_BIND_FUNC"},
80160814Ssimon{ERR_FUNC(DSO_F_DL_BIND_VAR),	"DL_BIND_VAR"},
81160814Ssimon{ERR_FUNC(DSO_F_DL_LOAD),	"DL_LOAD"},
82160814Ssimon{ERR_FUNC(DSO_F_DL_MERGER),	"DL_MERGER"},
83160814Ssimon{ERR_FUNC(DSO_F_DL_NAME_CONVERTER),	"DL_NAME_CONVERTER"},
84160814Ssimon{ERR_FUNC(DSO_F_DL_UNLOAD),	"DL_UNLOAD"},
85160814Ssimon{ERR_FUNC(DSO_F_DSO_BIND_FUNC),	"DSO_bind_func"},
86160814Ssimon{ERR_FUNC(DSO_F_DSO_BIND_VAR),	"DSO_bind_var"},
87160814Ssimon{ERR_FUNC(DSO_F_DSO_CONVERT_FILENAME),	"DSO_convert_filename"},
88160814Ssimon{ERR_FUNC(DSO_F_DSO_CTRL),	"DSO_ctrl"},
89160814Ssimon{ERR_FUNC(DSO_F_DSO_FREE),	"DSO_free"},
90160814Ssimon{ERR_FUNC(DSO_F_DSO_GET_FILENAME),	"DSO_get_filename"},
91160814Ssimon{ERR_FUNC(DSO_F_DSO_GET_LOADED_FILENAME),	"DSO_get_loaded_filename"},
92160814Ssimon{ERR_FUNC(DSO_F_DSO_LOAD),	"DSO_load"},
93160814Ssimon{ERR_FUNC(DSO_F_DSO_MERGE),	"DSO_merge"},
94160814Ssimon{ERR_FUNC(DSO_F_DSO_NEW_METHOD),	"DSO_new_method"},
95160814Ssimon{ERR_FUNC(DSO_F_DSO_SET_FILENAME),	"DSO_set_filename"},
96160814Ssimon{ERR_FUNC(DSO_F_DSO_SET_NAME_CONVERTER),	"DSO_set_name_converter"},
97160814Ssimon{ERR_FUNC(DSO_F_DSO_UP_REF),	"DSO_up_ref"},
98160814Ssimon{ERR_FUNC(DSO_F_VMS_BIND_SYM),	"VMS_BIND_SYM"},
99160814Ssimon{ERR_FUNC(DSO_F_VMS_LOAD),	"VMS_LOAD"},
100160814Ssimon{ERR_FUNC(DSO_F_VMS_MERGER),	"VMS_MERGER"},
101160814Ssimon{ERR_FUNC(DSO_F_VMS_UNLOAD),	"VMS_UNLOAD"},
102160814Ssimon{ERR_FUNC(DSO_F_WIN32_BIND_FUNC),	"WIN32_BIND_FUNC"},
103160814Ssimon{ERR_FUNC(DSO_F_WIN32_BIND_VAR),	"WIN32_BIND_VAR"},
104160814Ssimon{ERR_FUNC(DSO_F_WIN32_JOINER),	"WIN32_JOINER"},
105160814Ssimon{ERR_FUNC(DSO_F_WIN32_LOAD),	"WIN32_LOAD"},
106160814Ssimon{ERR_FUNC(DSO_F_WIN32_MERGER),	"WIN32_MERGER"},
107160814Ssimon{ERR_FUNC(DSO_F_WIN32_NAME_CONVERTER),	"WIN32_NAME_CONVERTER"},
108160814Ssimon{ERR_FUNC(DSO_F_WIN32_SPLITTER),	"WIN32_SPLITTER"},
109160814Ssimon{ERR_FUNC(DSO_F_WIN32_UNLOAD),	"WIN32_UNLOAD"},
11068651Skris{0,NULL}
11168651Skris	};
11268651Skris
11368651Skrisstatic ERR_STRING_DATA DSO_str_reasons[]=
11468651Skris	{
115160814Ssimon{ERR_REASON(DSO_R_CTRL_FAILED)           ,"control command failed"},
116160814Ssimon{ERR_REASON(DSO_R_DSO_ALREADY_LOADED)    ,"dso already loaded"},
117160814Ssimon{ERR_REASON(DSO_R_EMPTY_FILE_STRUCTURE)  ,"empty file structure"},
118160814Ssimon{ERR_REASON(DSO_R_FAILURE)               ,"failure"},
119160814Ssimon{ERR_REASON(DSO_R_FILENAME_TOO_BIG)      ,"filename too big"},
120160814Ssimon{ERR_REASON(DSO_R_FINISH_FAILED)         ,"cleanup method function failed"},
121160814Ssimon{ERR_REASON(DSO_R_INCORRECT_FILE_SYNTAX) ,"incorrect file syntax"},
122160814Ssimon{ERR_REASON(DSO_R_LOAD_FAILED)           ,"could not load the shared library"},
123160814Ssimon{ERR_REASON(DSO_R_NAME_TRANSLATION_FAILED),"name translation failed"},
124160814Ssimon{ERR_REASON(DSO_R_NO_FILENAME)           ,"no filename"},
125160814Ssimon{ERR_REASON(DSO_R_NO_FILE_SPECIFICATION) ,"no file specification"},
126160814Ssimon{ERR_REASON(DSO_R_NULL_HANDLE)           ,"a null shared library handle was used"},
127160814Ssimon{ERR_REASON(DSO_R_SET_FILENAME_FAILED)   ,"set filename failed"},
128160814Ssimon{ERR_REASON(DSO_R_STACK_ERROR)           ,"the meth_data stack is corrupt"},
129160814Ssimon{ERR_REASON(DSO_R_SYM_FAILURE)           ,"could not bind to the requested symbol name"},
130160814Ssimon{ERR_REASON(DSO_R_UNLOAD_FAILED)         ,"could not unload the shared library"},
131160814Ssimon{ERR_REASON(DSO_R_UNSUPPORTED)           ,"functionality not supported"},
13268651Skris{0,NULL}
13368651Skris	};
13468651Skris
13568651Skris#endif
13668651Skris
13768651Skrisvoid ERR_load_DSO_strings(void)
13868651Skris	{
139167612Ssimon#ifndef OPENSSL_NO_ERR
14068651Skris
141167612Ssimon	if (ERR_func_error_string(DSO_str_functs[0].error) == NULL)
14268651Skris		{
143160814Ssimon		ERR_load_strings(0,DSO_str_functs);
144160814Ssimon		ERR_load_strings(0,DSO_str_reasons);
145167612Ssimon		}
14668651Skris#endif
14768651Skris	}
148