From 40800d806506e23ea84378d9d58ca24c8a2c5676 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Wed, 21 Dec 2016 14:24:20 -0800 Subject: [PATCH] DTLS-SCTP fix 1. Add the SCTP suite test file to the include.am. 2. Skip the sequence number increment for client_hello messages in DTLS, but do the increment for SCTP. --- src/internal.c | 2 +- tests/include.am | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index ca67970df..33d18ee58 100644 --- a/src/internal.c +++ b/src/internal.c @@ -8183,7 +8183,7 @@ static int DoDtlsHandShakeMsg(WOLFSSL* ssl, byte* input, word32* inOutIdx, /* This branch is in order next, and a complete message. */ ret = DoHandShakeMsgType(ssl, input, inOutIdx, type, size, totalSz); if (ret == 0) { - if (type != client_hello) + if (type != client_hello || !IsDtlsNotSctpMode(ssl)) ssl->keys.dtls_expected_peer_handshake_number++; if (ssl->dtls_rx_msg_list != NULL) { ret = DtlsMsgDrain(ssl); diff --git a/tests/include.am b/tests/include.am index 63768e663..8368b49ce 100644 --- a/tests/include.am +++ b/tests/include.am @@ -23,5 +23,6 @@ EXTRA_DIST += tests/test.conf \ tests/test-qsh.conf \ tests/test-psk-no-id.conf \ tests/test-dtls.conf \ + tests/test-sctp.conf \ tests/test-sig.conf DISTCLEANFILES+= tests/.libs/unit.test