Fix formatting, add check to not support plain HTTP requests in DTLS

This commit is contained in:
jordan
2022-09-20 14:41:11 -05:00
parent 8336dbf366
commit 427383233d

View File

@@ -10133,7 +10133,7 @@ int CheckAvailableSize(WOLFSSL *ssl, int size)
#ifdef WOLFSSL_DTLS13 #ifdef WOLFSSL_DTLS13
static int GetInputData(WOLFSSL *ssl, word32 size); static int GetInputData(WOLFSSL *ssl, word32 size);
static int GetDtls13RecordHeader(WOLFSSL* ssl, word32* inOutIdx, static int GetDtls13RecordHeader(WOLFSSL* ssl, word32* inOutIdx,
RecordLayerHeader* rh, word16* size) RecordLayerHeader* rh, word16* size)
{ {
Dtls13UnifiedHdrInfo hdrInfo; Dtls13UnifiedHdrInfo hdrInfo;
@@ -10231,7 +10231,7 @@ static int GetDtls13RecordHeader(WOLFSSL* ssl, word32* inOutIdx,
#ifdef WOLFSSL_DTLS #ifdef WOLFSSL_DTLS
static int GetDtlsRecordHeader(WOLFSSL* ssl, word32* inOutIdx, static int GetDtlsRecordHeader(WOLFSSL* ssl, word32* inOutIdx,
RecordLayerHeader* rh, word16* size) RecordLayerHeader* rh, word16* size)
{ {
#ifdef HAVE_FUZZER #ifdef HAVE_FUZZER
@@ -10448,7 +10448,7 @@ static int GetRecordHeader(WOLFSSL* ssl, word32* inOutIdx,
case no_type: case no_type:
default: default:
#ifdef OPENSSL_ALL #ifdef OPENSSL_ALL
{ if (!ssl->options.dtls) {
char *method = (char*)ssl->buffers.inputBuffer.buffer + start; char *method = (char*)ssl->buffers.inputBuffer.buffer + start;
/* Attempt to identify if this is a plain HTTP request. /* Attempt to identify if this is a plain HTTP request.
* No size checks because this function assumes at least * No size checks because this function assumes at least