forked from wolfSSL/wolfssl
Synchronous Quick Assist Support for Sniffer
1. Fixed a compiler warnings. 2. Fixed a memory issue when using the storage callback with QAT.
This commit is contained in:
@ -84,7 +84,7 @@ endif
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST += scripts/testsuite.pcap \
|
EXTRA_DIST += scripts/testsuite.pcap \
|
||||||
scripts/sniffer-ipv6.pcap \
|
scripts/sniffer-ipv6.pcap \
|
||||||
scripts/ping.test
|
scripts/ping.test
|
||||||
|
|
||||||
# leave openssl.test as extra until non bash works
|
# leave openssl.test as extra until non bash works
|
||||||
|
@ -3758,7 +3758,7 @@ static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo,
|
|||||||
word32 i, offset, headerSz, qty, remainder;
|
word32 i, offset, headerSz, qty, remainder;
|
||||||
|
|
||||||
Trace(CHAIN_INPUT_STR);
|
Trace(CHAIN_INPUT_STR);
|
||||||
headerSz = (word32)*sslFrame - (word32)chain[0].iov_base;
|
headerSz = (word64)*sslFrame - (word64)chain[0].iov_base;
|
||||||
remainder = *sslBytes;
|
remainder = *sslBytes;
|
||||||
|
|
||||||
if ( (*sslBytes + length) > ssl->buffers.inputBuffer.bufferSize) {
|
if ( (*sslBytes + length) > ssl->buffers.inputBuffer.bufferSize) {
|
||||||
|
@ -26,6 +26,10 @@
|
|||||||
|
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_SNIFFER_STORE_DATA_CB
|
||||||
|
#include <wolfssl/wolfcrypt/memory.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define WOLFSSL_SNIFFER
|
#define WOLFSSL_SNIFFER
|
||||||
#endif
|
#endif
|
||||||
@ -269,9 +273,10 @@ static int myStoreDataCb(const unsigned char* decryptBuf,
|
|||||||
|
|
||||||
if (*data == NULL) {
|
if (*data == NULL) {
|
||||||
byte* tmpData;
|
byte* tmpData;
|
||||||
tmpData = (byte*)realloc(*data, decryptBufSz + 1);
|
tmpData = (byte*)XREALLOC(*data, decryptBufSz + 1,
|
||||||
|
NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
if (tmpData == NULL) {
|
if (tmpData == NULL) {
|
||||||
free(*data);
|
XFREE(*data, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
*data = NULL;
|
*data = NULL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user