From 88678844a5cc5696dd683f7665241808db3bb81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E4=B8=80=E9=B8=A3?= Date: Fri, 21 Jun 2019 17:04:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9client=20hello=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E5=87=BD=E6=95=B0,=E5=85=81=E8=AE=B8sni=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/src/ssl_utils.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/common/src/ssl_utils.cpp b/common/src/ssl_utils.cpp index 7a255f7..785ab48 100644 --- a/common/src/ssl_utils.cpp +++ b/common/src/ssl_utils.cpp @@ -440,19 +440,11 @@ struct ssl_chello* ssl_chello_parse(const unsigned char* buff, size_t buff_len, } len = (size_t)buff[pos]; pos += 1 + len; - /* ssl 3.0, no extensions */ - if(_chello->min_version.major == 3 && _chello->min_version.minor == 0) + /* no extensions */ + if(pos == buff_len) { - if(pos == buff_len) - { - *result = CHELLO_PARSE_SUCCESS; - return _chello; - } - else - { - *result = CHELLO_PARSE_INVALID_FORMAT; - return _chello; - } + *result = CHELLO_PARSE_SUCCESS; + return _chello; } /* Extensions */ if (pos + 2 > buff_len)