From: tb Date: Sun, 19 Nov 2023 13:11:05 +0000 (+0000) Subject: Unifdef OPENSSL_NO_ENGINE in libcrypto regress X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=21b7c6ba441a1e5ca9acb392440b151ccd0c21c5;p=openbsd Unifdef OPENSSL_NO_ENGINE in libcrypto regress --- diff --git a/regress/lib/libcrypto/dsa/dsatest.c b/regress/lib/libcrypto/dsa/dsatest.c index 62343455f36..10ebc3a9f83 100644 --- a/regress/lib/libcrypto/dsa/dsatest.c +++ b/regress/lib/libcrypto/dsa/dsatest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsatest.c,v 1.9 2023/08/20 22:22:55 tb Exp $ */ +/* $OpenBSD: dsatest.c,v 1.10 2023/11/19 13:11:05 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -137,12 +137,10 @@ main(int argc, char **argv) if ((dsa = DSA_new()) == NULL) goto end; -#ifdef OPENSSL_NO_ENGINE if (DSA_get0_engine(dsa) != NULL) { BIO_printf(bio_err, "ENGINE was not NULL\n"); goto end; } -#endif if (!DSA_generate_parameters_ex(dsa, 512, seed, 20, &counter, &h, cb)) goto end; diff --git a/regress/lib/libcrypto/ec/ectest.c b/regress/lib/libcrypto/ec/ectest.c index f0b1028f483..b32b007b304 100644 --- a/regress/lib/libcrypto/ec/ectest.c +++ b/regress/lib/libcrypto/ec/ectest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ectest.c,v 1.21 2023/07/26 22:46:06 tb Exp $ */ +/* $OpenBSD: ectest.c,v 1.22 2023/11/19 13:11:05 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -75,9 +75,6 @@ #include #include -#ifndef OPENSSL_NO_ENGINE -#include -#endif #include #include #include @@ -769,9 +766,6 @@ main(int argc, char *argv[]) /* test the internal curves */ internal_curve_test(); -#ifndef OPENSSL_NO_ENGINE - ENGINE_cleanup(); -#endif CRYPTO_cleanup_all_ex_data(); ERR_free_strings(); ERR_remove_thread_state(NULL); diff --git a/regress/lib/libcrypto/ecdsa/ecdsatest.c b/regress/lib/libcrypto/ecdsa/ecdsatest.c index b0b9bd00651..ef724c74b5b 100644 --- a/regress/lib/libcrypto/ecdsa/ecdsatest.c +++ b/regress/lib/libcrypto/ecdsa/ecdsatest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecdsatest.c,v 1.17 2023/05/04 13:50:14 tb Exp $ */ +/* $OpenBSD: ecdsatest.c,v 1.18 2023/11/19 13:11:06 tb Exp $ */ /* * Written by Nils Larsch for the OpenSSL project. */ @@ -78,9 +78,6 @@ #include #include #include -#ifndef OPENSSL_NO_ENGINE -#include -#endif #include int test_builtin(void); diff --git a/regress/lib/libcrypto/evp/evptest.c b/regress/lib/libcrypto/evp/evptest.c index 6f677dd9594..0b9436a83f4 100644 --- a/regress/lib/libcrypto/evp/evptest.c +++ b/regress/lib/libcrypto/evp/evptest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evptest.c,v 1.12 2023/03/02 20:24:51 tb Exp $ */ +/* $OpenBSD: evptest.c,v 1.13 2023/11/19 13:11:06 tb Exp $ */ /* Written by Ben Laurie, 2001 */ /* * Copyright (c) 2001 The OpenSSL Project. All rights reserved. @@ -53,9 +53,6 @@ #include #include -#ifndef OPENSSL_NO_ENGINE -#include -#endif #include #include @@ -350,23 +347,6 @@ main(int argc, char **argv) /* Load up the software EVP_CIPHER and EVP_MD definitions */ OpenSSL_add_all_ciphers(); OpenSSL_add_all_digests(); -#ifndef OPENSSL_NO_ENGINE - /* Load all compiled-in ENGINEs */ - ENGINE_load_builtin_engines(); -#endif -#if 0 - OPENSSL_config(); -#endif -#ifndef OPENSSL_NO_ENGINE - /* Register all available ENGINE implementations of ciphers and digests. - * This could perhaps be changed to "ENGINE_register_all_complete()"? */ - ENGINE_register_all_ciphers(); - ENGINE_register_all_digests(); - /* If we add command-line options, this statement should be switchable. - * It'll prevent ENGINEs being ENGINE_init()ialised for cipher/digest use if - * they weren't already initialised. */ - /* ENGINE_set_cipher_flags(ENGINE_CIPHER_FLAG_NOINIT); */ -#endif for (;;) { char line[8 * 1024]; @@ -457,9 +437,6 @@ main(int argc, char **argv) } fclose(f); -#ifndef OPENSSL_NO_ENGINE - ENGINE_cleanup(); -#endif EVP_cleanup(); CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL); diff --git a/regress/lib/libcrypto/free/freenull.awk b/regress/lib/libcrypto/free/freenull.awk index 618034cc706..3a10d99ebb9 100644 --- a/regress/lib/libcrypto/free/freenull.awk +++ b/regress/lib/libcrypto/free/freenull.awk @@ -1,4 +1,4 @@ -# $OpenBSD: freenull.awk,v 1.3 2023/07/28 18:29:26 tb Exp $ +# $OpenBSD: freenull.awk,v 1.4 2023/11/19 13:11:06 tb Exp $ # Copyright (c) 2018 Theo Buehler # # Permission to use, copy, modify, and distribute this software for any @@ -42,13 +42,6 @@ next } -/^ENGINE_free$/ { - printf("#ifndef OPENSSL_NO_ENGINE\n") - printf("\tENGINE_free(NULL);\n") - printf("#endif\n") - next -} - /_free$/ { printf("\t%s(NULL);\n", $0) } diff --git a/regress/lib/libcrypto/free/freenull.c.head b/regress/lib/libcrypto/free/freenull.c.head index dc1a7da523b..43b87598e17 100644 --- a/regress/lib/libcrypto/free/freenull.c.head +++ b/regress/lib/libcrypto/free/freenull.c.head @@ -1,4 +1,4 @@ -/* $OpenBSD: freenull.c.head,v 1.6 2023/07/28 17:13:56 tb Exp $ */ +/* $OpenBSD: freenull.c.head,v 1.7 2023/11/19 13:11:06 tb Exp $ */ #include #include @@ -6,9 +6,6 @@ #include #include #include -#ifndef OPENSSL_NO_ENGINE -#include -#endif #include #include #include diff --git a/regress/lib/libcrypto/gost/gost2814789t.c b/regress/lib/libcrypto/gost/gost2814789t.c index 5e439a7e36d..f4914997cff 100644 --- a/regress/lib/libcrypto/gost/gost2814789t.c +++ b/regress/lib/libcrypto/gost/gost2814789t.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gost2814789t.c,v 1.9 2023/06/19 18:51:47 tb Exp $ */ +/* $OpenBSD: gost2814789t.c,v 1.10 2023/11/19 13:11:06 tb Exp $ */ /* vim: set fileencoding=ascii : Charset: ASCII */ /* test/gostr2814789t.c */ /* ==================================================================== @@ -24,9 +24,6 @@ int main(int argc, char *argv[]) #include #include #include -#ifndef OPENSSL_NO_ENGINE -#include -#endif #include #include #include @@ -1289,9 +1286,6 @@ int main(int argc, char *argv[]) } ERR_load_crypto_strings(); -#ifndef OPENSSL_NO_ENGINE - ENGINE_load_builtin_engines(); -#endif OPENSSL_load_builtin_modules(); OpenSSL_add_all_algorithms(); diff --git a/regress/lib/libcrypto/pbkdf2/pbkdf2.c b/regress/lib/libcrypto/pbkdf2/pbkdf2.c index 9cbc031821e..33b683f0a08 100644 --- a/regress/lib/libcrypto/pbkdf2/pbkdf2.c +++ b/regress/lib/libcrypto/pbkdf2/pbkdf2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pbkdf2.c,v 1.2 2018/07/17 17:06:49 tb Exp $ */ +/* $OpenBSD: pbkdf2.c,v 1.3 2023/11/19 13:11:06 tb Exp $ */ /* Written by Christian Heimes, 2013 */ /* * Copyright (c) 2013 The OpenSSL Project. All rights reserved. @@ -56,9 +56,6 @@ #include #include -#ifndef OPENSSL_NO_ENGINE -#include -#endif #include #include @@ -192,10 +189,6 @@ main(int argc,char **argv) const testdata *test = test_cases; OpenSSL_add_all_digests(); -#ifndef OPENSSL_NO_ENGINE - ENGINE_load_builtin_engines(); - ENGINE_register_all_digests(); -#endif for (n = 0; test->pass != NULL; n++, test++) { test_p5_pbkdf2(n, "sha1", test, sha1_results[n]); @@ -203,9 +196,6 @@ main(int argc,char **argv) test_p5_pbkdf2(n, "sha512", test, sha512_results[n]); } -#ifndef OPENSSL_NO_ENGINE - ENGINE_cleanup(); -#endif EVP_cleanup(); CRYPTO_cleanup_all_ex_data(); ERR_remove_thread_state(NULL);