fix bugs
This commit is contained in:
@@ -178,4 +178,31 @@ int ssl_tls_clienthello_parse(const unsigned char *, ssize_t, int,
|
||||
int ssl_dnsname_match(const char *, size_t, const char *, size_t);
|
||||
char * ssl_wildcardify(const char *);
|
||||
|
||||
|
||||
enum parse_chello_result
|
||||
{
|
||||
PARSE_CHELLO_INVALID_FORMAT = 0,
|
||||
PARSE_CHELLO_NOT_ENOUGH_BUFF,
|
||||
PARSE_CHELLO_SUCCESS
|
||||
};
|
||||
|
||||
struct ssl_version
|
||||
{
|
||||
uint8_t major;
|
||||
uint8_t minor;
|
||||
};
|
||||
|
||||
struct ssl_chello
|
||||
{
|
||||
struct ssl_version record_layer_version;
|
||||
struct ssl_version chello_version;
|
||||
char* sni;
|
||||
char* alpn;
|
||||
char* cipher_suites;
|
||||
char* cipher_suites_tls13;
|
||||
};
|
||||
struct ssl_chello* ssl_chello_parse(const unsigned char* buff, size_t buff_len, enum parse_chello_result* result);
|
||||
|
||||
void ssl_chello_free(struct ssl_chello* chello);
|
||||
|
||||
#endif /* !SSL_H */
|
||||
|
||||
Reference in New Issue
Block a user