From 207b275d24250147a1a6803d286ea6d577f36727 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Thu, 22 Jun 2017 14:40:09 +1000 Subject: [PATCH] Fix HelloRetryRequest for Draft 18 --- src/tls13.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tls13.c b/src/tls13.c index d12d4ff47..7943a9cfa 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -2467,9 +2467,11 @@ static int DoTls13HelloRetryRequest(WOLFSSL* ssl, const byte* input, if (ret != 0) return ret; +#ifndef WOLFSSL_TLS13_DRAFT_18 /* Set the cipher suite from the message. */ ssl->options.cipherSuite0 = input[i++]; ssl->options.cipherSuite = input[i++]; +#endif ret = SetCipherSpecs(ssl); if (ret != 0) @@ -3273,9 +3275,11 @@ int SendTls13HelloRetryRequest(WOLFSSL* ssl) output[idx++] = TLS_DRAFT_MAJOR; output[idx++] = TLS_DRAFT_MINOR; +#ifndef WOLFSSL_TLS13_DRAFT_18 /* Chosen cipher suite */ output[idx++] = ssl->options.cipherSuite0; output[idx++] = ssl->options.cipherSuite; +#endif /* Add TLS extensions. */ TLSX_WriteResponse(ssl, output + idx, hello_retry_request);