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/dh/dhtest.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/regress/lib/libcrypto/dh/dhtest.c') diff --git a/src/regress/lib/libcrypto/dh/dhtest.c b/src/regress/lib/libcrypto/dh/dhtest.c index 7ddd118124..cfbfb98c55 100644 --- a/src/regress/lib/libcrypto/dh/dhtest.c +++ b/src/regress/lib/libcrypto/dh/dhtest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhtest.c,v 1.8 2023/07/28 13:05:59 tb Exp $ */ +/* $OpenBSD: dhtest.c,v 1.9 2023/08/12 06:23:59 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -108,6 +108,13 @@ main(int argc, char *argv[]) if ((a = DH_new()) == NULL) goto err; +#ifdef OPENSSL_NO_ENGINE + if (DH_get0_engine(a) != NULL) { + fprintf(stderr, "ENGINE was not NULL\n"); + goto err; + } +#endif + if (!DH_generate_parameters_ex(a, 64, DH_GENERATOR_5, _cb)) goto err; -- cgit v1.2.3-55-g6feb