diff options
| author | tb <> | 2023-08-12 06:23:59 +0000 |
|---|---|---|
| committer | tb <> | 2023-08-12 06:23:59 +0000 |
| commit | f18e92270cdb06ffb7cc5c6c559a94e4500df316 (patch) | |
| tree | 327469bf0d514dd7d9b586cecd7035b3ff624256 /src | |
| parent | 43f9166987ef626b65b6af9f5e4b7a4179c0ecac (diff) | |
| download | openbsd-f18e92270cdb06ffb7cc5c6c559a94e4500df316.tar.gz openbsd-f18e92270cdb06ffb7cc5c6c559a94e4500df316.tar.bz2 openbsd-f18e92270cdb06ffb7cc5c6c559a94e4500df316.zip | |
Check that {DH,DSA}_get0_engine() returns NULL if OPENSSL_NO_ENGINE is
defined.
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libcrypto/dh/dhtest.c | 9 | ||||
| -rw-r--r-- | src/regress/lib/libcrypto/dsa/dsatest.c | 9 |
2 files changed, 16 insertions, 2 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 | ||
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 @@ | |||
| 1 | /* $OpenBSD: dsatest.c,v 1.7 2022/01/12 08:59:56 tb Exp $ */ | 1 | /* $OpenBSD: dsatest.c,v 1.8 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 | * |
| @@ -143,6 +143,13 @@ main(int argc, char **argv) | |||
| 143 | if ((dsa = DSA_new()) == NULL) | 143 | if ((dsa = DSA_new()) == NULL) |
| 144 | goto end; | 144 | goto end; |
| 145 | 145 | ||
| 146 | #ifdef OPENSSL_NO_ENGINE | ||
| 147 | if (DSA_get0_engine(dsa) != NULL) { | ||
| 148 | BIO_printf(bio_err, "ENGINE was not NULL\n"); | ||
| 149 | goto end; | ||
| 150 | } | ||
| 151 | #endif | ||
| 152 | |||
| 146 | if (!DSA_generate_parameters_ex(dsa, 512, seed, 20, &counter, &h, cb)) | 153 | if (!DSA_generate_parameters_ex(dsa, 512, seed, 20, &counter, &h, cb)) |
| 147 | goto end; | 154 | goto end; |
| 148 | 155 | ||
