summaryrefslogtreecommitdiff
path: root/platform/src/ssl_utils.cc
diff options
context:
space:
mode:
author崔一鸣 <[email protected]>2018-09-14 14:09:37 +0800
committerzhengchao <[email protected]>2018-09-14 17:30:13 +0800
commitaa4d83e46463d33b7c8b5c465e5900a6dedeb967 (patch)
tree5e786036bf87dadc14909ea3113ff1b8eec44720 /platform/src/ssl_utils.cc
parentc1f8edb75f3d0a10c645d519fc8d06d3bcffab12 (diff)
fix bugs
Diffstat (limited to 'platform/src/ssl_utils.cc')
-rw-r--r--platform/src/ssl_utils.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/platform/src/ssl_utils.cc b/platform/src/ssl_utils.cc
index 17bf877..b3a4358 100644
--- a/platform/src/ssl_utils.cc
+++ b/platform/src/ssl_utils.cc
@@ -1941,7 +1941,7 @@ struct ssl_chello* ssl_chello_parse(const unsigned char* buff, size_t buff_len,
if(buff[0] == 0x80)
{
struct ssl_chello* _chello = (struct ssl_chello*)ALLOC(struct ssl_chello, 1);
- _chello->record_layer_version.major = 0x02;
+ _chello->min_version.major = 0x02;
if(buff_len < 2)
{
*result = PARSE_CHELLO_NOT_ENOUGH_BUFF;
@@ -1973,8 +1973,8 @@ struct ssl_chello* ssl_chello_parse(const unsigned char* buff, size_t buff_len,
*result = PARSE_CHELLO_INVALID_FORMAT;
return _chello;
}
- _chello->chello_version.major = buff[pos];
- _chello->chello_version.minor = buff[pos + 1];
+ _chello->max_version.major = buff[pos];
+ _chello->max_version.minor = buff[pos + 1];
*result = PARSE_CHELLO_SUCCESS;
return _chello;
}
@@ -1991,10 +1991,10 @@ struct ssl_chello* ssl_chello_parse(const unsigned char* buff, size_t buff_len,
return NULL;
}
struct ssl_chello* _chello = (struct ssl_chello*)ALLOC(struct ssl_chello, 1);
- _chello->record_layer_version.major = buff[1];
- _chello->record_layer_version.minor = buff[2];
- _chello->chello_version.major = -1;
- _chello->chello_version.minor = -1;
+ _chello->min_version.major = buff[1];
+ _chello->min_version.minor = buff[2];
+ _chello->max_version.major = -1;
+ _chello->max_version.minor = -1;
_chello->sni = NULL;
_chello->alpn = NULL;
_chello->cipher_suites = NULL;
@@ -2024,8 +2024,8 @@ struct ssl_chello* ssl_chello_parse(const unsigned char* buff, size_t buff_len,
*result = PARSE_CHELLO_INVALID_FORMAT;
return _chello;
}
- _chello->chello_version.major = buff[pos];
- _chello->chello_version.minor = buff[pos+1];
+ _chello->max_version.major = buff[pos];
+ _chello->max_version.minor = buff[pos+1];
pos += 34;
/* Session ID */
if (pos + 1 > buff_len)
@@ -2070,7 +2070,7 @@ 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->record_layer_version.major == 3 && _chello->record_layer_version.minor == 0)
+ if(_chello->min_version.major == 3 && _chello->min_version.minor == 0)
{
if(pos == buff_len)
{