添加kni模块扫描部分

This commit is contained in:
崔一鸣
2019-11-13 16:11:38 +08:00
parent 28fe2d3053
commit 3abe8a2fc5
6 changed files with 595 additions and 12 deletions

35
inc/ssl_utils.h Normal file
View File

@@ -0,0 +1,35 @@
#pragma once
struct cipher_suite
{
int value;
const char* name;
};
enum chello_parse_result
{
CHELLO_PARSE_SUCCESS = 0,
CHELLO_PARSE_INVALID_FORMAT = -1,
CHELLO_PARSE_NOT_ENOUGH_BUFF = -2
};
struct ssl_version
{
uint8_t minor;
uint8_t major;
uint16_t ossl_format;
};
struct ssl_chello
{
struct ssl_version min_version;
struct ssl_version max_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 chello_parse_result* result);
void ssl_chello_free(struct ssl_chello* chello);