summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/conf/conf_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/conf/conf_lib.c')
-rw-r--r--src/lib/libcrypto/conf/conf_lib.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/lib/libcrypto/conf/conf_lib.c b/src/lib/libcrypto/conf/conf_lib.c
index 2e4228bbe5..d1c85dc098 100644
--- a/src/lib/libcrypto/conf/conf_lib.c
+++ b/src/lib/libcrypto/conf/conf_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_lib.c,v 1.16 2024/01/28 21:00:54 tb Exp $ */ 1/* $OpenBSD: conf_lib.c,v 1.17 2024/04/09 13:56:30 beck Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -75,6 +75,7 @@ CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash)
75 default_CONF_method->init(conf); 75 default_CONF_method->init(conf);
76 conf->data = hash; 76 conf->data = hash;
77} 77}
78LCRYPTO_ALIAS(CONF_set_nconf);
78 79
79/* The following section contains the "CONF classic" functions, 80/* The following section contains the "CONF classic" functions,
80 rewritten in terms of the new CONF interface. */ 81 rewritten in terms of the new CONF interface. */
@@ -85,6 +86,7 @@ CONF_set_default_method(CONF_METHOD *meth)
85 default_CONF_method = meth; 86 default_CONF_method = meth;
86 return 1; 87 return 1;
87} 88}
89LCRYPTO_ALIAS(CONF_set_default_method);
88 90
89LHASH_OF(CONF_VALUE) * 91LHASH_OF(CONF_VALUE) *
90CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, long *eline) 92CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, long *eline)
@@ -103,6 +105,7 @@ CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, long *eline)
103 105
104 return ltmp; 106 return ltmp;
105} 107}
108LCRYPTO_ALIAS(CONF_load);
106 109
107LHASH_OF(CONF_VALUE) * 110LHASH_OF(CONF_VALUE) *
108CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, long *eline) 111CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, long *eline)
@@ -118,6 +121,7 @@ CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, long *eline)
118 BIO_free(btmp); 121 BIO_free(btmp);
119 return ltmp; 122 return ltmp;
120} 123}
124LCRYPTO_ALIAS(CONF_load_fp);
121 125
122LHASH_OF(CONF_VALUE) * 126LHASH_OF(CONF_VALUE) *
123CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, long *eline) 127CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, long *eline)
@@ -132,6 +136,7 @@ CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, long *eline)
132 return ctmp.data; 136 return ctmp.data;
133 return NULL; 137 return NULL;
134} 138}
139LCRYPTO_ALIAS(CONF_load_bio);
135 140
136STACK_OF(CONF_VALUE) * 141STACK_OF(CONF_VALUE) *
137CONF_get_section(LHASH_OF(CONF_VALUE) *conf, const char *section) 142CONF_get_section(LHASH_OF(CONF_VALUE) *conf, const char *section)
@@ -144,6 +149,7 @@ CONF_get_section(LHASH_OF(CONF_VALUE) *conf, const char *section)
144 return NCONF_get_section(&ctmp, section); 149 return NCONF_get_section(&ctmp, section);
145 } 150 }
146} 151}
152LCRYPTO_ALIAS(CONF_get_section);
147 153
148char * 154char *
149CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group, 155CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
@@ -157,6 +163,7 @@ CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
157 return NCONF_get_string(&ctmp, group, name); 163 return NCONF_get_string(&ctmp, group, name);
158 } 164 }
159} 165}
166LCRYPTO_ALIAS(CONF_get_string);
160 167
161long 168long
162CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, 169CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
@@ -179,6 +186,7 @@ CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
179 } 186 }
180 return result; 187 return result;
181} 188}
189LCRYPTO_ALIAS(CONF_get_number);
182 190
183void 191void
184CONF_free(LHASH_OF(CONF_VALUE) *conf) 192CONF_free(LHASH_OF(CONF_VALUE) *conf)
@@ -188,6 +196,7 @@ CONF_free(LHASH_OF(CONF_VALUE) *conf)
188 CONF_set_nconf(&ctmp, conf); 196 CONF_set_nconf(&ctmp, conf);
189 NCONF_free_data(&ctmp); 197 NCONF_free_data(&ctmp);
190} 198}
199LCRYPTO_ALIAS(CONF_free);
191 200
192int 201int
193CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out) 202CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out)
@@ -203,6 +212,7 @@ CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out)
203 BIO_free(btmp); 212 BIO_free(btmp);
204 return ret; 213 return ret;
205} 214}
215LCRYPTO_ALIAS(CONF_dump_fp);
206 216
207int 217int
208CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out) 218CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out)
@@ -212,6 +222,7 @@ CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out)
212 CONF_set_nconf(&ctmp, conf); 222 CONF_set_nconf(&ctmp, conf);
213 return NCONF_dump_bio(&ctmp, out); 223 return NCONF_dump_bio(&ctmp, out);
214} 224}
225LCRYPTO_ALIAS(CONF_dump_bio);
215 226
216/* The following section contains the "New CONF" functions. They are 227/* The following section contains the "New CONF" functions. They are
217 completely centralised around a new CONF structure that may contain 228 completely centralised around a new CONF structure that may contain
@@ -235,6 +246,7 @@ NCONF_new(CONF_METHOD *meth)
235 246
236 return ret; 247 return ret;
237} 248}
249LCRYPTO_ALIAS(NCONF_new);
238 250
239void 251void
240NCONF_free(CONF *conf) 252NCONF_free(CONF *conf)
@@ -243,6 +255,7 @@ NCONF_free(CONF *conf)
243 return; 255 return;
244 conf->meth->destroy(conf); 256 conf->meth->destroy(conf);
245} 257}
258LCRYPTO_ALIAS(NCONF_free);
246 259
247void 260void
248NCONF_free_data(CONF *conf) 261NCONF_free_data(CONF *conf)
@@ -251,6 +264,7 @@ NCONF_free_data(CONF *conf)
251 return; 264 return;
252 conf->meth->destroy_data(conf); 265 conf->meth->destroy_data(conf);
253} 266}
267LCRYPTO_ALIAS(NCONF_free_data);
254 268
255int 269int
256NCONF_load(CONF *conf, const char *file, long *eline) 270NCONF_load(CONF *conf, const char *file, long *eline)
@@ -262,6 +276,7 @@ NCONF_load(CONF *conf, const char *file, long *eline)
262 276
263 return conf->meth->load(conf, file, eline); 277 return conf->meth->load(conf, file, eline);
264} 278}
279LCRYPTO_ALIAS(NCONF_load);
265 280
266int 281int
267NCONF_load_fp(CONF *conf, FILE *fp, long *eline) 282NCONF_load_fp(CONF *conf, FILE *fp, long *eline)
@@ -277,6 +292,7 @@ NCONF_load_fp(CONF *conf, FILE *fp, long *eline)
277 BIO_free(btmp); 292 BIO_free(btmp);
278 return ret; 293 return ret;
279} 294}
295LCRYPTO_ALIAS(NCONF_load_fp);
280 296
281int 297int
282NCONF_load_bio(CONF *conf, BIO *bp, long *eline) 298NCONF_load_bio(CONF *conf, BIO *bp, long *eline)
@@ -288,6 +304,7 @@ NCONF_load_bio(CONF *conf, BIO *bp, long *eline)
288 304
289 return conf->meth->load_bio(conf, bp, eline); 305 return conf->meth->load_bio(conf, bp, eline);
290} 306}
307LCRYPTO_ALIAS(NCONF_load_bio);
291 308
292STACK_OF(CONF_VALUE) * 309STACK_OF(CONF_VALUE) *
293NCONF_get_section(const CONF *conf, const char *section) 310NCONF_get_section(const CONF *conf, const char *section)
@@ -304,6 +321,7 @@ NCONF_get_section(const CONF *conf, const char *section)
304 321
305 return _CONF_get_section_values(conf, section); 322 return _CONF_get_section_values(conf, section);
306} 323}
324LCRYPTO_ALIAS(NCONF_get_section);
307 325
308char * 326char *
309NCONF_get_string(const CONF *conf, const char *group, const char *name) 327NCONF_get_string(const CONF *conf, const char *group, const char *name)
@@ -324,6 +342,7 @@ NCONF_get_string(const CONF *conf, const char *group, const char *name)
324 group ? group : "", name); 342 group ? group : "", name);
325 return NULL; 343 return NULL;
326} 344}
345LCRYPTO_ALIAS(NCONF_get_string);
327 346
328int 347int
329NCONF_get_number_e(const CONF *conf, const char *group, const char *name, 348NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
@@ -348,6 +367,7 @@ NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
348 367
349 return 1; 368 return 1;
350} 369}
370LCRYPTO_ALIAS(NCONF_get_number_e);
351 371
352int 372int
353NCONF_dump_fp(const CONF *conf, FILE *out) 373NCONF_dump_fp(const CONF *conf, FILE *out)
@@ -362,6 +382,7 @@ NCONF_dump_fp(const CONF *conf, FILE *out)
362 BIO_free(btmp); 382 BIO_free(btmp);
363 return ret; 383 return ret;
364} 384}
385LCRYPTO_ALIAS(NCONF_dump_fp);
365 386
366int 387int
367NCONF_dump_bio(const CONF *conf, BIO *out) 388NCONF_dump_bio(const CONF *conf, BIO *out)
@@ -373,3 +394,4 @@ NCONF_dump_bio(const CONF *conf, BIO *out)
373 394
374 return conf->meth->dump(conf, out); 395 return conf->meth->dump(conf, out);
375} 396}
397LCRYPTO_ALIAS(NCONF_dump_bio);