From: tb Date: Fri, 18 Oct 2024 11:12:10 +0000 (+0000) Subject: Inline last use of OPENSSL_load_builtin_modules() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=72fb407fee625a4df6bc1f41d8eeb91ee5446861;p=openbsd Inline last use of OPENSSL_load_builtin_modules() This used to be a trivial wrapper of the ASN1_add_oid_module() horror. It's no longer exported, so it can go away. It moves from the terribly named file conf_mall.c to the equally terribly named file conf_sap.c. I have no idea what mall and sap are supposed to mean in this context. --- diff --git a/lib/libcrypto/Makefile b/lib/libcrypto/Makefile index 5d435d306d1..d3be27ade1a 100644 --- a/lib/libcrypto/Makefile +++ b/lib/libcrypto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.212 2024/10/18 10:57:26 tb Exp $ +# $OpenBSD: Makefile,v 1.213 2024/10/18 11:12:10 tb Exp $ LIB= crypto LIBREBUILD=y @@ -230,7 +230,6 @@ SRCS+= conf_api.c SRCS+= conf_def.c SRCS+= conf_err.c SRCS+= conf_lib.c -SRCS+= conf_mall.c SRCS+= conf_mod.c SRCS+= conf_sap.c diff --git a/lib/libcrypto/conf/conf_local.h b/lib/libcrypto/conf/conf_local.h index e22c1180b91..c3c6b229234 100644 --- a/lib/libcrypto/conf/conf_local.h +++ b/lib/libcrypto/conf/conf_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_local.h,v 1.8 2024/10/10 06:51:22 tb Exp $ */ +/* $OpenBSD: conf_local.h,v 1.9 2024/10/18 11:12:10 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -98,8 +98,6 @@ char *_CONF_get_string(const CONF *conf, const char *section, int _CONF_new_data(CONF *conf); void _CONF_free_data(CONF *conf); -void OPENSSL_load_builtin_modules(void); - __END_HIDDEN_DECLS #endif /* HEADER_CONF_LOCAL_H */ diff --git a/lib/libcrypto/conf/conf_mall.c b/lib/libcrypto/conf/conf_mall.c deleted file mode 100644 index dd1bb6797f6..00000000000 --- a/lib/libcrypto/conf/conf_mall.c +++ /dev/null @@ -1,69 +0,0 @@ -/* $OpenBSD: conf_mall.c,v 1.13 2024/08/31 09:54:31 tb Exp $ */ -/* Written by Stephen Henson (steve@openssl.org) for the OpenSSL - * project 2001. - */ -/* ==================================================================== - * Copyright (c) 2001 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * licensing@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - -#include - -/* Load all OpenSSL builtin modules */ -void ASN1_add_oid_module(void); - -void -OPENSSL_load_builtin_modules(void) -{ - /* Add builtin modules here */ - ASN1_add_oid_module(); -} diff --git a/lib/libcrypto/conf/conf_sap.c b/lib/libcrypto/conf/conf_sap.c index 59c90dab493..6951718765c 100644 --- a/lib/libcrypto/conf/conf_sap.c +++ b/lib/libcrypto/conf/conf_sap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_sap.c,v 1.17 2024/08/31 09:54:31 tb Exp $ */ +/* $OpenBSD: conf_sap.c,v 1.18 2024/10/18 11:12:10 tb Exp $ */ /* Written by Stephen Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -78,11 +78,12 @@ static pthread_once_t openssl_configured = PTHREAD_ONCE_INIT; static const char *openssl_config_name; +void ASN1_add_oid_module(void); + static void OPENSSL_config_internal(void) { - OPENSSL_load_builtin_modules(); - /* Add others here? */ + ASN1_add_oid_module(); ERR_clear_error(); if (CONF_modules_load_file(NULL, openssl_config_name,