diff options
author | Matt Caswell <matt@openssl.org> | 2020-11-27 09:55:36 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-11-30 10:50:13 +0000 |
commit | cbb85bda0c0849ce962e1cf232689d6351e4a217 (patch) | |
tree | 34a01fc626584b740ffa0e6b98ae73458992a1d3 /test/dtlstest.c | |
parent | 9327b5c9c9e3a1b18e5b52491dc438d1e28b5e40 (diff) | |
download | openssl-new-cbb85bda0c0849ce962e1cf232689d6351e4a217.tar.gz |
Fix builds that specify both no-dh and no-ec
Various sections of code assumed that at least one of dh or ec would be
available. We also now also need to handle cases where a provider has
a key exchange algorithm and TLS-GROUP that we don't know about.
Fixes #13536
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13549)
Diffstat (limited to 'test/dtlstest.c')
-rw-r--r-- | test/dtlstest.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/dtlstest.c b/test/dtlstest.c index efdf842e2d..775ba22114 100644 --- a/test/dtlstest.c +++ b/test/dtlstest.c @@ -146,6 +146,11 @@ static int test_dtls_unprocessed(int testidx) #define TOTAL_RECORDS (TOTAL_FULL_HAND_RECORDS + TOTAL_RESUME_HAND_RECORDS) +/* + * We are assuming a ServerKeyExchange message is sent in this test. If we don't + * have either DH or EC, then it won't be + */ +#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC) static int test_dtls_drop_records(int idx) { SSL_CTX *sctx = NULL, *cctx = NULL; @@ -247,6 +252,7 @@ static int test_dtls_drop_records(int idx) return testresult; } +#endif /* !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC) */ static const char dummy_cookie[] = "0123456"; @@ -345,7 +351,9 @@ int setup_tests(void) return 0; ADD_ALL_TESTS(test_dtls_unprocessed, NUM_TESTS); +#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_EC) ADD_ALL_TESTS(test_dtls_drop_records, TOTAL_RECORDS); +#endif ADD_TEST(test_cookie); ADD_TEST(test_dtls_duplicate_records); |