Synchronous Quick Assist Support for Sniffer

1. Fixed a compiler warnings.
2. Fixed a memory issue when using the storage callback with QAT.
pull/2499/head
John Safranek 2019-10-08 16:49:38 -07:00
parent ff15b3cfaa
commit 89db0da0aa
3 changed files with 9 additions and 4 deletions

View File

@ -84,7 +84,7 @@ endif
endif
EXTRA_DIST += scripts/testsuite.pcap \
scripts/sniffer-ipv6.pcap \
scripts/sniffer-ipv6.pcap \
scripts/ping.test
# leave openssl.test as extra until non bash works

View File

@ -3758,7 +3758,7 @@ static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo,
word32 i, offset, headerSz, qty, remainder;
Trace(CHAIN_INPUT_STR);
headerSz = (word32)*sslFrame - (word32)chain[0].iov_base;
headerSz = (word64)*sslFrame - (word64)chain[0].iov_base;
remainder = *sslBytes;
if ( (*sslBytes + length) > ssl->buffers.inputBuffer.bufferSize) {

View File

@ -26,6 +26,10 @@
#include <wolfssl/wolfcrypt/settings.h>
#ifdef WOLFSSL_SNIFFER_STORE_DATA_CB
#include <wolfssl/wolfcrypt/memory.h>
#endif
#ifdef _WIN32
#define WOLFSSL_SNIFFER
#endif
@ -269,9 +273,10 @@ static int myStoreDataCb(const unsigned char* decryptBuf,
if (*data == NULL) {
byte* tmpData;
tmpData = (byte*)realloc(*data, decryptBufSz + 1);
tmpData = (byte*)XREALLOC(*data, decryptBufSz + 1,
NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (tmpData == NULL) {
free(*data);
XFREE(*data, NULL, DYNAMIC_TYPE_TMP_BUFFER);
*data = NULL;
return -1;
}