From 8532495961e4df3e1e6cd866be1d162df72610ac Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 12 Aug 2023 06:23:59 +0000 Subject: Check that {DH,DSA}_get0_engine() returns NULL if OPENSSL_NO_ENGINE is defined. --- src/regress/lib/libcrypto/dsa/dsatest.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/regress/lib/libcrypto/dsa/dsatest.c') diff --git a/src/regress/lib/libcrypto/dsa/dsatest.c b/src/regress/lib/libcrypto/dsa/dsatest.c index e5b56c08d0..b21f1b9750 100644 --- a/src/regress/lib/libcrypto/dsa/dsatest.c +++ b/src/regress/lib/libcrypto/dsa/dsatest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsatest.c,v 1.7 2022/01/12 08:59:56 tb Exp $ */ +/* $OpenBSD: dsatest.c,v 1.8 2023/08/12 06:23:59 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -143,6 +143,13 @@ 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; -- cgit v1.2.3-55-g6feb