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