sync with OpenBSD -current
This commit is contained in:
parent
fe31ca4724
commit
2d743fc5aa
189 changed files with 3737 additions and 1337 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: conf_def.c,v 1.33 2020/02/17 12:51:48 inoguchi Exp $ */
|
||||
/* $OpenBSD: conf_def.c,v 1.34 2024/04/09 13:56:30 beck Exp $ */
|
||||
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -122,12 +122,14 @@ NCONF_default(void)
|
|||
{
|
||||
return &default_method;
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_default);
|
||||
|
||||
CONF_METHOD *
|
||||
NCONF_WIN32(void)
|
||||
{
|
||||
return &WIN32_method;
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_WIN32);
|
||||
|
||||
static CONF *
|
||||
def_create(CONF_METHOD *meth)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: conf_err.c,v 1.15 2022/07/12 14:42:48 kn Exp $ */
|
||||
/* $OpenBSD: conf_err.c,v 1.16 2024/04/09 13:56:30 beck Exp $ */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
|
@ -103,3 +103,4 @@ ERR_load_CONF_strings(void)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
LCRYPTO_ALIAS(ERR_load_CONF_strings);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: conf_lib.c,v 1.16 2024/01/28 21:00:54 tb Exp $ */
|
||||
/* $OpenBSD: conf_lib.c,v 1.17 2024/04/09 13:56:30 beck Exp $ */
|
||||
/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
|
||||
* project 2000.
|
||||
*/
|
||||
|
@ -75,6 +75,7 @@ CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash)
|
|||
default_CONF_method->init(conf);
|
||||
conf->data = hash;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_set_nconf);
|
||||
|
||||
/* The following section contains the "CONF classic" functions,
|
||||
rewritten in terms of the new CONF interface. */
|
||||
|
@ -85,6 +86,7 @@ CONF_set_default_method(CONF_METHOD *meth)
|
|||
default_CONF_method = meth;
|
||||
return 1;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_set_default_method);
|
||||
|
||||
LHASH_OF(CONF_VALUE) *
|
||||
CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, long *eline)
|
||||
|
@ -103,6 +105,7 @@ CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file, long *eline)
|
|||
|
||||
return ltmp;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_load);
|
||||
|
||||
LHASH_OF(CONF_VALUE) *
|
||||
CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, long *eline)
|
||||
|
@ -118,6 +121,7 @@ CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp, long *eline)
|
|||
BIO_free(btmp);
|
||||
return ltmp;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_load_fp);
|
||||
|
||||
LHASH_OF(CONF_VALUE) *
|
||||
CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, long *eline)
|
||||
|
@ -132,6 +136,7 @@ CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp, long *eline)
|
|||
return ctmp.data;
|
||||
return NULL;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_load_bio);
|
||||
|
||||
STACK_OF(CONF_VALUE) *
|
||||
CONF_get_section(LHASH_OF(CONF_VALUE) *conf, const char *section)
|
||||
|
@ -144,6 +149,7 @@ CONF_get_section(LHASH_OF(CONF_VALUE) *conf, const char *section)
|
|||
return NCONF_get_section(&ctmp, section);
|
||||
}
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_get_section);
|
||||
|
||||
char *
|
||||
CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
||||
|
@ -157,6 +163,7 @@ CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
|||
return NCONF_get_string(&ctmp, group, name);
|
||||
}
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_get_string);
|
||||
|
||||
long
|
||||
CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
||||
|
@ -179,6 +186,7 @@ CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
|||
}
|
||||
return result;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_get_number);
|
||||
|
||||
void
|
||||
CONF_free(LHASH_OF(CONF_VALUE) *conf)
|
||||
|
@ -188,6 +196,7 @@ CONF_free(LHASH_OF(CONF_VALUE) *conf)
|
|||
CONF_set_nconf(&ctmp, conf);
|
||||
NCONF_free_data(&ctmp);
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_free);
|
||||
|
||||
int
|
||||
CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out)
|
||||
|
@ -203,6 +212,7 @@ CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out)
|
|||
BIO_free(btmp);
|
||||
return ret;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_dump_fp);
|
||||
|
||||
int
|
||||
CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out)
|
||||
|
@ -212,6 +222,7 @@ CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out)
|
|||
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
|
||||
|
@ -235,6 +246,7 @@ NCONF_new(CONF_METHOD *meth)
|
|||
|
||||
return ret;
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_new);
|
||||
|
||||
void
|
||||
NCONF_free(CONF *conf)
|
||||
|
@ -243,6 +255,7 @@ NCONF_free(CONF *conf)
|
|||
return;
|
||||
conf->meth->destroy(conf);
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_free);
|
||||
|
||||
void
|
||||
NCONF_free_data(CONF *conf)
|
||||
|
@ -251,6 +264,7 @@ NCONF_free_data(CONF *conf)
|
|||
return;
|
||||
conf->meth->destroy_data(conf);
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_free_data);
|
||||
|
||||
int
|
||||
NCONF_load(CONF *conf, const char *file, long *eline)
|
||||
|
@ -262,6 +276,7 @@ NCONF_load(CONF *conf, const char *file, long *eline)
|
|||
|
||||
return conf->meth->load(conf, file, eline);
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_load);
|
||||
|
||||
int
|
||||
NCONF_load_fp(CONF *conf, FILE *fp, long *eline)
|
||||
|
@ -277,6 +292,7 @@ NCONF_load_fp(CONF *conf, FILE *fp, long *eline)
|
|||
BIO_free(btmp);
|
||||
return ret;
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_load_fp);
|
||||
|
||||
int
|
||||
NCONF_load_bio(CONF *conf, BIO *bp, long *eline)
|
||||
|
@ -288,6 +304,7 @@ NCONF_load_bio(CONF *conf, BIO *bp, long *eline)
|
|||
|
||||
return conf->meth->load_bio(conf, bp, eline);
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_load_bio);
|
||||
|
||||
STACK_OF(CONF_VALUE) *
|
||||
NCONF_get_section(const CONF *conf, const char *section)
|
||||
|
@ -304,6 +321,7 @@ NCONF_get_section(const CONF *conf, const char *section)
|
|||
|
||||
return _CONF_get_section_values(conf, section);
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_get_section);
|
||||
|
||||
char *
|
||||
NCONF_get_string(const CONF *conf, const char *group, const char *name)
|
||||
|
@ -324,6 +342,7 @@ NCONF_get_string(const CONF *conf, const char *group, const char *name)
|
|||
group ? group : "", name);
|
||||
return NULL;
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_get_string);
|
||||
|
||||
int
|
||||
NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
||||
|
@ -348,6 +367,7 @@ 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)
|
||||
|
@ -362,6 +382,7 @@ NCONF_dump_fp(const CONF *conf, FILE *out)
|
|||
BIO_free(btmp);
|
||||
return ret;
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_dump_fp);
|
||||
|
||||
int
|
||||
NCONF_dump_bio(const CONF *conf, BIO *out)
|
||||
|
@ -373,3 +394,4 @@ NCONF_dump_bio(const CONF *conf, BIO *out)
|
|||
|
||||
return conf->meth->dump(conf, out);
|
||||
}
|
||||
LCRYPTO_ALIAS(NCONF_dump_bio);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: conf_mall.c,v 1.11 2024/03/02 09:02:04 tb Exp $ */
|
||||
/* $OpenBSD: conf_mall.c,v 1.12 2024/04/09 13:56:30 beck Exp $ */
|
||||
/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
|
||||
* project 2001.
|
||||
*/
|
||||
|
@ -67,3 +67,4 @@ OPENSSL_load_builtin_modules(void)
|
|||
/* Add builtin modules here */
|
||||
ASN1_add_oid_module();
|
||||
}
|
||||
LCRYPTO_ALIAS(OPENSSL_load_builtin_modules);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: conf_mod.c,v 1.37 2024/03/26 00:24:11 tb Exp $ */
|
||||
/* $OpenBSD: conf_mod.c,v 1.38 2024/04/09 13:56:30 beck Exp $ */
|
||||
/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
|
||||
* project 2001.
|
||||
*/
|
||||
|
@ -147,6 +147,7 @@ CONF_modules_load(const CONF *cnf, const char *appname, unsigned long flags)
|
|||
|
||||
return 1;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_modules_load);
|
||||
|
||||
int
|
||||
CONF_modules_load_file(const char *filename, const char *appname,
|
||||
|
@ -185,6 +186,7 @@ err:
|
|||
|
||||
return ret;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_modules_load_file);
|
||||
|
||||
static int
|
||||
module_run(const CONF *cnf, char *name, char *value, unsigned long flags)
|
||||
|
@ -352,6 +354,7 @@ CONF_modules_unload(int all)
|
|||
supported_modules = NULL;
|
||||
}
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_modules_unload);
|
||||
|
||||
/* unload a single module */
|
||||
static void
|
||||
|
@ -389,6 +392,7 @@ CONF_modules_finish(void)
|
|||
sk_CONF_IMODULE_free(initialized_modules);
|
||||
initialized_modules = NULL;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_modules_finish);
|
||||
|
||||
/* finish a module instance */
|
||||
|
||||
|
@ -409,6 +413,7 @@ CONF_module_add(const char *name, conf_init_func *ifunc, conf_finish_func *ffunc
|
|||
{
|
||||
return module_add(name, ifunc, ffunc);
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_module_add);
|
||||
|
||||
void
|
||||
CONF_modules_free(void)
|
||||
|
@ -416,6 +421,7 @@ CONF_modules_free(void)
|
|||
CONF_modules_finish();
|
||||
CONF_modules_unload(1);
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_modules_free);
|
||||
|
||||
/* Utility functions */
|
||||
|
||||
|
@ -424,54 +430,63 @@ CONF_imodule_get_name(const CONF_IMODULE *imod)
|
|||
{
|
||||
return imod->name;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_imodule_get_name);
|
||||
|
||||
const char *
|
||||
CONF_imodule_get_value(const CONF_IMODULE *imod)
|
||||
{
|
||||
return imod->value;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_imodule_get_value);
|
||||
|
||||
void *
|
||||
CONF_imodule_get_usr_data(const CONF_IMODULE *imod)
|
||||
{
|
||||
return imod->usr_data;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_imodule_get_usr_data);
|
||||
|
||||
void
|
||||
CONF_imodule_set_usr_data(CONF_IMODULE *imod, void *usr_data)
|
||||
{
|
||||
imod->usr_data = usr_data;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_imodule_set_usr_data);
|
||||
|
||||
CONF_MODULE *
|
||||
CONF_imodule_get_module(const CONF_IMODULE *imod)
|
||||
{
|
||||
return imod->mod;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_imodule_get_module);
|
||||
|
||||
unsigned long
|
||||
CONF_imodule_get_flags(const CONF_IMODULE *imod)
|
||||
{
|
||||
return imod->flags;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_imodule_get_flags);
|
||||
|
||||
void
|
||||
CONF_imodule_set_flags(CONF_IMODULE *imod, unsigned long flags)
|
||||
{
|
||||
imod->flags = flags;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_imodule_set_flags);
|
||||
|
||||
void *
|
||||
CONF_module_get_usr_data(CONF_MODULE *mod)
|
||||
{
|
||||
return mod->usr_data;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_module_get_usr_data);
|
||||
|
||||
void
|
||||
CONF_module_set_usr_data(CONF_MODULE *mod, void *usr_data)
|
||||
{
|
||||
mod->usr_data = usr_data;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_module_set_usr_data);
|
||||
|
||||
/* Return default config file name */
|
||||
|
||||
|
@ -485,6 +500,7 @@ CONF_get1_default_config_file(void)
|
|||
return (NULL);
|
||||
return file;
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_get1_default_config_file);
|
||||
|
||||
/* This function takes a list separated by 'sep' and calls the
|
||||
* callback function giving the start and length of each member
|
||||
|
@ -531,3 +547,4 @@ CONF_parse_list(const char *list_, int sep, int nospc,
|
|||
lstart = p + 1;
|
||||
}
|
||||
}
|
||||
LCRYPTO_ALIAS(CONF_parse_list);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: conf_sap.c,v 1.15 2023/11/19 15:46:09 tb Exp $ */
|
||||
/* $OpenBSD: conf_sap.c,v 1.16 2024/04/09 13:56:30 beck Exp $ */
|
||||
/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL
|
||||
* project 2001.
|
||||
*/
|
||||
|
@ -124,6 +124,7 @@ OPENSSL_config(const char *config_name)
|
|||
{
|
||||
(void) OpenSSL_config(config_name);
|
||||
}
|
||||
LCRYPTO_ALIAS(OPENSSL_config);
|
||||
|
||||
static void
|
||||
OPENSSL_no_config_internal(void)
|
||||
|
@ -144,3 +145,4 @@ OPENSSL_no_config(void)
|
|||
{
|
||||
(void) OpenSSL_no_config();
|
||||
}
|
||||
LCRYPTO_ALIAS(OPENSSL_no_config);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue