summaryrefslogtreecommitdiff
path: root/src/SSL_Message.c
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2024-09-12 16:56:21 +0800
committerliuxueli <[email protected]>2024-09-12 16:56:21 +0800
commit253f0691faa09f2b9ec05664484341700e466da8 (patch)
tree50a4d361ba67e35f4b21748ae75c224b25b548dd /src/SSL_Message.c
parent03beeda8fc775ae43c6c375f026dd216dbafaa04 (diff)
OMPUB-1385: Support parse tlcpHEADv3.1.7dev-3
Diffstat (limited to 'src/SSL_Message.c')
-rw-r--r--src/SSL_Message.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/SSL_Message.c b/src/SSL_Message.c
index cab9954..792c71f 100644
--- a/src/SSL_Message.c
+++ b/src/SSL_Message.c
@@ -49,6 +49,7 @@ const struct ssl_serial_string g_astCompression[] =
const struct ssl_value2string ssl_version_list[] =
{
+ { TLCPV1_VERSION, "TLCP1.1" },
{ DTLSV1_0_VERSION, "DTLS1.0" },
{ DTLSV1_0_VERSION_NOT, "DTLS1.0(OpenSSL pre 0.9.8f)" },
{ TLSV1_2_VERSION, "TLS1.2" },
@@ -236,7 +237,12 @@ unsigned short ssl_get_hello_version(unsigned char *pcData, unsigned int payload
return 0;
}
- if (03 == pcData[4] && 1 == pcData[5])
+ if (1 == pcData[4] && 1 == pcData[5])
+ {
+ /*TLCP 1.1*/
+ return TLCPV1_VERSION;
+ }
+ else if (03 == pcData[4] && 1 == pcData[5])
{
/*TLS 1.0*/
return TLSV1_0_VERSION;
@@ -902,7 +908,12 @@ int ssl_identify_version(char *pcData, int payload_len)
return 0;
}
- if (03 == pcData[1] && 1 == pcData[2])
+ if (01 == pcData[1] && 1 == pcData[2])
+ {
+ /*TLCP 1.1*/
+ return TLCPV1_VERSION;
+ }
+ else if (03 == pcData[1] && 1 == pcData[2])
{
/*TLS 1.0*/
return TLSV1_0_VERSION;