From 6c7e86f366883545b570dbb089e23b875e575ac2 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Thu, 19 Dec 2019 11:48:05 -0800 Subject: [PATCH] Maintentance: DTLS 1. Client wasn't skipping a handshake state when the server sends a hello without a hello verify. It ended up resetting the handshake hash and resending Hello with its next messages. --- src/ssl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ssl.c b/src/ssl.c index fc2aa63bf..58ade5d04 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -11572,6 +11572,8 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl, #endif #ifdef WOLFSSL_DTLS + if (ssl->options.serverState == + SERVER_HELLOVERIFYREQUEST_COMPLETE) { if (IsDtlsNotSctpMode(ssl)) { /* re-init hashes, exclude first hello and verify request */ if ((ssl->error = InitHandshakeHashes(ssl)) != 0) { @@ -11583,6 +11585,7 @@ int wolfSSL_DTLS_SetCookieSecret(WOLFSSL* ssl, return WOLFSSL_FATAL_ERROR; } } + } #endif ssl->options.connectState = HELLO_AGAIN_REPLY;