summaryrefslogtreecommitdiff
path: root/regress/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2023-11-19 13:11:07 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2023-11-19 13:11:07 +0000
commit7c8dcacf56149562237bfc2cf3077f9e921cdc65 (patch)
tree41fa4305f4109323dd7fbe9916c70d709dd2394e /regress/lib
parentd2ab5b1b1761adc212840dab4e7f060a307181cd (diff)
Unifdef OPENSSL_NO_ENGINE in libcrypto regress
Diffstat (limited to 'regress/lib')
-rw-r--r--regress/lib/libcrypto/dsa/dsatest.c4
-rw-r--r--regress/lib/libcrypto/ec/ectest.c8
-rw-r--r--regress/lib/libcrypto/ecdsa/ecdsatest.c5
-rw-r--r--regress/lib/libcrypto/evp/evptest.c25
-rw-r--r--regress/lib/libcrypto/free/freenull.awk9
-rw-r--r--regress/lib/libcrypto/free/freenull.c.head5
-rw-r--r--regress/lib/libcrypto/gost/gost2814789t.c8
-rw-r--r--regress/lib/libcrypto/pbkdf2/pbkdf2.c12
8 files changed, 8 insertions, 68 deletions
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 <time.h>
#include <openssl/ec.h>
-#ifndef OPENSSL_NO_ENGINE
-#include <openssl/engine.h>
-#endif
#include <openssl/err.h>
#include <openssl/obj_mac.h>
#include <openssl/objects.h>
@@ -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 <openssl/evp.h>
#include <openssl/bn.h>
#include <openssl/ecdsa.h>
-#ifndef OPENSSL_NO_ENGINE
-#include <openssl/engine.h>
-#endif
#include <openssl/err.h>
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 <openssl/opensslconf.h>
#include <openssl/evp.h>
-#ifndef OPENSSL_NO_ENGINE
-#include <openssl/engine.h>
-#endif
#include <openssl/err.h>
#include <openssl/conf.h>
@@ -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 <tb@openbsd.org>
#
# 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 <openssl/asn1.h>
#include <openssl/cmac.h>
@@ -6,9 +6,6 @@
#include <openssl/comp.h>
#include <openssl/conf_api.h>
#include <openssl/ct.h>
-#ifndef OPENSSL_NO_ENGINE
-#include <openssl/engine.h>
-#endif
#include <openssl/gost.h>
#include <openssl/hmac.h>
#include <openssl/ocsp.h>
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 <inttypes.h>
#include <openssl/conf.h>
#include <openssl/crypto.h>
-#ifndef OPENSSL_NO_ENGINE
-#include <openssl/engine.h>
-#endif
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
@@ -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 <openssl/opensslconf.h>
#include <openssl/evp.h>
-#ifndef OPENSSL_NO_ENGINE
-#include <openssl/engine.h>
-#endif
#include <openssl/err.h>
#include <openssl/conf.h>
@@ -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);