feat(支持识别ECH): chello_parse_result增加is_encrypt_chello

This commit is contained in:
yangwei
2023-06-26 15:31:45 +08:00
committed by liuxueli
parent b1803031b7
commit 2fda08dc43
2 changed files with 6 additions and 1 deletions

View File

@@ -29,7 +29,8 @@ struct ssl_chello
char* alpn;
char* cipher_suites;
char* cipher_suites_tls13;
long long is_encrypt_sni;
int is_encrypt_sni;
int is_encrypt_chello;
};
struct ssl_chello* ssl_chello_parse(const unsigned char* buff, size_t buff_len, enum chello_parse_result* result);

View File

@@ -241,6 +241,10 @@ static enum chello_parse_result parse_extensions(const unsigned char* buff, size
{
chello->is_encrypt_sni = 1;
}
if (buff[pos] == 0xfe && buff[pos + 1] == 0x0d)//identify encrypt chello
{
chello->is_encrypt_chello = 1;
}
pos += (4 + len);
}
/* Check we ended where we expected to */