-/* $OpenBSD: conf.h,v 1.21 2024/08/31 09:36:38 tb Exp $ */
+/* $OpenBSD: conf.h,v 1.22 2024/08/31 09:39:31 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
If that wasn't the case, the above functions would have been replaced */
struct conf_st {
- CONF_METHOD *meth;
+ const CONF_METHOD *meth;
LHASH_OF(CONF_VALUE) *data;
};
-CONF *NCONF_new(CONF_METHOD *meth);
-CONF_METHOD *NCONF_default(void);
+CONF *NCONF_new(const CONF_METHOD *meth);
+const CONF_METHOD *NCONF_default(void);
void NCONF_free(CONF *conf);
void NCONF_free_data(CONF *conf);
-/* $OpenBSD: conf_def.c,v 1.41 2024/08/31 09:36:38 tb Exp $ */
+/* $OpenBSD: conf_def.c,v 1.42 2024/08/31 09:39:31 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#define scan_esc(conf,p) (((IS_EOF((conf),(p)[1]))?((p)+1):((p)+2)))
static CONF *
-def_create(CONF_METHOD *meth)
+def_create(const CONF_METHOD *meth)
{
CONF *ret;
return c - '0';
}
-static CONF_METHOD default_method = {
+static const CONF_METHOD default_method = {
.name = "OpenSSL default",
.create = def_create,
.init = def_init_default,
.load = def_load,
};
-CONF_METHOD *
+const CONF_METHOD *
NCONF_default(void)
{
return &default_method;
-/* $OpenBSD: conf_lib.c,v 1.21 2024/08/31 09:29:03 tb Exp $ */
+/* $OpenBSD: conf_lib.c,v 1.22 2024/08/31 09:39:31 tb Exp $ */
/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
* project 2000.
*/
#include "conf_local.h"
-static CONF_METHOD *default_CONF_method = NULL;
+static const CONF_METHOD *default_CONF_method = NULL;
/* Init a 'CONF' structure from an old LHASH */
by the "CONF classic" functions, for consistency. */
CONF *
-NCONF_new(CONF_METHOD *meth)
+NCONF_new(const CONF_METHOD *meth)
{
CONF *ret;
-/* $OpenBSD: conf_local.h,v 1.3 2024/08/31 09:29:03 tb Exp $ */
+/* $OpenBSD: conf_local.h,v 1.4 2024/08/31 09:39:31 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
struct conf_method_st {
const char *name;
- CONF *(*create)(CONF_METHOD *meth);
+ CONF *(*create)(const CONF_METHOD *meth);
int (*init)(CONF *conf);
int (*destroy)(CONF *conf);
int (*destroy_data)(CONF *conf);