ssl_stream集成新的client hello解析模块。
This commit is contained in:
@@ -43,7 +43,7 @@ int main()
|
||||
0x69
|
||||
};
|
||||
size_t buff_len = sizeof(buff) / sizeof(char);
|
||||
enum parse_chello_result result;
|
||||
enum chello_parse_result result;
|
||||
struct ssl_chello* chello = ssl_chello_parse(buff, buff_len, &result);
|
||||
printf("-----------------------------ssl2.0 only parse version --------------------------------\n");
|
||||
printf("result is %d\n", result);
|
||||
@@ -66,7 +66,7 @@ int main()
|
||||
0x00, 0x14, 0x00, 0x11, 0x01, 0x00
|
||||
};
|
||||
size_t buff1_len = sizeof(buff1) / sizeof(char);
|
||||
enum parse_chello_result result1;
|
||||
enum chello_parse_result result1;
|
||||
struct ssl_chello* chello1 = ssl_chello_parse(buff1, buff1_len, &result1);
|
||||
printf("--------------------------------ssl3.0, no extensions --------------------------------\n");
|
||||
printf("result is %d\n", result1);
|
||||
@@ -138,12 +138,12 @@ int main()
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
size_t buff2_len = sizeof(buff2) / sizeof(char);
|
||||
enum parse_chello_result result2;
|
||||
enum chello_parse_result result2;
|
||||
struct ssl_chello* chello2 = ssl_chello_parse(buff2, buff2_len, &result2);
|
||||
printf("---------------------------tls1.2 --------------------------------\n");
|
||||
printf("result is %d\n", result2);
|
||||
printf("min version: %d, %d\n", chello2->min_version.major, chello2->min_version.minor);
|
||||
printf("max version: %d, %d\n", chello2->max_version.major, chello2->max_version.minor);
|
||||
printf("min version: %d, %d, ossl format: %x\n", chello2->min_version.major, chello2->min_version.minor, chello2->min_version.ossl_format);
|
||||
printf("max version: %d, %d, ossl format: %x\n", chello2->max_version.major, chello2->max_version.minor, chello2->max_version.ossl_format);
|
||||
printf("cipher suites: %s\n", chello2->cipher_suites);
|
||||
printf("cipher suites for tls1.3: %s\n", chello2->cipher_suites_tls13);
|
||||
printf("sni: %s\n", chello2->sni);
|
||||
|
||||
Reference in New Issue
Block a user