From 427383233df4dfbfd540f6b62c1d8e11934e293c Mon Sep 17 00:00:00 2001 From: jordan Date: Tue, 20 Sep 2022 14:41:11 -0500 Subject: [PATCH] Fix formatting, add check to not support plain HTTP requests in DTLS --- src/internal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal.c b/src/internal.c index fdeea1ee0..b711b2685 100644 --- a/src/internal.c +++ b/src/internal.c @@ -10133,7 +10133,7 @@ int CheckAvailableSize(WOLFSSL *ssl, int size) #ifdef WOLFSSL_DTLS13 static int GetInputData(WOLFSSL *ssl, word32 size); static int GetDtls13RecordHeader(WOLFSSL* ssl, word32* inOutIdx, - RecordLayerHeader* rh, word16* size) + RecordLayerHeader* rh, word16* size) { Dtls13UnifiedHdrInfo hdrInfo; @@ -10231,7 +10231,7 @@ static int GetDtls13RecordHeader(WOLFSSL* ssl, word32* inOutIdx, #ifdef WOLFSSL_DTLS static int GetDtlsRecordHeader(WOLFSSL* ssl, word32* inOutIdx, - RecordLayerHeader* rh, word16* size) + RecordLayerHeader* rh, word16* size) { #ifdef HAVE_FUZZER @@ -10448,7 +10448,7 @@ static int GetRecordHeader(WOLFSSL* ssl, word32* inOutIdx, case no_type: default: #ifdef OPENSSL_ALL - { + if (!ssl->options.dtls) { char *method = (char*)ssl->buffers.inputBuffer.buffer + start; /* Attempt to identify if this is a plain HTTP request. * No size checks because this function assumes at least