diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-08-31 09:18:01 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-08-31 09:18:01 +0000 |
commit | 21b3f260918abc784a27447b1380ea12122f3c10 (patch) | |
tree | 2e56e9c009945c889bf512231e002becae0da58d /lib | |
parent | 3b30e86edb6d46c5b2f8fa997e1327e63d792367 (diff) |
Remove unused {,N}CONF_dump_{bio,fp}()
It's time to start removing some horrors from the conf/ garbage. If the
current top layer wasn't terrible enough, you could always slap another
one on top of it and it would then be truly marvellous.
ok beck jsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/Symbols.list | 4 | ||||
-rw-r--r-- | lib/libcrypto/conf/conf.h | 6 | ||||
-rw-r--r-- | lib/libcrypto/conf/conf_lib.c | 55 | ||||
-rw-r--r-- | lib/libcrypto/hidden/openssl/conf.h | 6 |
4 files changed, 3 insertions, 68 deletions
diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index 05c39eddbbf..3385b631e74 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -589,8 +589,6 @@ CMS_unsigned_get_attr_by_OBJ CMS_unsigned_get_attr_count CMS_verify CMS_verify_receipt -CONF_dump_bio -CONF_dump_fp CONF_free CONF_get1_default_config_file CONF_get_number @@ -1505,8 +1503,6 @@ NAME_CONSTRAINTS_it NAME_CONSTRAINTS_new NCONF_WIN32 NCONF_default -NCONF_dump_bio -NCONF_dump_fp NCONF_free NCONF_free_data NCONF_get_number_e diff --git a/lib/libcrypto/conf/conf.h b/lib/libcrypto/conf/conf.h index 5d10163bfbc..7b30ad453db 100644 --- a/lib/libcrypto/conf/conf.h +++ b/lib/libcrypto/conf/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.16 2022/07/12 14:42:48 kn Exp $ */ +/* $OpenBSD: conf.h,v 1.17 2024/08/31 09:18:00 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -131,8 +131,6 @@ char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group, long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group, const char *name); void CONF_free(LHASH_OF(CONF_VALUE) *conf); -int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out); -int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out); void OPENSSL_config(const char *config_name); void OPENSSL_no_config(void); @@ -159,8 +157,6 @@ STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf, const char *section); char *NCONF_get_string(const CONF *conf, const char *group, const char *name); int NCONF_get_number_e(const CONF *conf, const char *group, const char *name, long *result); -int NCONF_dump_fp(const CONF *conf, FILE *out); -int NCONF_dump_bio(const CONF *conf, BIO *out); #define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r) diff --git a/lib/libcrypto/conf/conf_lib.c b/lib/libcrypto/conf/conf_lib.c index d1c85dc0986..01735906c05 100644 --- a/lib/libcrypto/conf/conf_lib.c +++ b/lib/libcrypto/conf/conf_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_lib.c,v 1.17 2024/04/09 13:56:30 beck Exp $ */ +/* $OpenBSD: conf_lib.c,v 1.18 2024/08/31 09:18:00 tb Exp $ */ /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL * project 2000. */ @@ -198,32 +198,6 @@ CONF_free(LHASH_OF(CONF_VALUE) *conf) } LCRYPTO_ALIAS(CONF_free); -int -CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out) -{ - BIO *btmp; - int ret; - - if (!(btmp = BIO_new_fp(out, BIO_NOCLOSE))) { - CONFerror(ERR_R_BUF_LIB); - return 0; - } - ret = CONF_dump_bio(conf, btmp); - BIO_free(btmp); - return ret; -} -LCRYPTO_ALIAS(CONF_dump_fp); - -int -CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out) -{ - CONF ctmp; - - CONF_set_nconf(&ctmp, conf); - return NCONF_dump_bio(&ctmp, out); -} -LCRYPTO_ALIAS(CONF_dump_bio); - /* The following section contains the "New CONF" functions. They are completely centralised around a new CONF structure that may contain 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, return 1; } LCRYPTO_ALIAS(NCONF_get_number_e); - -int -NCONF_dump_fp(const CONF *conf, FILE *out) -{ - BIO *btmp; - int ret; - if (!(btmp = BIO_new_fp(out, BIO_NOCLOSE))) { - CONFerror(ERR_R_BUF_LIB); - return 0; - } - ret = NCONF_dump_bio(conf, btmp); - BIO_free(btmp); - return ret; -} -LCRYPTO_ALIAS(NCONF_dump_fp); - -int -NCONF_dump_bio(const CONF *conf, BIO *out) -{ - if (conf == NULL) { - CONFerror(CONF_R_NO_CONF); - return 0; - } - - return conf->meth->dump(conf, out); -} -LCRYPTO_ALIAS(NCONF_dump_bio); diff --git a/lib/libcrypto/hidden/openssl/conf.h b/lib/libcrypto/hidden/openssl/conf.h index 9408a543e35..9d073303ca8 100644 --- a/lib/libcrypto/hidden/openssl/conf.h +++ b/lib/libcrypto/hidden/openssl/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.1 2024/04/09 14:57:28 tb Exp $ */ +/* $OpenBSD: conf.h,v 1.2 2024/08/31 09:18:00 tb Exp $ */ /* * Copyright (c) 2024 Bob Beck <beck@openbsd.org> * @@ -34,8 +34,6 @@ LCRYPTO_USED(CONF_get_section); LCRYPTO_USED(CONF_get_string); LCRYPTO_USED(CONF_get_number); LCRYPTO_USED(CONF_free); -LCRYPTO_USED(CONF_dump_fp); -LCRYPTO_USED(CONF_dump_bio); LCRYPTO_USED(OPENSSL_config); LCRYPTO_USED(OPENSSL_no_config); LCRYPTO_USED(NCONF_new); @@ -49,8 +47,6 @@ LCRYPTO_USED(NCONF_load_bio); LCRYPTO_USED(NCONF_get_section); LCRYPTO_USED(NCONF_get_string); LCRYPTO_USED(NCONF_get_number_e); -LCRYPTO_USED(NCONF_dump_fp); -LCRYPTO_USED(NCONF_dump_bio); LCRYPTO_USED(CONF_modules_load); LCRYPTO_USED(CONF_modules_load_file); LCRYPTO_USED(CONF_modules_unload); |