diff options
| author | liuxueli <[email protected]> | 2021-07-05 14:22:24 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2021-07-05 14:22:24 +0800 |
| commit | d1a5729ce11488b38e469e2a8839762c0db76d64 (patch) | |
| tree | 6a76c2fdffb0bfa57c8fdfe4835dc52a2ad88577 /src/tsg_ssl_utils.cpp | |
| parent | 198c01a38e5a89fc8f553cccd4b0faa5af7cca02 (diff) | |
修复TSG-6652: 用户自定义的APP所有识别结果使用common_userdefine_app_name展示,common_app_label展示用户自定义最大的一个v5.0.0
Diffstat (limited to 'src/tsg_ssl_utils.cpp')
| -rw-r--r-- | src/tsg_ssl_utils.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tsg_ssl_utils.cpp b/src/tsg_ssl_utils.cpp index 5e86cfd..66cabc2 100644 --- a/src/tsg_ssl_utils.cpp +++ b/src/tsg_ssl_utils.cpp @@ -192,6 +192,8 @@ static char* parse_server_name_extension(const unsigned char* buff, size_t buff strncpy(sni, (const char*)buff + pos + 3, len); sni[len] = '\0'; *result = CHELLO_PARSE_SUCCESS; + default: + break; } pos += 3 + len; } @@ -373,8 +375,8 @@ struct ssl_chello* ssl_chello_parse(const unsigned char* buff, size_t buff_len, _chello->min_version.major = buff[1]; _chello->min_version.minor = buff[2]; _chello->min_version.ossl_format=(uint16_t)_chello->min_version.major<<8|_chello->min_version.minor; - _chello->max_version.major = -1; - _chello->max_version.minor = -1; + _chello->max_version.major = (uint8_t)(-1); + _chello->max_version.minor = (uint8_t)(-1); _chello->sni = NULL; _chello->alpn = NULL; _chello->cipher_suites = NULL; |
