summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlishu <[email protected]>2020-06-17 16:29:19 +0800
committerlishu <[email protected]>2020-06-17 16:29:19 +0800
commite6ff661f457015af0fb2f7ad725d1f59f213c5c3 (patch)
tree4c9c5efa7416e054c84563b3b510e2b11a296d5e /src
parent52880dff4b822d77e83b3102413aff105302f806 (diff)
add maxbuf
Diffstat (limited to 'src')
-rw-r--r--src/SSL_Message.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/SSL_Message.c b/src/SSL_Message.c
index 187f21d..644acb8 100644
--- a/src/SSL_Message.c
+++ b/src/SSL_Message.c
@@ -715,13 +715,14 @@ UCHAR ssl_analyseStreamData(char *pcSslData, int iDataLen, int *res, ssl_stream
a_ssl_stream->ucContType = APPLICATION_DATA;
a_ssl_stream->is_ssl_stream = SSL_TRUE;
a_ssl_stream->uiAllMsgLen = htons(pstSSLRecordHdr->usTotalLen);
- iCurAllMsgLen = a_ssl_stream->uiAllMsgLen ;
+ pcCurSslData += SSL_RECORD_HDRLEN;
iUnAnalyseLen -= SSL_RECORD_HDRLEN;
+ iCurAllMsgLen = a_ssl_stream->uiAllMsgLen ;
iCurMsgLen = a_ssl_stream->uiAllMsgLen < iUnAnalyseLen ? a_ssl_stream->uiAllMsgLen : iUnAnalyseLen;
a_ssl_stream->uiMsgState = SSL_HANDSHAKE_NOTRUNK;
- //static int count;
- //count++;
- //printf("%d\t%d\t%lld\n",count, a_ssl_stream->uiAllMsgLen, g_SysInputInfo[0][0]);
+ static int count;
+ count++;
+ printf("%d\t%d\t%lld\n",count, a_ssl_stream->uiAllMsgLen, g_SysInputInfo[0][0]);
break;
case CHANGE_CIPHER_SEP:
@@ -729,6 +730,7 @@ UCHAR ssl_analyseStreamData(char *pcSslData, int iDataLen, int *res, ssl_stream
a_ssl_stream->is_ssl_stream = SSL_TRUE;
a_ssl_stream->uiAllMsgLen = htons(pstSSLRecordHdr->usTotalLen);
iCurAllMsgLen = a_ssl_stream->uiAllMsgLen ;
+ pcCurSslData += SSL_RECORD_HDRLEN;
iUnAnalyseLen -= SSL_RECORD_HDRLEN;
iCurMsgLen = a_ssl_stream->uiAllMsgLen < iUnAnalyseLen ? a_ssl_stream->uiAllMsgLen : iUnAnalyseLen;
a_ssl_stream->uiMsgState = SSL_HANDSHAKE_NOTRUNK;
@@ -740,6 +742,7 @@ UCHAR ssl_analyseStreamData(char *pcSslData, int iDataLen, int *res, ssl_stream
a_ssl_stream->is_ssl_stream = SSL_TRUE;
a_ssl_stream->uiAllMsgLen = htons(pstSSLRecordHdr->usTotalLen);
iCurAllMsgLen = a_ssl_stream->uiAllMsgLen ;
+ pcCurSslData += SSL_RECORD_HDRLEN;
iUnAnalyseLen -= SSL_RECORD_HDRLEN;
iCurMsgLen = a_ssl_stream->uiAllMsgLen < iUnAnalyseLen ? a_ssl_stream->uiAllMsgLen : iUnAnalyseLen;
a_ssl_stream->uiMsgState = SSL_HANDSHAKE_NOTRUNK;
@@ -767,7 +770,7 @@ UCHAR ssl_analyseStreamData(char *pcSslData, int iDataLen, int *res, ssl_stream
{
case APPLICATION_DATA:
/*���������ݣ�ʵʱ����*/
- return_val = ssl_analyseAppData((char *)pcCurSslData + SSL_RECORD_HDRLEN, iCurAllMsgLen, iUnAnalyseLen, res, a_ssl_stream, a_tcp, region_flag, thread_seq, a_packet);
+ return_val = ssl_analyseAppData((char *)pcCurSslData, iCurAllMsgLen, iUnAnalyseLen, res, a_ssl_stream, a_tcp, region_flag, thread_seq, a_packet);
/*the data is not enough*/
if(*res < iCurAllMsgLen)
{