summaryrefslogtreecommitdiffstats
path: root/test/dtlstest.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-05-21 12:20:18 +0100
committerMatt Caswell <matt@openssl.org>2018-05-22 13:21:24 +0100
commit1aac20f5095fca8691ef4495c3e7438c935a33dc (patch)
tree8e6ae5d5a01b9a88c7be6cbe48d0e60afa08817d /test/dtlstest.c
parentd61e6040a02464f1dd41942ee1e17ef59822102d (diff)
Fix no-ec in combination with no-dh
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6321)
Diffstat (limited to 'test/dtlstest.c')
-rw-r--r--test/dtlstest.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/dtlstest.c b/test/dtlstest.c
index 859ec6bee2..c41aac8319 100644
--- a/test/dtlstest.c
+++ b/test/dtlstest.c
@@ -116,7 +116,16 @@ static int test_dtls_unprocessed(int testidx)
#define CLI_TO_SRV_EPOCH_0_RECS 3
#define CLI_TO_SRV_EPOCH_1_RECS 1
-#define SRV_TO_CLI_EPOCH_0_RECS 12
+#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
+# define SRV_TO_CLI_EPOCH_0_RECS 12
+#else
+/*
+ * In this case we have no ServerKeyExchange message, because we don't have
+ * ECDHE or DHE. When it is present it gets fragmented into 3 records in this
+ * test.
+ */
+# define SRV_TO_CLI_EPOCH_0_RECS 9
+#endif
#define SRV_TO_CLI_EPOCH_1_RECS 1
#define TOTAL_FULL_HAND_RECORDS \
(CLI_TO_SRV_EPOCH_0_RECS + CLI_TO_SRV_EPOCH_1_RECS + \