fb9174bf62d9aae1154963001a5c546324e7c247
[openssl.git] / crypto / conf / conf_err.c
1 /*
2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the OpenSSL license (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9
10 /*
11  * NOTE: this file was auto generated by the mkerr.pl script: any changes
12  * made to it will be overwritten when the script next updates this file,
13  * only reason strings will be preserved.
14  */
15
16 #include <stdio.h>
17 #include <openssl/err.h>
18 #include <openssl/conf.h>
19
20 /* BEGIN ERROR CODES */
21 #ifndef OPENSSL_NO_ERR
22
23 # define ERR_FUNC(func) ERR_PACK(ERR_LIB_CONF,func,0)
24 # define ERR_REASON(reason) ERR_PACK(ERR_LIB_CONF,0,reason)
25
26 static ERR_STRING_DATA CONF_str_functs[] = {
27     {ERR_FUNC(CONF_F_CONF_DUMP_FP), "CONF_dump_fp"},
28     {ERR_FUNC(CONF_F_CONF_LOAD), "CONF_load"},
29     {ERR_FUNC(CONF_F_CONF_LOAD_BIO), "CONF_load_bio"},
30     {ERR_FUNC(CONF_F_CONF_LOAD_FP), "CONF_load_fp"},
31     {ERR_FUNC(CONF_F_CONF_MODULES_LOAD), "CONF_modules_load"},
32     {ERR_FUNC(CONF_F_CONF_PARSE_LIST), "CONF_parse_list"},
33     {ERR_FUNC(CONF_F_DEF_LOAD), "def_load"},
34     {ERR_FUNC(CONF_F_DEF_LOAD_BIO), "def_load_bio"},
35     {ERR_FUNC(CONF_F_MODULE_INIT), "module_init"},
36     {ERR_FUNC(CONF_F_MODULE_LOAD_DSO), "module_load_dso"},
37     {ERR_FUNC(CONF_F_MODULE_RUN), "module_run"},
38     {ERR_FUNC(CONF_F_NCONF_DUMP_BIO), "NCONF_dump_bio"},
39     {ERR_FUNC(CONF_F_NCONF_DUMP_FP), "NCONF_dump_fp"},
40     {ERR_FUNC(CONF_F_NCONF_GET_NUMBER), "NCONF_get_number"},
41     {ERR_FUNC(CONF_F_NCONF_GET_NUMBER_E), "NCONF_get_number_e"},
42     {ERR_FUNC(CONF_F_NCONF_GET_SECTION), "NCONF_get_section"},
43     {ERR_FUNC(CONF_F_NCONF_GET_STRING), "NCONF_get_string"},
44     {ERR_FUNC(CONF_F_NCONF_LOAD), "NCONF_load"},
45     {ERR_FUNC(CONF_F_NCONF_LOAD_BIO), "NCONF_load_bio"},
46     {ERR_FUNC(CONF_F_NCONF_LOAD_FP), "NCONF_load_fp"},
47     {ERR_FUNC(CONF_F_NCONF_NEW), "NCONF_new"},
48     {ERR_FUNC(CONF_F_STR_COPY), "str_copy"},
49     {0, NULL}
50 };
51
52 static ERR_STRING_DATA CONF_str_reasons[] = {
53     {ERR_REASON(CONF_R_ERROR_LOADING_DSO), "error loading dso"},
54     {ERR_REASON(CONF_R_LIST_CANNOT_BE_NULL), "list cannot be null"},
55     {ERR_REASON(CONF_R_MISSING_CLOSE_SQUARE_BRACKET),
56      "missing close square bracket"},
57     {ERR_REASON(CONF_R_MISSING_EQUAL_SIGN), "missing equal sign"},
58     {ERR_REASON(CONF_R_MISSING_FINISH_FUNCTION), "missing finish function"},
59     {ERR_REASON(CONF_R_MISSING_INIT_FUNCTION), "missing init function"},
60     {ERR_REASON(CONF_R_MODULE_INITIALIZATION_ERROR),
61      "module initialization error"},
62     {ERR_REASON(CONF_R_NO_CLOSE_BRACE), "no close brace"},
63     {ERR_REASON(CONF_R_NO_CONF), "no conf"},
64     {ERR_REASON(CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE),
65      "no conf or environment variable"},
66     {ERR_REASON(CONF_R_NO_SECTION), "no section"},
67     {ERR_REASON(CONF_R_NO_SUCH_FILE), "no such file"},
68     {ERR_REASON(CONF_R_NO_VALUE), "no value"},
69     {ERR_REASON(CONF_R_UNABLE_TO_CREATE_NEW_SECTION),
70      "unable to create new section"},
71     {ERR_REASON(CONF_R_UNKNOWN_MODULE_NAME), "unknown module name"},
72     {ERR_REASON(CONF_R_VARIABLE_HAS_NO_VALUE), "variable has no value"},
73     {0, NULL}
74 };
75
76 #endif
77
78 void ERR_load_CONF_strings(void)
79 {
80 #ifndef OPENSSL_NO_ERR
81
82     if (ERR_func_error_string(CONF_str_functs[0].error) == NULL) {
83         ERR_load_strings(0, CONF_str_functs);
84         ERR_load_strings(0, CONF_str_reasons);
85     }
86 #endif
87 }