From bc960a9c258105ab0fa6e1ba4fd96e519a58c29e Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 21 Sep 2020 14:33:42 -0700 Subject: [PATCH] Fix for sniffer with SNI enabled to properly handle WOLFSSL_SUCCESS error code in `ProcessClientHello`. ZD 10926 --- src/sniffer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sniffer.c b/src/sniffer.c index 89c744fbd..fa27dba65 100644 --- a/src/sniffer.c +++ b/src/sniffer.c @@ -3000,6 +3000,10 @@ static int ProcessClientHello(const byte* input, int* sslBytes, } wc_UnLockMutex(&session->context->namedKeysMutex); } + if (ret > 0) { + /* make sure WOLFSSL_SUCCESS is converted to zero error code */ + ret = 0; + } } #endif