-/* $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.
*
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);
-/* $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.
*/
conf_finish_func *finish;
/* Number of successfully initialized modules */
int links;
- void *usr_data;
};
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;
imod->mod = mod;
- if ((imod->name = strdup(name)) == NULL)
- goto err;
if ((imod->value = strdup(value)) == NULL)
goto err;
if (imod == NULL)
return;
- free(imod->name);
free(imod->value);
free(imod);
}
}
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)
{