From 849e1113d97ce6d6a3a465e688d15b047364f4e0 Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 31 Aug 2024 09:34:05 +0000 Subject: [PATCH] Remove NCONF_WIN32 Undocumented and entirely unused. Gets rid of a big, modifiable, global table. ok beck jsing --- lib/libcrypto/Symbols.list | 1 - lib/libcrypto/conf/conf.h | 3 +-- lib/libcrypto/conf/conf_def.c | 35 +-------------------------- lib/libcrypto/conf/conf_def.h | 37 +---------------------------- lib/libcrypto/hidden/openssl/conf.h | 3 +-- 5 files changed, 4 insertions(+), 75 deletions(-) diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index e20601a2cc6..2b3fc45ba1f 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -1486,7 +1486,6 @@ NAME_CONSTRAINTS_check NAME_CONSTRAINTS_free NAME_CONSTRAINTS_it NAME_CONSTRAINTS_new -NCONF_WIN32 NCONF_default NCONF_free NCONF_free_data diff --git a/lib/libcrypto/conf/conf.h b/lib/libcrypto/conf/conf.h index feccaafb05d..59222e8ca1f 100644 --- a/lib/libcrypto/conf/conf.h +++ b/lib/libcrypto/conf/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.19 2024/08/31 09:26:18 tb Exp $ */ +/* $OpenBSD: conf.h,v 1.20 2024/08/31 09:34:05 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -133,7 +133,6 @@ struct conf_st { CONF *NCONF_new(CONF_METHOD *meth); CONF_METHOD *NCONF_default(void); -CONF_METHOD *NCONF_WIN32(void); void NCONF_free(CONF *conf); void NCONF_free_data(CONF *conf); diff --git a/lib/libcrypto/conf/conf_def.c b/lib/libcrypto/conf/conf_def.c index d796b8454e8..f0baee52610 100644 --- a/lib/libcrypto/conf/conf_def.c +++ b/lib/libcrypto/conf/conf_def.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_def.c,v 1.39 2024/08/31 09:29:03 tb Exp $ */ +/* $OpenBSD: conf_def.c,v 1.40 2024/08/31 09:34:05 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -107,19 +107,6 @@ def_init_default(CONF *conf) return 1; } -static int -def_init_WIN32(CONF *conf) -{ - if (conf == NULL) - return 0; - - conf->meth = NCONF_WIN32(); - conf->meth_data = (void *)CONF_type_win32; - conf->data = NULL; - - return 1; -} - static int def_destroy_data(CONF *conf) { @@ -661,29 +648,9 @@ static CONF_METHOD default_method = { .load = def_load, }; -static CONF_METHOD WIN32_method = { - "WIN32", - def_create, - def_init_WIN32, - def_destroy, - def_destroy_data, - def_load_bio, - def_dump, - def_is_number, - def_to_int, - def_load, -}; - CONF_METHOD * NCONF_default(void) { return &default_method; } LCRYPTO_ALIAS(NCONF_default); - -CONF_METHOD * -NCONF_WIN32(void) -{ - return &WIN32_method; -} -LCRYPTO_ALIAS(NCONF_WIN32); diff --git a/lib/libcrypto/conf/conf_def.h b/lib/libcrypto/conf/conf_def.h index 956e44337dc..07b0adf81d9 100644 --- a/lib/libcrypto/conf/conf_def.h +++ b/lib/libcrypto/conf/conf_def.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_def.h,v 1.6 2016/12/21 15:49:29 jsing Exp $ */ +/* $OpenBSD: conf_def.h,v 1.7 2024/08/31 09:34:05 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -128,39 +128,4 @@ static unsigned short CONF_type_default[256] = { 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, }; -static unsigned short CONF_type_win32[256] = { - 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0010, 0x0010, 0x0000, 0x0000, 0x0010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0010, 0x0200, 0x0400, 0x0000, 0x0000, 0x0200, 0x0200, 0x0000, - 0x0000, 0x0000, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, - 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, - 0x0001, 0x0001, 0x0000, 0x0A00, 0x0000, 0x0000, 0x0000, 0x0200, - 0x0200, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, - 0x0002, 0x0002, 0x0002, 0x0000, 0x0000, 0x0000, 0x0200, 0x0100, - 0x0000, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, - 0x0004, 0x0004, 0x0004, 0x0000, 0x0200, 0x0000, 0x0200, 0x0000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, -}; - __END_HIDDEN_DECLS diff --git a/lib/libcrypto/hidden/openssl/conf.h b/lib/libcrypto/hidden/openssl/conf.h index b4fb6e90457..dc211d8968b 100644 --- a/lib/libcrypto/hidden/openssl/conf.h +++ b/lib/libcrypto/hidden/openssl/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.3 2024/08/31 09:26:18 tb Exp $ */ +/* $OpenBSD: conf.h,v 1.4 2024/08/31 09:34:05 tb Exp $ */ /* * Copyright (c) 2024 Bob Beck * @@ -38,7 +38,6 @@ LCRYPTO_USED(OPENSSL_config); LCRYPTO_USED(OPENSSL_no_config); LCRYPTO_USED(NCONF_new); LCRYPTO_USED(NCONF_default); -LCRYPTO_USED(NCONF_WIN32); LCRYPTO_USED(NCONF_free); LCRYPTO_USED(NCONF_free_data); LCRYPTO_USED(NCONF_load); -- 2.20.1