mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
Merge branch 'master' of github.com:wolfSSL/wolfssl
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
AC_INIT([wolfssl],[3.6.9],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[http://www.wolfssl.com])
|
AC_INIT([wolfssl],[3.6.9d],[https://github.com/wolfssl/wolfssl/issues],[wolfssl],[http://www.wolfssl.com])
|
||||||
|
|
||||||
AC_CONFIG_AUX_DIR([build-aux])
|
AC_CONFIG_AUX_DIR([build-aux])
|
||||||
|
|
||||||
|
@@ -21,9 +21,11 @@ endif
|
|||||||
if !BUILD_IPV6
|
if !BUILD_IPV6
|
||||||
dist_noinst_SCRIPTS+= scripts/external.test
|
dist_noinst_SCRIPTS+= scripts/external.test
|
||||||
dist_noinst_SCRIPTS+= scripts/google.test
|
dist_noinst_SCRIPTS+= scripts/google.test
|
||||||
dist_noinst_SCRIPTS+= scripts/openssl.test
|
#dist_noinst_SCRIPTS+= scripts/openssl.test
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
EXTRA_DIST += scripts/testsuite.pcap
|
EXTRA_DIST += scripts/testsuite.pcap
|
||||||
|
# leave openssl.test as extra until non bash works
|
||||||
|
EXTRA_DIST += scripts/openssl.test
|
||||||
|
@@ -2950,7 +2950,8 @@ static int HaveMoreInput(SnifferSession* session, const byte** sslFrame,
|
|||||||
/* Process Message(s) from sslFrame */
|
/* Process Message(s) from sslFrame */
|
||||||
/* return Number of bytes on success, 0 for no data yet, and -1 on error */
|
/* return Number of bytes on success, 0 for no data yet, and -1 on error */
|
||||||
static int ProcessMessage(const byte* sslFrame, SnifferSession* session,
|
static int ProcessMessage(const byte* sslFrame, SnifferSession* session,
|
||||||
int sslBytes, byte* data, const byte* end,char* error)
|
int sslBytes, byte** data, const byte* end,
|
||||||
|
char* error)
|
||||||
{
|
{
|
||||||
const byte* sslBegin = sslFrame;
|
const byte* sslBegin = sslFrame;
|
||||||
const byte* recordEnd; /* end of record indicator */
|
const byte* recordEnd; /* end of record indicator */
|
||||||
@@ -3076,7 +3077,19 @@ doPart:
|
|||||||
ret = ssl->buffers.clearOutputBuffer.length;
|
ret = ssl->buffers.clearOutputBuffer.length;
|
||||||
TraceGotData(ret);
|
TraceGotData(ret);
|
||||||
if (ret) { /* may be blank message */
|
if (ret) { /* may be blank message */
|
||||||
XMEMCPY(&data[decoded],
|
byte* tmpData; /* don't leak on realloc free */
|
||||||
|
/* add an extra byte at end of allocation in case user
|
||||||
|
* wants to null terminate plaintext */
|
||||||
|
tmpData = (byte*)realloc(*data, decoded + ret + 1);
|
||||||
|
if (tmpData == NULL) {
|
||||||
|
free(*data);
|
||||||
|
*data = NULL;
|
||||||
|
SetError(MEMORY_STR, error, session,
|
||||||
|
FATAL_ERROR_STATE);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
*data = tmpData;
|
||||||
|
XMEMCPY(*data + decoded,
|
||||||
ssl->buffers.clearOutputBuffer.buffer, ret);
|
ssl->buffers.clearOutputBuffer.buffer, ret);
|
||||||
TraceAddedData(ret, decoded);
|
TraceAddedData(ret, decoded);
|
||||||
decoded += ret;
|
decoded += ret;
|
||||||
@@ -3179,7 +3192,7 @@ static int RemoveFatalSession(IpInfo* ipInfo, TcpInfo* tcpInfo,
|
|||||||
|
|
||||||
/* Passes in an IP/TCP packet for decoding (ethernet/localhost frame) removed */
|
/* Passes in an IP/TCP packet for decoding (ethernet/localhost frame) removed */
|
||||||
/* returns Number of bytes on success, 0 for no data yet, and -1 on error */
|
/* returns Number of bytes on success, 0 for no data yet, and -1 on error */
|
||||||
int ssl_DecodePacket(const byte* packet, int length, byte* data, char* error)
|
int ssl_DecodePacket(const byte* packet, int length, byte** data, char* error)
|
||||||
{
|
{
|
||||||
TcpInfo tcpInfo;
|
TcpInfo tcpInfo;
|
||||||
IpInfo ipInfo;
|
IpInfo ipInfo;
|
||||||
|
@@ -296,7 +296,7 @@ int main(int argc, char** argv)
|
|||||||
packetNumber++;
|
packetNumber++;
|
||||||
if (packet) {
|
if (packet) {
|
||||||
|
|
||||||
byte data[65535+16384]; /* may have a partial 16k record cached */
|
byte* data = NULL;
|
||||||
|
|
||||||
if (header.caplen > 40) { /* min ip(20) + min tcp(20) */
|
if (header.caplen > 40) { /* min ip(20) + min tcp(20) */
|
||||||
packet += frame;
|
packet += frame;
|
||||||
@@ -305,7 +305,7 @@ int main(int argc, char** argv)
|
|||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ret = ssl_DecodePacket(packet, header.caplen, data, err);
|
ret = ssl_DecodePacket(packet, header.caplen, &data, err);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
printf("ssl_Decode ret = %d, %s\n", ret, err);
|
printf("ssl_Decode ret = %d, %s\n", ret, err);
|
||||||
hadBadPacket = 1;
|
hadBadPacket = 1;
|
||||||
@@ -313,6 +313,8 @@ int main(int argc, char** argv)
|
|||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
data[ret] = 0;
|
data[ret] = 0;
|
||||||
printf("SSL App Data(%d:%d):%s\n", packetNumber, ret, data);
|
printf("SSL App Data(%d:%d):%s\n", packetNumber, ret, data);
|
||||||
|
free(data);
|
||||||
|
data = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (saveFile)
|
else if (saveFile)
|
||||||
|
@@ -5,6 +5,6 @@ includedir=${prefix}/include
|
|||||||
|
|
||||||
Name: wolfssl
|
Name: wolfssl
|
||||||
Description: wolfssl C library.
|
Description: wolfssl C library.
|
||||||
Version: 3.6.9
|
Version: 3.6.9d
|
||||||
Libs: -L${libdir} -lwolfssl
|
Libs: -L${libdir} -lwolfssl
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
@@ -56,7 +56,7 @@ SSL_SNIFFER_API int ssl_SetNamedPrivateKey(const char* name,
|
|||||||
|
|
||||||
WOLFSSL_API
|
WOLFSSL_API
|
||||||
SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length,
|
SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length,
|
||||||
unsigned char* data, char* error);
|
unsigned char** data, char* error);
|
||||||
|
|
||||||
WOLFSSL_API
|
WOLFSSL_API
|
||||||
SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error);
|
SSL_SNIFFER_API int ssl_Trace(const char* traceFile, char* error);
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LIBWOLFSSL_VERSION_STRING "3.6.9"
|
#define LIBWOLFSSL_VERSION_STRING "3.6.9d"
|
||||||
#define LIBWOLFSSL_VERSION_HEX 0x03006009
|
#define LIBWOLFSSL_VERSION_HEX 0x03006009
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Reference in New Issue
Block a user