summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/dh/dhtest.c
diff options
context:
space:
mode:
authortb <>2023-08-12 06:23:59 +0000
committertb <>2023-08-12 06:23:59 +0000
commit8532495961e4df3e1e6cd866be1d162df72610ac (patch)
tree327469bf0d514dd7d9b586cecd7035b3ff624256 /src/regress/lib/libcrypto/dh/dhtest.c
parent7dd9dcbc7a655f702d9a2f3f641a158d5f2d2566 (diff)
downloadopenbsd-8532495961e4df3e1e6cd866be1d162df72610ac.tar.gz
openbsd-8532495961e4df3e1e6cd866be1d162df72610ac.tar.bz2
openbsd-8532495961e4df3e1e6cd866be1d162df72610ac.zip
Check that {DH,DSA}_get0_engine() returns NULL if OPENSSL_NO_ENGINE is
defined.
Diffstat (limited to 'src/regress/lib/libcrypto/dh/dhtest.c')
-rw-r--r--src/regress/lib/libcrypto/dh/dhtest.c9
1 files changed, 8 insertions, 1 deletions
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 @@
1/* $OpenBSD: dhtest.c,v 1.8 2023/07/28 13:05:59 tb Exp $ */ 1/* $OpenBSD: dhtest.c,v 1.9 2023/08/12 06:23:59 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -108,6 +108,13 @@ main(int argc, char *argv[])
108 if ((a = DH_new()) == NULL) 108 if ((a = DH_new()) == NULL)
109 goto err; 109 goto err;
110 110
111#ifdef OPENSSL_NO_ENGINE
112 if (DH_get0_engine(a) != NULL) {
113 fprintf(stderr, "ENGINE was not NULL\n");
114 goto err;
115 }
116#endif
117
111 if (!DH_generate_parameters_ex(a, 64, DH_GENERATOR_5, _cb)) 118 if (!DH_generate_parameters_ex(a, 64, DH_GENERATOR_5, _cb))
112 goto err; 119 goto err;
113 120