|
|
|
@ -2534,21 +2534,17 @@ static int SSLParserTest07(void)
|
|
|
|
|
{
|
|
|
|
|
int result = 1;
|
|
|
|
|
Flow f;
|
|
|
|
|
uint8_t tlsbuf[] = { 0x16, 0x03, 0x00, 0x00, 0x6f, 0x01,
|
|
|
|
|
0x00, 0x00, 0x6b, 0x03, 0x00, 0x4b, 0x2f, 0xdc,
|
|
|
|
|
0x4e, 0xe6, 0x95, 0xf1, 0xa0, 0xc7, 0xcf, 0x8e,
|
|
|
|
|
0xf6, 0xeb, 0x22, 0x6d, 0xce, 0x9c, 0x44, 0xfb,
|
|
|
|
|
0xc8, 0xa0, 0x44, 0x31, 0x15, 0x4c, 0xe9, 0x97,
|
|
|
|
|
0xa7, 0xa1, 0xfe, 0xea, 0xcc, 0x20, 0x4b, 0x5d,
|
|
|
|
|
0xfb, 0xa5, 0x63, 0x7a, 0x73, 0x95, 0xf7, 0xff,
|
|
|
|
|
0x42, 0xac, 0x8f, 0x46, 0xed, 0xe4, 0xb1, 0x35,
|
|
|
|
|
0x35, 0x78, 0x1a, 0x9d, 0xaf, 0x10, 0xc5, 0x52,
|
|
|
|
|
0xf3, 0x7b, 0xfb, 0xb5, 0xe9, 0xa8, 0x00, 0x24,
|
|
|
|
|
0x00, 0x88, 0x00, 0x87, 0x00, 0x39, 0x00, 0x38,
|
|
|
|
|
0x00, 0x84, 0x00, 0x35, 0x00, 0x45, 0x00, 0x44,
|
|
|
|
|
0x00, 0x33, 0x00, 0x32, 0x00, 0x96, 0x00, 0x41,
|
|
|
|
|
0x00, 0x2f, 0x00, 0x16, 0x00, 0x13, 0xfe, 0xff,
|
|
|
|
|
0x00, 0x0a, 0x00, 0x02, 0x01, 0x00 };
|
|
|
|
|
uint8_t tlsbuf[] = { 0x16, 0x03, 0x00, 0x00, 0x4c, 0x01,
|
|
|
|
|
0x00, 0x00, 0x48, 0x03, 0x00, 0x57, 0x04, 0x9f,
|
|
|
|
|
0x8c, 0x66, 0x61, 0xf6, 0x3d, 0x4f, 0xbf, 0xbb,
|
|
|
|
|
0xa7, 0x47, 0x21, 0x76, 0x6c, 0x21, 0x08, 0x9f,
|
|
|
|
|
0xef, 0x3d, 0x0e, 0x5f, 0x65, 0x1a, 0xe1, 0x93,
|
|
|
|
|
0xb8, 0xaf, 0xd2, 0x82, 0xbd, 0x00, 0x00, 0x06,
|
|
|
|
|
0x00, 0x0a, 0x00, 0x16, 0x00, 0xff, 0x01, 0x00,
|
|
|
|
|
0x00, 0x19, 0x00, 0x00, 0x00, 0x15, 0x00, 0x13,
|
|
|
|
|
0x00, 0x00, 0x10, 0x61, 0x62, 0x63, 0x64, 0x65,
|
|
|
|
|
0x66, 0x67, 0x68, 0x2e, 0x65, 0x66, 0x67, 0x68,
|
|
|
|
|
0x2e, 0x6e, 0x6f };
|
|
|
|
|
uint32_t tlslen = sizeof(tlsbuf);
|
|
|
|
|
TcpSession ssn;
|
|
|
|
|
AppLayerParserThreadCtx *alp_tctx = AppLayerParserThreadCtxAlloc();
|
|
|
|
@ -2718,26 +2714,22 @@ static int SSLParserTest09(void)
|
|
|
|
|
int result = 1;
|
|
|
|
|
Flow f;
|
|
|
|
|
uint8_t buf1[] = {
|
|
|
|
|
0x16,
|
|
|
|
|
0x16,
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf1_len = sizeof(buf1);
|
|
|
|
|
|
|
|
|
|
uint8_t buf2[] = {
|
|
|
|
|
0x03, 0x00, 0x00, 0x6f, 0x01,
|
|
|
|
|
0x00, 0x00, 0x6b, 0x03, 0x00, 0x4b, 0x2f, 0xdc,
|
|
|
|
|
0x4e, 0xe6, 0x95, 0xf1, 0xa0, 0xc7, 0xcf, 0x8e,
|
|
|
|
|
0xf6, 0xeb, 0x22, 0x6d, 0xce, 0x9c, 0x44, 0xfb,
|
|
|
|
|
0xc8, 0xa0, 0x44, 0x31, 0x15, 0x4c, 0xe9, 0x97,
|
|
|
|
|
0xa7, 0xa1, 0xfe, 0xea, 0xcc, 0x20, 0x4b, 0x5d,
|
|
|
|
|
0xfb, 0xa5, 0x63, 0x7a, 0x73, 0x95, 0xf7, 0xff,
|
|
|
|
|
0x42, 0xac, 0x8f, 0x46, 0xed, 0xe4, 0xb1, 0x35,
|
|
|
|
|
0x35, 0x78, 0x1a, 0x9d, 0xaf, 0x10, 0xc5, 0x52,
|
|
|
|
|
0xf3, 0x7b, 0xfb, 0xb5, 0xe9, 0xa8, 0x00, 0x24,
|
|
|
|
|
0x00, 0x88, 0x00, 0x87, 0x00, 0x39, 0x00, 0x38,
|
|
|
|
|
0x00, 0x84, 0x00, 0x35, 0x00, 0x45, 0x00, 0x44,
|
|
|
|
|
0x00, 0x33, 0x00, 0x32, 0x00, 0x96, 0x00, 0x41,
|
|
|
|
|
0x00, 0x2f, 0x00, 0x16, 0x00, 0x13, 0xfe, 0xff,
|
|
|
|
|
0x00, 0x0a, 0x00, 0x02, 0x01, 0x00
|
|
|
|
|
0x03, 0x00, 0x00, 0x4c, 0x01,
|
|
|
|
|
0x00, 0x00, 0x48, 0x03, 0x00, 0x57, 0x04, 0x9f,
|
|
|
|
|
0x8c, 0x66, 0x61, 0xf6, 0x3d, 0x4f, 0xbf, 0xbb,
|
|
|
|
|
0xa7, 0x47, 0x21, 0x76, 0x6c, 0x21, 0x08, 0x9f,
|
|
|
|
|
0xef, 0x3d, 0x0e, 0x5f, 0x65, 0x1a, 0xe1, 0x93,
|
|
|
|
|
0xb8, 0xaf, 0xd2, 0x82, 0xbd, 0x00, 0x00, 0x06,
|
|
|
|
|
0x00, 0x0a, 0x00, 0x16, 0x00, 0xff, 0x01, 0x00,
|
|
|
|
|
0x00, 0x19, 0x00, 0x00, 0x00, 0x15, 0x00, 0x13,
|
|
|
|
|
0x00, 0x00, 0x10, 0x61, 0x62, 0x63, 0x64, 0x65,
|
|
|
|
|
0x66, 0x67, 0x68, 0x2e, 0x65, 0x66, 0x67, 0x68,
|
|
|
|
|
0x2e, 0x6e, 0x6f
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf2_len = sizeof(buf2);
|
|
|
|
|
TcpSession ssn;
|
|
|
|
@ -2813,21 +2805,17 @@ static int SSLParserTest10(void)
|
|
|
|
|
uint32_t buf1_len = sizeof(buf1);
|
|
|
|
|
|
|
|
|
|
uint8_t buf2[] = {
|
|
|
|
|
0x00, 0x00, 0x6f, 0x01,
|
|
|
|
|
0x00, 0x00, 0x6b, 0x03, 0x00, 0x4b, 0x2f, 0xdc,
|
|
|
|
|
0x4e, 0xe6, 0x95, 0xf1, 0xa0, 0xc7, 0xcf, 0x8e,
|
|
|
|
|
0xf6, 0xeb, 0x22, 0x6d, 0xce, 0x9c, 0x44, 0xfb,
|
|
|
|
|
0xc8, 0xa0, 0x44, 0x31, 0x15, 0x4c, 0xe9, 0x97,
|
|
|
|
|
0xa7, 0xa1, 0xfe, 0xea, 0xcc, 0x20, 0x4b, 0x5d,
|
|
|
|
|
0xfb, 0xa5, 0x63, 0x7a, 0x73, 0x95, 0xf7, 0xff,
|
|
|
|
|
0x42, 0xac, 0x8f, 0x46, 0xed, 0xe4, 0xb1, 0x35,
|
|
|
|
|
0x35, 0x78, 0x1a, 0x9d, 0xaf, 0x10, 0xc5, 0x52,
|
|
|
|
|
0xf3, 0x7b, 0xfb, 0xb5, 0xe9, 0xa8, 0x00, 0x24,
|
|
|
|
|
0x00, 0x88, 0x00, 0x87, 0x00, 0x39, 0x00, 0x38,
|
|
|
|
|
0x00, 0x84, 0x00, 0x35, 0x00, 0x45, 0x00, 0x44,
|
|
|
|
|
0x00, 0x33, 0x00, 0x32, 0x00, 0x96, 0x00, 0x41,
|
|
|
|
|
0x00, 0x2f, 0x00, 0x16, 0x00, 0x13, 0xfe, 0xff,
|
|
|
|
|
0x00, 0x0a, 0x00, 0x02, 0x01, 0x00
|
|
|
|
|
0x00, 0x00, 0x4c, 0x01,
|
|
|
|
|
0x00, 0x00, 0x48, 0x03, 0x00, 0x57, 0x04, 0x9f,
|
|
|
|
|
0x8c, 0x66, 0x61, 0xf6, 0x3d, 0x4f, 0xbf, 0xbb,
|
|
|
|
|
0xa7, 0x47, 0x21, 0x76, 0x6c, 0x21, 0x08, 0x9f,
|
|
|
|
|
0xef, 0x3d, 0x0e, 0x5f, 0x65, 0x1a, 0xe1, 0x93,
|
|
|
|
|
0xb8, 0xaf, 0xd2, 0x82, 0xbd, 0x00, 0x00, 0x06,
|
|
|
|
|
0x00, 0x0a, 0x00, 0x16, 0x00, 0xff, 0x01, 0x00,
|
|
|
|
|
0x00, 0x19, 0x00, 0x00, 0x00, 0x15, 0x00, 0x13,
|
|
|
|
|
0x00, 0x00, 0x10, 0x61, 0x62, 0x63, 0x64, 0x65,
|
|
|
|
|
0x66, 0x67, 0x68, 0x2e, 0x65, 0x66, 0x67, 0x68,
|
|
|
|
|
0x2e, 0x6e, 0x6f
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf2_len = sizeof(buf2);
|
|
|
|
|
TcpSession ssn;
|
|
|
|
@ -2898,25 +2886,21 @@ static int SSLParserTest11(void)
|
|
|
|
|
int result = 1;
|
|
|
|
|
Flow f;
|
|
|
|
|
uint8_t buf1[] = {
|
|
|
|
|
0x16, 0x03, 0x00, 0x00, 0x6f, 0x01,
|
|
|
|
|
0x16, 0x03, 0x00, 0x00, 0x4c, 0x01,
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf1_len = sizeof(buf1);
|
|
|
|
|
|
|
|
|
|
uint8_t buf2[] = {
|
|
|
|
|
0x00, 0x00, 0x6b, 0x03, 0x00, 0x4b, 0x2f, 0xdc,
|
|
|
|
|
0x4e, 0xe6, 0x95, 0xf1, 0xa0, 0xc7, 0xcf, 0x8e,
|
|
|
|
|
0xf6, 0xeb, 0x22, 0x6d, 0xce, 0x9c, 0x44, 0xfb,
|
|
|
|
|
0xc8, 0xa0, 0x44, 0x31, 0x15, 0x4c, 0xe9, 0x97,
|
|
|
|
|
0xa7, 0xa1, 0xfe, 0xea, 0xcc, 0x20, 0x4b, 0x5d,
|
|
|
|
|
0xfb, 0xa5, 0x63, 0x7a, 0x73, 0x95, 0xf7, 0xff,
|
|
|
|
|
0x42, 0xac, 0x8f, 0x46, 0xed, 0xe4, 0xb1, 0x35,
|
|
|
|
|
0x35, 0x78, 0x1a, 0x9d, 0xaf, 0x10, 0xc5, 0x52,
|
|
|
|
|
0xf3, 0x7b, 0xfb, 0xb5, 0xe9, 0xa8, 0x00, 0x24,
|
|
|
|
|
0x00, 0x88, 0x00, 0x87, 0x00, 0x39, 0x00, 0x38,
|
|
|
|
|
0x00, 0x84, 0x00, 0x35, 0x00, 0x45, 0x00, 0x44,
|
|
|
|
|
0x00, 0x33, 0x00, 0x32, 0x00, 0x96, 0x00, 0x41,
|
|
|
|
|
0x00, 0x2f, 0x00, 0x16, 0x00, 0x13, 0xfe, 0xff,
|
|
|
|
|
0x00, 0x0a, 0x00, 0x02, 0x01, 0x00
|
|
|
|
|
0x00, 0x00, 0x48, 0x03, 0x00, 0x57, 0x04, 0x9f,
|
|
|
|
|
0x8c, 0x66, 0x61, 0xf6, 0x3d, 0x4f, 0xbf, 0xbb,
|
|
|
|
|
0xa7, 0x47, 0x21, 0x76, 0x6c, 0x21, 0x08, 0x9f,
|
|
|
|
|
0xef, 0x3d, 0x0e, 0x5f, 0x65, 0x1a, 0xe1, 0x93,
|
|
|
|
|
0xb8, 0xaf, 0xd2, 0x82, 0xbd, 0x00, 0x00, 0x06,
|
|
|
|
|
0x00, 0x0a, 0x00, 0x16, 0x00, 0xff, 0x01, 0x00,
|
|
|
|
|
0x00, 0x19, 0x00, 0x00, 0x00, 0x15, 0x00, 0x13,
|
|
|
|
|
0x00, 0x00, 0x10, 0x61, 0x62, 0x63, 0x64, 0x65,
|
|
|
|
|
0x66, 0x67, 0x68, 0x2e, 0x65, 0x66, 0x67, 0x68,
|
|
|
|
|
0x2e, 0x6e, 0x6f
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf2_len = sizeof(buf2);
|
|
|
|
|
TcpSession ssn;
|
|
|
|
@ -2987,30 +2971,26 @@ static int SSLParserTest12(void)
|
|
|
|
|
int result = 1;
|
|
|
|
|
Flow f;
|
|
|
|
|
uint8_t buf1[] = {
|
|
|
|
|
0x16, 0x03, 0x00, 0x00, 0x6f, 0x01,
|
|
|
|
|
0x16, 0x03, 0x00, 0x00, 0x4c, 0x01,
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf1_len = sizeof(buf1);
|
|
|
|
|
|
|
|
|
|
uint8_t buf2[] = {
|
|
|
|
|
0x00, 0x00, 0x6b,
|
|
|
|
|
0x00, 0x00, 0x48,
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf2_len = sizeof(buf2);
|
|
|
|
|
|
|
|
|
|
uint8_t buf3[] = {
|
|
|
|
|
0x03, 0x00, 0x4b, 0x2f, 0xdc,
|
|
|
|
|
0x4e, 0xe6, 0x95, 0xf1, 0xa0, 0xc7, 0xcf, 0x8e,
|
|
|
|
|
0xf6, 0xeb, 0x22, 0x6d, 0xce, 0x9c, 0x44, 0xfb,
|
|
|
|
|
0xc8, 0xa0, 0x44, 0x31, 0x15, 0x4c, 0xe9, 0x97,
|
|
|
|
|
0xa7, 0xa1, 0xfe, 0xea, 0xcc, 0x20, 0x4b, 0x5d,
|
|
|
|
|
0xfb, 0xa5, 0x63, 0x7a, 0x73, 0x95, 0xf7, 0xff,
|
|
|
|
|
0x42, 0xac, 0x8f, 0x46, 0xed, 0xe4, 0xb1, 0x35,
|
|
|
|
|
0x35, 0x78, 0x1a, 0x9d, 0xaf, 0x10, 0xc5, 0x52,
|
|
|
|
|
0xf3, 0x7b, 0xfb, 0xb5, 0xe9, 0xa8, 0x00, 0x24,
|
|
|
|
|
0x00, 0x88, 0x00, 0x87, 0x00, 0x39, 0x00, 0x38,
|
|
|
|
|
0x00, 0x84, 0x00, 0x35, 0x00, 0x45, 0x00, 0x44,
|
|
|
|
|
0x00, 0x33, 0x00, 0x32, 0x00, 0x96, 0x00, 0x41,
|
|
|
|
|
0x00, 0x2f, 0x00, 0x16, 0x00, 0x13, 0xfe, 0xff,
|
|
|
|
|
0x00, 0x0a, 0x00, 0x02, 0x01, 0x00
|
|
|
|
|
0x03, 0x00, 0x57, 0x04, 0x9f,
|
|
|
|
|
0x8c, 0x66, 0x61, 0xf6, 0x3d, 0x4f, 0xbf, 0xbb,
|
|
|
|
|
0xa7, 0x47, 0x21, 0x76, 0x6c, 0x21, 0x08, 0x9f,
|
|
|
|
|
0xef, 0x3d, 0x0e, 0x5f, 0x65, 0x1a, 0xe1, 0x93,
|
|
|
|
|
0xb8, 0xaf, 0xd2, 0x82, 0xbd, 0x00, 0x00, 0x06,
|
|
|
|
|
0x00, 0x0a, 0x00, 0x16, 0x00, 0xff, 0x01, 0x00,
|
|
|
|
|
0x00, 0x19, 0x00, 0x00, 0x00, 0x15, 0x00, 0x13,
|
|
|
|
|
0x00, 0x00, 0x10, 0x61, 0x62, 0x63, 0x64, 0x65,
|
|
|
|
|
0x66, 0x67, 0x68, 0x2e, 0x65, 0x66, 0x67, 0x68,
|
|
|
|
|
0x2e, 0x6e, 0x6f
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf3_len = sizeof(buf2);
|
|
|
|
|
TcpSession ssn;
|
|
|
|
@ -3091,35 +3071,31 @@ static int SSLParserTest13(void)
|
|
|
|
|
int result = 1;
|
|
|
|
|
Flow f;
|
|
|
|
|
uint8_t buf1[] = {
|
|
|
|
|
0x16, 0x03, 0x00, 0x00, 0x6f, 0x01,
|
|
|
|
|
0x16, 0x03, 0x00, 0x00, 0x4c, 0x01,
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf1_len = sizeof(buf1);
|
|
|
|
|
|
|
|
|
|
uint8_t buf2[] = {
|
|
|
|
|
0x00, 0x00, 0x6b,
|
|
|
|
|
0x00, 0x00, 0x48,
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf2_len = sizeof(buf2);
|
|
|
|
|
|
|
|
|
|
uint8_t buf3[] = {
|
|
|
|
|
0x03, 0x00, 0x4b, 0x2f, 0xdc,
|
|
|
|
|
0x4e,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|
0x00, 0x0a, 0x00, 0x16, 0x00, 0xff, 0x01, 0x00,
|
|
|
|
|
0x00, 0x19, 0x00, 0x00, 0x00, 0x15, 0x00, 0x13,
|
|
|
|
|
0x00, 0x00, 0x10, 0x61, 0x62, 0x63, 0x64, 0x65,
|
|
|
|
|
0x66, 0x67, 0x68, 0x2e, 0x65, 0x66, 0x67, 0x68,
|
|
|
|
|
0x2e, 0x6e, 0x6f
|
|
|
|
|
};
|
|
|
|
|
uint32_t buf4_len = sizeof(buf4);
|
|
|
|
|
TcpSession ssn;
|
|
|
|
|