1 | /*
|
---|
2 | * WARNING: do not edit!
|
---|
3 | * Generated by Makefile from conf.h.in
|
---|
4 | *
|
---|
5 | * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
---|
6 | *
|
---|
7 | * Licensed under the Apache License 2.0 (the "License"). You may not use
|
---|
8 | * this file except in compliance with the License. You can obtain a copy
|
---|
9 | * in the file LICENSE in the source distribution or at
|
---|
10 | * https://www.openssl.org/source/license.html
|
---|
11 | */
|
---|
12 |
|
---|
13 |
|
---|
14 |
|
---|
15 | #ifndef OPENSSL_CONF_H
|
---|
16 | # define OPENSSL_CONF_H
|
---|
17 | # pragma once
|
---|
18 |
|
---|
19 | # include <openssl/macros.h>
|
---|
20 | # ifndef OPENSSL_NO_DEPRECATED_3_0
|
---|
21 | # define HEADER_CONF_H
|
---|
22 | # endif
|
---|
23 |
|
---|
24 | # include <openssl/bio.h>
|
---|
25 | # include <openssl/lhash.h>
|
---|
26 | # include <openssl/safestack.h>
|
---|
27 | # include <openssl/e_os2.h>
|
---|
28 | # include <openssl/types.h>
|
---|
29 | # include <openssl/conferr.h>
|
---|
30 | # ifndef OPENSSL_NO_STDIO
|
---|
31 | # include <stdio.h>
|
---|
32 | # endif
|
---|
33 |
|
---|
34 | #ifdef __cplusplus
|
---|
35 | extern "C" {
|
---|
36 | #endif
|
---|
37 |
|
---|
38 | typedef struct {
|
---|
39 | char *section;
|
---|
40 | char *name;
|
---|
41 | char *value;
|
---|
42 | } CONF_VALUE;
|
---|
43 |
|
---|
44 | SKM_DEFINE_STACK_OF_INTERNAL(CONF_VALUE, CONF_VALUE, CONF_VALUE)
|
---|
45 | #define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
|
---|
46 | #define sk_CONF_VALUE_value(sk, idx) ((CONF_VALUE *)OPENSSL_sk_value(ossl_check_const_CONF_VALUE_sk_type(sk), (idx)))
|
---|
47 | #define sk_CONF_VALUE_new(cmp) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new(ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
---|
48 | #define sk_CONF_VALUE_new_null() ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_null())
|
---|
49 | #define sk_CONF_VALUE_new_reserve(cmp, n) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_CONF_VALUE_compfunc_type(cmp), (n)))
|
---|
50 | #define sk_CONF_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CONF_VALUE_sk_type(sk), (n))
|
---|
51 | #define sk_CONF_VALUE_free(sk) OPENSSL_sk_free(ossl_check_CONF_VALUE_sk_type(sk))
|
---|
52 | #define sk_CONF_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_CONF_VALUE_sk_type(sk))
|
---|
53 | #define sk_CONF_VALUE_delete(sk, i) ((CONF_VALUE *)OPENSSL_sk_delete(ossl_check_CONF_VALUE_sk_type(sk), (i)))
|
---|
54 | #define sk_CONF_VALUE_delete_ptr(sk, ptr) ((CONF_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)))
|
---|
55 | #define sk_CONF_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
---|
56 | #define sk_CONF_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
---|
57 | #define sk_CONF_VALUE_pop(sk) ((CONF_VALUE *)OPENSSL_sk_pop(ossl_check_CONF_VALUE_sk_type(sk)))
|
---|
58 | #define sk_CONF_VALUE_shift(sk) ((CONF_VALUE *)OPENSSL_sk_shift(ossl_check_CONF_VALUE_sk_type(sk)))
|
---|
59 | #define sk_CONF_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CONF_VALUE_sk_type(sk),ossl_check_CONF_VALUE_freefunc_type(freefunc))
|
---|
60 | #define sk_CONF_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), (idx))
|
---|
61 | #define sk_CONF_VALUE_set(sk, idx, ptr) ((CONF_VALUE *)OPENSSL_sk_set(ossl_check_CONF_VALUE_sk_type(sk), (idx), ossl_check_CONF_VALUE_type(ptr)))
|
---|
62 | #define sk_CONF_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
---|
63 | #define sk_CONF_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
---|
64 | #define sk_CONF_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), pnum)
|
---|
65 | #define sk_CONF_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_CONF_VALUE_sk_type(sk))
|
---|
66 | #define sk_CONF_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CONF_VALUE_sk_type(sk))
|
---|
67 | #define sk_CONF_VALUE_dup(sk) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_dup(ossl_check_const_CONF_VALUE_sk_type(sk)))
|
---|
68 | #define sk_CONF_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_copyfunc_type(copyfunc), ossl_check_CONF_VALUE_freefunc_type(freefunc)))
|
---|
69 | #define sk_CONF_VALUE_set_cmp_func(sk, cmp) ((sk_CONF_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
---|
70 | DEFINE_LHASH_OF_INTERNAL(CONF_VALUE);
|
---|
71 | #define lh_CONF_VALUE_new(hfn, cmp) ((LHASH_OF(CONF_VALUE) *)OPENSSL_LH_new(ossl_check_CONF_VALUE_lh_hashfunc_type(hfn), ossl_check_CONF_VALUE_lh_compfunc_type(cmp)))
|
---|
72 | #define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh))
|
---|
73 | #define lh_CONF_VALUE_flush(lh) OPENSSL_LH_flush(ossl_check_CONF_VALUE_lh_type(lh))
|
---|
74 | #define lh_CONF_VALUE_insert(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_insert(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_plain_type(ptr)))
|
---|
75 | #define lh_CONF_VALUE_delete(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_delete(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
---|
76 | #define lh_CONF_VALUE_retrieve(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_retrieve(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
---|
77 | #define lh_CONF_VALUE_error(lh) OPENSSL_LH_error(ossl_check_CONF_VALUE_lh_type(lh))
|
---|
78 | #define lh_CONF_VALUE_num_items(lh) OPENSSL_LH_num_items(ossl_check_CONF_VALUE_lh_type(lh))
|
---|
79 | #define lh_CONF_VALUE_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
---|
80 | #define lh_CONF_VALUE_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
---|
81 | #define lh_CONF_VALUE_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
---|
82 | #define lh_CONF_VALUE_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_CONF_VALUE_lh_type(lh))
|
---|
83 | #define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl)
|
---|
84 | #define lh_CONF_VALUE_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_doallfunc_type(dfn))
|
---|
85 |
|
---|
86 |
|
---|
87 | struct conf_st;
|
---|
88 | struct conf_method_st;
|
---|
89 | typedef struct conf_method_st CONF_METHOD;
|
---|
90 |
|
---|
91 | # ifndef OPENSSL_NO_DEPRECATED_3_0
|
---|
92 | # include <openssl/conftypes.h>
|
---|
93 | # endif
|
---|
94 |
|
---|
95 | /* Module definitions */
|
---|
96 | typedef struct conf_imodule_st CONF_IMODULE;
|
---|
97 | typedef struct conf_module_st CONF_MODULE;
|
---|
98 |
|
---|
99 | STACK_OF(CONF_MODULE);
|
---|
100 | STACK_OF(CONF_IMODULE);
|
---|
101 |
|
---|
102 | /* DSO module function typedefs */
|
---|
103 | typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf);
|
---|
104 | typedef void conf_finish_func (CONF_IMODULE *md);
|
---|
105 |
|
---|
106 | # define CONF_MFLAGS_IGNORE_ERRORS 0x1
|
---|
107 | # define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
|
---|
108 | # define CONF_MFLAGS_SILENT 0x4
|
---|
109 | # define CONF_MFLAGS_NO_DSO 0x8
|
---|
110 | # define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
---|
111 | # define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
---|
112 |
|
---|
113 | int CONF_set_default_method(CONF_METHOD *meth);
|
---|
114 | void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash);
|
---|
115 | LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file,
|
---|
116 | long *eline);
|
---|
117 | # ifndef OPENSSL_NO_STDIO
|
---|
118 | LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
|
---|
119 | long *eline);
|
---|
120 | # endif
|
---|
121 | LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
|
---|
122 | long *eline);
|
---|
123 | STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,
|
---|
124 | const char *section);
|
---|
125 | char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
---|
126 | const char *name);
|
---|
127 | long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
---|
128 | const char *name);
|
---|
129 | void CONF_free(LHASH_OF(CONF_VALUE) *conf);
|
---|
130 | #ifndef OPENSSL_NO_STDIO
|
---|
131 | int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
|
---|
132 | #endif
|
---|
133 | int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
|
---|
134 | #ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
---|
135 | OSSL_DEPRECATEDIN_1_1_0 void OPENSSL_config(const char *config_name);
|
---|
136 | #endif
|
---|
137 |
|
---|
138 | #ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
---|
139 | # define OPENSSL_no_config() \
|
---|
140 | OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL)
|
---|
141 | #endif
|
---|
142 |
|
---|
143 | /*
|
---|
144 | * New conf code. The semantics are different from the functions above. If
|
---|
145 | * that wasn't the case, the above functions would have been replaced
|
---|
146 | */
|
---|
147 |
|
---|
148 | CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth);
|
---|
149 | OSSL_LIB_CTX *NCONF_get0_libctx(const CONF *conf);
|
---|
150 | CONF *NCONF_new(CONF_METHOD *meth);
|
---|
151 | CONF_METHOD *NCONF_default(void);
|
---|
152 | #ifndef OPENSSL_NO_DEPRECATED_3_0
|
---|
153 | OSSL_DEPRECATEDIN_3_0 CONF_METHOD *NCONF_WIN32(void);
|
---|
154 | #endif
|
---|
155 | void NCONF_free(CONF *conf);
|
---|
156 | void NCONF_free_data(CONF *conf);
|
---|
157 |
|
---|
158 | int NCONF_load(CONF *conf, const char *file, long *eline);
|
---|
159 | # ifndef OPENSSL_NO_STDIO
|
---|
160 | int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
|
---|
161 | # endif
|
---|
162 | int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
|
---|
163 | STACK_OF(OPENSSL_CSTRING) *NCONF_get_section_names(const CONF *conf);
|
---|
164 | STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
|
---|
165 | const char *section);
|
---|
166 | char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
|
---|
167 | int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
---|
168 | long *result);
|
---|
169 | #ifndef OPENSSL_NO_STDIO
|
---|
170 | int NCONF_dump_fp(const CONF *conf, FILE *out);
|
---|
171 | #endif
|
---|
172 | int NCONF_dump_bio(const CONF *conf, BIO *out);
|
---|
173 |
|
---|
174 | #define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
|
---|
175 |
|
---|
176 | /* Module functions */
|
---|
177 |
|
---|
178 | int CONF_modules_load(const CONF *cnf, const char *appname,
|
---|
179 | unsigned long flags);
|
---|
180 | int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename,
|
---|
181 | const char *appname, unsigned long flags);
|
---|
182 | int CONF_modules_load_file(const char *filename, const char *appname,
|
---|
183 | unsigned long flags);
|
---|
184 | void CONF_modules_unload(int all);
|
---|
185 | void CONF_modules_finish(void);
|
---|
186 | #ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
---|
187 | # define CONF_modules_free() while(0) continue
|
---|
188 | #endif
|
---|
189 | int CONF_module_add(const char *name, conf_init_func *ifunc,
|
---|
190 | conf_finish_func *ffunc);
|
---|
191 |
|
---|
192 | const char *CONF_imodule_get_name(const CONF_IMODULE *md);
|
---|
193 | const char *CONF_imodule_get_value(const CONF_IMODULE *md);
|
---|
194 | void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
|
---|
195 | void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
|
---|
196 | CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
|
---|
197 | unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
|
---|
198 | void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
|
---|
199 | void *CONF_module_get_usr_data(CONF_MODULE *pmod);
|
---|
200 | void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
|
---|
201 |
|
---|
202 | char *CONF_get1_default_config_file(void);
|
---|
203 |
|
---|
204 | int CONF_parse_list(const char *list, int sep, int nospc,
|
---|
205 | int (*list_cb) (const char *elem, int len, void *usr),
|
---|
206 | void *arg);
|
---|
207 |
|
---|
208 | void OPENSSL_load_builtin_modules(void);
|
---|
209 |
|
---|
210 |
|
---|
211 | # ifdef __cplusplus
|
---|
212 | }
|
---|
213 | # endif
|
---|
214 | #endif
|
---|