From 2a59c28f1eda4417570b8d10bbffcb8558777f77 Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 10 Oct 2024 06:51:22 +0000 Subject: [PATCH] Remove unused CONF_imodule struct members and accessors ok beck jsing --- lib/libcrypto/conf/conf_local.h | 10 +----- lib/libcrypto/conf/conf_mod.c | 61 +-------------------------------- 2 files changed, 2 insertions(+), 69 deletions(-) diff --git a/lib/libcrypto/conf/conf_local.h b/lib/libcrypto/conf/conf_local.h index d7255e1a0c0..e22c1180b91 100644 --- a/lib/libcrypto/conf/conf_local.h +++ b/lib/libcrypto/conf/conf_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_local.h,v 1.7 2024/08/31 09:54:31 tb Exp $ */ +/* $OpenBSD: conf_local.h,v 1.8 2024/10/10 06:51:22 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -79,15 +79,7 @@ struct conf_method_st { int CONF_module_add(const char *name, conf_init_func *ifunc, conf_finish_func *ffunc); -const char *CONF_imodule_get_name(const CONF_IMODULE *md); const char *CONF_imodule_get_value(const CONF_IMODULE *md); -void *CONF_imodule_get_usr_data(const CONF_IMODULE *md); -void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data); -CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md); -unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md); -void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags); -void *CONF_module_get_usr_data(CONF_MODULE *pmod); -void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data); int CONF_parse_list(const char *list, int sep, int nospc, int (*list_cb)(const char *elem, int len, void *usr), void *arg); diff --git a/lib/libcrypto/conf/conf_mod.c b/lib/libcrypto/conf/conf_mod.c index 3477bc71b18..0e07bb3ea52 100644 --- a/lib/libcrypto/conf/conf_mod.c +++ b/lib/libcrypto/conf/conf_mod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_mod.c,v 1.39 2024/08/31 09:26:18 tb Exp $ */ +/* $OpenBSD: conf_mod.c,v 1.40 2024/10/10 06:51:22 tb Exp $ */ /* Written by Stephen Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -76,7 +76,6 @@ struct conf_module_st { conf_finish_func *finish; /* Number of successfully initialized modules */ int links; - void *usr_data; }; @@ -87,10 +86,7 @@ struct conf_module_st { struct conf_imodule_st { CONF_MODULE *mod; - char *name; char *value; - unsigned long flags; - void *usr_data; }; static STACK_OF(CONF_MODULE) *supported_modules = NULL; @@ -293,8 +289,6 @@ module_init(CONF_MODULE *mod, char *name, char *value, const CONF *cnf) imod->mod = mod; - if ((imod->name = strdup(name)) == NULL) - goto err; if ((imod->value = strdup(value)) == NULL) goto err; @@ -373,7 +367,6 @@ imodule_free(CONF_IMODULE *imod) if (imod == NULL) return; - free(imod->name); free(imod->value); free(imod); } @@ -422,64 +415,12 @@ CONF_modules_free(void) } LCRYPTO_ALIAS(CONF_modules_free); -/* Utility functions */ - -const char * -CONF_imodule_get_name(const CONF_IMODULE *imod) -{ - return imod->name; -} - const char * CONF_imodule_get_value(const CONF_IMODULE *imod) { return imod->value; } -void * -CONF_imodule_get_usr_data(const CONF_IMODULE *imod) -{ - return imod->usr_data; -} - -void -CONF_imodule_set_usr_data(CONF_IMODULE *imod, void *usr_data) -{ - imod->usr_data = usr_data; -} - -CONF_MODULE * -CONF_imodule_get_module(const CONF_IMODULE *imod) -{ - return imod->mod; -} - -unsigned long -CONF_imodule_get_flags(const CONF_IMODULE *imod) -{ - return imod->flags; -} - -void -CONF_imodule_set_flags(CONF_IMODULE *imod, unsigned long flags) -{ - imod->flags = flags; -} - -void * -CONF_module_get_usr_data(CONF_MODULE *mod) -{ - return mod->usr_data; -} - -void -CONF_module_set_usr_data(CONF_MODULE *mod, void *usr_data) -{ - mod->usr_data = usr_data; -} - -/* Return default config file name */ - char * CONF_get1_default_config_file(void) { -- 2.20.1