summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2024-10-10 06:51:22 +0000
committertb <>2024-10-10 06:51:22 +0000
commitb95100d93674afc2296d41736de4c76893204cb4 (patch)
treee9f8b6bdc8d1d46d72b9e6367dccfe91ac696403
parentcfd728c5a97ca3e7c2f9e6fe34520598cfa3be3d (diff)
downloadopenbsd-b95100d93674afc2296d41736de4c76893204cb4.tar.gz
openbsd-b95100d93674afc2296d41736de4c76893204cb4.tar.bz2
openbsd-b95100d93674afc2296d41736de4c76893204cb4.zip
Remove unused CONF_imodule struct members and accessors
ok beck jsing
-rw-r--r--src/lib/libcrypto/conf/conf_local.h10
-rw-r--r--src/lib/libcrypto/conf/conf_mod.c61
2 files changed, 2 insertions, 69 deletions
diff --git a/src/lib/libcrypto/conf/conf_local.h b/src/lib/libcrypto/conf/conf_local.h
index d7255e1a0c..e22c1180b9 100644
--- a/src/lib/libcrypto/conf/conf_local.h
+++ b/src/lib/libcrypto/conf/conf_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_local.h,v 1.7 2024/08/31 09:54:31 tb Exp $ */ 1/* $OpenBSD: conf_local.h,v 1.8 2024/10/10 06:51:22 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 *
@@ -79,15 +79,7 @@ struct conf_method_st {
79int CONF_module_add(const char *name, conf_init_func *ifunc, 79int CONF_module_add(const char *name, conf_init_func *ifunc,
80 conf_finish_func *ffunc); 80 conf_finish_func *ffunc);
81 81
82const char *CONF_imodule_get_name(const CONF_IMODULE *md);
83const char *CONF_imodule_get_value(const CONF_IMODULE *md); 82const char *CONF_imodule_get_value(const CONF_IMODULE *md);
84void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
85void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
86CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
87unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
88void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
89void *CONF_module_get_usr_data(CONF_MODULE *pmod);
90void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
91 83
92int CONF_parse_list(const char *list, int sep, int nospc, 84int CONF_parse_list(const char *list, int sep, int nospc,
93 int (*list_cb)(const char *elem, int len, void *usr), void *arg); 85 int (*list_cb)(const char *elem, int len, void *usr), void *arg);
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c
index 3477bc71b1..0e07bb3ea5 100644
--- a/src/lib/libcrypto/conf/conf_mod.c
+++ b/src/lib/libcrypto/conf/conf_mod.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: conf_mod.c,v 1.39 2024/08/31 09:26:18 tb Exp $ */ 1/* $OpenBSD: conf_mod.c,v 1.40 2024/10/10 06:51:22 tb Exp $ */
2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL 2/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -76,7 +76,6 @@ struct conf_module_st {
76 conf_finish_func *finish; 76 conf_finish_func *finish;
77 /* Number of successfully initialized modules */ 77 /* Number of successfully initialized modules */
78 int links; 78 int links;
79 void *usr_data;
80}; 79};
81 80
82 81
@@ -87,10 +86,7 @@ struct conf_module_st {
87 86
88struct conf_imodule_st { 87struct conf_imodule_st {
89 CONF_MODULE *mod; 88 CONF_MODULE *mod;
90 char *name;
91 char *value; 89 char *value;
92 unsigned long flags;
93 void *usr_data;
94}; 90};
95 91
96static STACK_OF(CONF_MODULE) *supported_modules = NULL; 92static STACK_OF(CONF_MODULE) *supported_modules = NULL;
@@ -293,8 +289,6 @@ module_init(CONF_MODULE *mod, char *name, char *value, const CONF *cnf)
293 289
294 imod->mod = mod; 290 imod->mod = mod;
295 291
296 if ((imod->name = strdup(name)) == NULL)
297 goto err;
298 if ((imod->value = strdup(value)) == NULL) 292 if ((imod->value = strdup(value)) == NULL)
299 goto err; 293 goto err;
300 294
@@ -373,7 +367,6 @@ imodule_free(CONF_IMODULE *imod)
373 if (imod == NULL) 367 if (imod == NULL)
374 return; 368 return;
375 369
376 free(imod->name);
377 free(imod->value); 370 free(imod->value);
378 free(imod); 371 free(imod);
379} 372}
@@ -422,64 +415,12 @@ CONF_modules_free(void)
422} 415}
423LCRYPTO_ALIAS(CONF_modules_free); 416LCRYPTO_ALIAS(CONF_modules_free);
424 417
425/* Utility functions */
426
427const char *
428CONF_imodule_get_name(const CONF_IMODULE *imod)
429{
430 return imod->name;
431}
432
433const char * 418const char *
434CONF_imodule_get_value(const CONF_IMODULE *imod) 419CONF_imodule_get_value(const CONF_IMODULE *imod)
435{ 420{
436 return imod->value; 421 return imod->value;
437} 422}
438 423
439void *
440CONF_imodule_get_usr_data(const CONF_IMODULE *imod)
441{
442 return imod->usr_data;
443}
444
445void
446CONF_imodule_set_usr_data(CONF_IMODULE *imod, void *usr_data)
447{
448 imod->usr_data = usr_data;
449}
450
451CONF_MODULE *
452CONF_imodule_get_module(const CONF_IMODULE *imod)
453{
454 return imod->mod;
455}
456
457unsigned long
458CONF_imodule_get_flags(const CONF_IMODULE *imod)
459{
460 return imod->flags;
461}
462
463void
464CONF_imodule_set_flags(CONF_IMODULE *imod, unsigned long flags)
465{
466 imod->flags = flags;
467}
468
469void *
470CONF_module_get_usr_data(CONF_MODULE *mod)
471{
472 return mod->usr_data;
473}
474
475void
476CONF_module_set_usr_data(CONF_MODULE *mod, void *usr_data)
477{
478 mod->usr_data = usr_data;
479}
480
481/* Return default config file name */
482
483char * 424char *
484CONF_get1_default_config_file(void) 425CONF_get1_default_config_file(void)
485{ 426{