From 21950877e691e1b52038d6cffa3914b944c9dfe9 Mon Sep 17 00:00:00 2001 From: 刘学利 Date: Mon, 3 Jul 2023 13:39:18 +0000 Subject: 代码重构,性能优化 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SSL_Proc.h | 59 ++++++++-------------------------------------------------- 1 file changed, 8 insertions(+), 51 deletions(-) (limited to 'src/SSL_Proc.h') diff --git a/src/SSL_Proc.h b/src/SSL_Proc.h index 62ddd35..5dbb380 100644 --- a/src/SSL_Proc.h +++ b/src/SSL_Proc.h @@ -1,53 +1,10 @@ -/* - * SSL_Proc.h - * - * Created on: 2013-5-3 - * Author: lis - */ +#pragma once -#ifndef SSL_PROC_H_ -#define SSL_PROC_H_ +int BtoL1BytesNum(const char *pcData); +int BtoL2BytesNum(const char *pcData); +int BtoL3BytesNum(const char *pcData); +int BtoL4BytesNum(const char *pcData); -#include "ssl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -int BtoL1BytesNum(const char *pcData); -int BtoL2BytesNum(const char *pcData); -int BtoL3BytesNum(const char *pcData); -int BtoL4BytesNum(const char *pcData); - -int ssl_protoRecg(char *pcData, int iDataLen); -char *fn_pcGetSuite(unsigned char *pucId, int iIdLen, stSerialString_t *pastElemTypes); -UCHAR ssl_doWithVersion(ssl_stream **a_ssl_stream, struct streaminfo *a_tcp, - unsigned long long region_flag, int thread_seq, void *a_packet); -UCHAR ssl_doWithNewSessionTicket(ssl_stream **a_ssl_stream, struct streaminfo *a_tcp, - unsigned long long region_flag, int thread_seq, void *a_packet); -UCHAR ssl_doWithApplicationData(ssl_stream **a_ssl_stream, struct streaminfo *a_tcp, - unsigned long long region_flag, int thread_seq, void *a_packet); -UCHAR ssl_doWithAlert(ssl_stream **a_ssl_stream, struct streaminfo *a_tcp, - unsigned long long region_flag, int thread_seq, void *a_packet); -UCHAR ssl_doWithCertificate(ssl_stream **a_ssl_stream, struct streaminfo *a_tcp, - unsigned long long region_flag, int thread_seq, void *a_packet); -UCHAR ssl_doWithCertificateDetail(ssl_stream **a_ssl_stream, struct streaminfo *a_tcp, - unsigned long long region_flag, int thread_seq, void *a_packet); -UCHAR ssl_doWithServerName(ssl_stream **a_ssl_stream, struct streaminfo *a_tcp, - unsigned long long region_flag, int thread_seq, void *a_packet); -UCHAR ssl_doWithClientHello(ssl_stream **a_ssl_stream, struct streaminfo *a_tcp, - unsigned long long region_flag, int thread_seq, void *a_packet); -UCHAR ssl_doWithServerHello(ssl_stream **a_ssl_stream, struct streaminfo *a_tcp, - unsigned long long region_flag, int thread_seq, void *a_packet); -UCHAR ssl_callPlugins(ssl_stream **a_ssl_stream, struct streaminfo *a_tcp, - unsigned long long region_flag, int thread_seq, void *a_packet); -int ssl_getLinkState(ssl_stream *a_ssl_stream); -int fn_iSslDecodeTagLength(char *pcTlvData, int iDataLen, int *pLenBytes); -void fn_vMemCpy(char *pcDst, int iMaxDstLen, char *pcSrc, int iSrcLen); -void fn_vPrintNum(char *pcDstBuff, unsigned char ucNum); - -#ifdef __cplusplus -} -#endif - -#endif /* SSL_PROC_H_ */ +int ssl_identify_version(char *pcData, int iDataLen); +char *fn_pcGetSuite(unsigned char *pucId, int iIdLen, struct ssl_serial_string *pastElemTypes); +void ssl_call_plugins(const struct streaminfo *a_tcp, struct ssl_runtime_context *ssl_context, char *buff, int buff_len, enum ssl_interested_region output_region_mask, int thread_seq, const void *a_packet); -- cgit v1.2.3