diff options
Diffstat (limited to 'src/lib/libcrypto/conf')
-rw-r--r-- | src/lib/libcrypto/conf/conf.h | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/conf/conf_lib.c | 55 |
2 files changed, 2 insertions, 59 deletions
diff --git a/src/lib/libcrypto/conf/conf.h b/src/lib/libcrypto/conf/conf.h index 5d10163bfb..7b30ad453d 100644 --- a/src/lib/libcrypto/conf/conf.h +++ b/src/lib/libcrypto/conf/conf.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: conf.h,v 1.16 2022/07/12 14:42:48 kn Exp $ */ | 1 | /* $OpenBSD: conf.h,v 1.17 2024/08/31 09:18:00 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -131,8 +131,6 @@ char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group, | |||
131 | long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, | 131 | long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, |
132 | const char *name); | 132 | const char *name); |
133 | void CONF_free(LHASH_OF(CONF_VALUE) *conf); | 133 | void CONF_free(LHASH_OF(CONF_VALUE) *conf); |
134 | int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out); | ||
135 | int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out); | ||
136 | 134 | ||
137 | void OPENSSL_config(const char *config_name); | 135 | void OPENSSL_config(const char *config_name); |
138 | void OPENSSL_no_config(void); | 136 | void OPENSSL_no_config(void); |
@@ -159,8 +157,6 @@ STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf, const char *section); | |||
159 | char *NCONF_get_string(const CONF *conf, const char *group, const char *name); | 157 | char *NCONF_get_string(const CONF *conf, const char *group, const char *name); |
160 | int NCONF_get_number_e(const CONF *conf, const char *group, const char *name, | 158 | int NCONF_get_number_e(const CONF *conf, const char *group, const char *name, |
161 | long *result); | 159 | long *result); |
162 | int NCONF_dump_fp(const CONF *conf, FILE *out); | ||
163 | int NCONF_dump_bio(const CONF *conf, BIO *out); | ||
164 | 160 | ||
165 | #define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r) | 161 | #define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r) |
166 | 162 | ||
diff --git a/src/lib/libcrypto/conf/conf_lib.c b/src/lib/libcrypto/conf/conf_lib.c index d1c85dc098..01735906c0 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.17 2024/04/09 13:56:30 beck Exp $ */ | 1 | /* $OpenBSD: conf_lib.c,v 1.18 2024/08/31 09:18:00 tb 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 | */ |
@@ -198,32 +198,6 @@ CONF_free(LHASH_OF(CONF_VALUE) *conf) | |||
198 | } | 198 | } |
199 | LCRYPTO_ALIAS(CONF_free); | 199 | LCRYPTO_ALIAS(CONF_free); |
200 | 200 | ||
201 | int | ||
202 | CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out) | ||
203 | { | ||
204 | BIO *btmp; | ||
205 | int ret; | ||
206 | |||
207 | if (!(btmp = BIO_new_fp(out, BIO_NOCLOSE))) { | ||
208 | CONFerror(ERR_R_BUF_LIB); | ||
209 | return 0; | ||
210 | } | ||
211 | ret = CONF_dump_bio(conf, btmp); | ||
212 | BIO_free(btmp); | ||
213 | return ret; | ||
214 | } | ||
215 | LCRYPTO_ALIAS(CONF_dump_fp); | ||
216 | |||
217 | int | ||
218 | CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out) | ||
219 | { | ||
220 | CONF ctmp; | ||
221 | |||
222 | CONF_set_nconf(&ctmp, conf); | ||
223 | return NCONF_dump_bio(&ctmp, out); | ||
224 | } | ||
225 | LCRYPTO_ALIAS(CONF_dump_bio); | ||
226 | |||
227 | /* The following section contains the "New CONF" functions. They are | 201 | /* The following section contains the "New CONF" functions. They are |
228 | completely centralised around a new CONF structure that may contain | 202 | completely centralised around a new CONF structure that may contain |
229 | basically anything, but at least a method pointer and a table of data. | 203 | basically anything, but at least a method pointer and a table of data. |
@@ -368,30 +342,3 @@ NCONF_get_number_e(const CONF *conf, const char *group, const char *name, | |||
368 | return 1; | 342 | return 1; |
369 | } | 343 | } |
370 | LCRYPTO_ALIAS(NCONF_get_number_e); | 344 | LCRYPTO_ALIAS(NCONF_get_number_e); |
371 | |||
372 | int | ||
373 | NCONF_dump_fp(const CONF *conf, FILE *out) | ||
374 | { | ||
375 | BIO *btmp; | ||
376 | int ret; | ||
377 | if (!(btmp = BIO_new_fp(out, BIO_NOCLOSE))) { | ||
378 | CONFerror(ERR_R_BUF_LIB); | ||
379 | return 0; | ||
380 | } | ||
381 | ret = NCONF_dump_bio(conf, btmp); | ||
382 | BIO_free(btmp); | ||
383 | return ret; | ||
384 | } | ||
385 | LCRYPTO_ALIAS(NCONF_dump_fp); | ||
386 | |||
387 | int | ||
388 | NCONF_dump_bio(const CONF *conf, BIO *out) | ||
389 | { | ||
390 | if (conf == NULL) { | ||
391 | CONFerror(CONF_R_NO_CONF); | ||
392 | return 0; | ||
393 | } | ||
394 | |||
395 | return conf->meth->dump(conf, out); | ||
396 | } | ||
397 | LCRYPTO_ALIAS(NCONF_dump_bio); | ||