diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-09-14 14:38:36 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-09-25 18:39:43 +0300 |
commit | 0c9323a9e64ca88a6f11d007e6f31c609762e950 (patch) | |
tree | f114dd847094f70f9d0f4ce1b5361ad4cecef011 | |
parent | b6a36f824b88590ec9a8dcf24a4566f24a49d0b3 (diff) | |
download | libmicrohttpd-0c9323a9e64ca88a6f11d007e6f31c609762e950.tar.gz libmicrohttpd-0c9323a9e64ca88a6f11d007e6f31c609762e950.zip |
test_{md5,sha{256,512_256}}: added long test sequence
-rw-r--r-- | src/microhttpd/test_md5.c | 9 | ||||
-rw-r--r-- | src/microhttpd/test_sha256.c | 12 | ||||
-rw-r--r-- | src/microhttpd/test_sha512_256.c | 12 |
3 files changed, 31 insertions, 2 deletions
diff --git a/src/microhttpd/test_md5.c b/src/microhttpd/test_md5.c index ac1e6a04..cf7ccbd1 100644 --- a/src/microhttpd/test_md5.c +++ b/src/microhttpd/test_md5.c | |||
@@ -63,6 +63,15 @@ static const struct data_unit1 data_units1[] = { | |||
63 | "abcdefghijklmnopqrstuvwxyzzyxwvutsrqponMLKJIHGFEDCBA"), | 63 | "abcdefghijklmnopqrstuvwxyzzyxwvutsrqponMLKJIHGFEDCBA"), |
64 | {0xaf, 0xab, 0xc7, 0xe9, 0xe7, 0x17, 0xbe, 0xd6, 0xc0, 0x0f, 0x78, 0x8c, | 64 | {0xaf, 0xab, 0xc7, 0xe9, 0xe7, 0x17, 0xbe, 0xd6, 0xc0, 0x0f, 0x78, 0x8c, |
65 | 0xde, 0xdd, 0x11, 0xd1}}, | 65 | 0xde, 0xdd, 0x11, 0xd1}}, |
66 | {D_STR_W_LEN ("/long/long/long/long/long/long/long/long/long/long/long" \ | ||
67 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
68 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
69 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
70 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
71 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
72 | "/long/long/long/long/path?with%20some=parameters"), | ||
73 | {0x7e, 0xe6, 0xdb, 0xe2, 0x76, 0x49, 0x1a, 0xd8, 0xaf, 0xf3, 0x52, 0x2d, | ||
74 | 0xd8, 0xfc, 0x89, 0x1e}}, | ||
66 | {D_STR_W_LEN (""), | 75 | {D_STR_W_LEN (""), |
67 | {0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, 0x09, 0x98, | 76 | {0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, 0x09, 0x98, |
68 | 0xec, 0xf8, 0x42, 0x7e}}, | 77 | 0xec, 0xf8, 0x42, 0x7e}}, |
diff --git a/src/microhttpd/test_sha256.c b/src/microhttpd/test_sha256.c index 287414aa..a44ceedc 100644 --- a/src/microhttpd/test_sha256.c +++ b/src/microhttpd/test_sha256.c | |||
@@ -87,7 +87,17 @@ static const struct data_unit1 data_units1[] = { | |||
87 | {0x27, 0xd1, 0xe8, 0xbc, 0x6a, 0x79, 0x16, 0x83, 0x61, 0x73, 0xa9, 0xa8, | 87 | {0x27, 0xd1, 0xe8, 0xbc, 0x6a, 0x79, 0x16, 0x83, 0x61, 0x73, 0xa9, 0xa8, |
88 | 0x9b, 0xaf, 0xaf, 0xcf, | 88 | 0x9b, 0xaf, 0xaf, 0xcf, |
89 | 0x47, 0x4d, 0x09, 0xef, 0x6d, 0x50, 0x35, 0x12, 0x25, 0x72, 0xd8, 0x68, | 89 | 0x47, 0x4d, 0x09, 0xef, 0x6d, 0x50, 0x35, 0x12, 0x25, 0x72, 0xd8, 0x68, |
90 | 0xdc, 0x1f, 0xd2, 0xf4}} | 90 | 0xdc, 0x1f, 0xd2, 0xf4}}, |
91 | {D_STR_W_LEN ("/long/long/long/long/long/long/long/long/long/long/long" \ | ||
92 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
93 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
94 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
95 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
96 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
97 | "/long/long/long/long/path?with%20some=parameters"), | ||
98 | {0x73, 0x85, 0xc5, 0xb9, 0x8f, 0xaf, 0x7d, 0x5e, 0xad, 0xd8, 0x0b, 0x8e, | ||
99 | 0x12, 0xdb, 0x28, 0x60, 0xc7, 0xc7, 0x55, 0x05, 0x2f, 0x7c, 0x6f, 0xfa, | ||
100 | 0xd1, 0xe3, 0xe1, 0x7b, 0x04, 0xd4, 0xb0, 0x21}} | ||
91 | }; | 101 | }; |
92 | 102 | ||
93 | static const size_t units1_num = sizeof(data_units1) / sizeof(data_units1[0]); | 103 | static const size_t units1_num = sizeof(data_units1) / sizeof(data_units1[0]); |
diff --git a/src/microhttpd/test_sha512_256.c b/src/microhttpd/test_sha512_256.c index f46e2cf0..e23ad256 100644 --- a/src/microhttpd/test_sha512_256.c +++ b/src/microhttpd/test_sha512_256.c | |||
@@ -80,7 +80,17 @@ static const struct data_unit1 data_units1[] = { | |||
80 | "abcdefghijklmnopqrstuvwxyzzyxwvutsrqponMLKJIHGFEDCBA"), | 80 | "abcdefghijklmnopqrstuvwxyzzyxwvutsrqponMLKJIHGFEDCBA"), |
81 | {0xad, 0xe9, 0x5d, 0x55, 0x3b, 0x9e, 0x45, 0x69, 0xdb, 0x53, 0xa4, 0x04, | 81 | {0xad, 0xe9, 0x5d, 0x55, 0x3b, 0x9e, 0x45, 0x69, 0xdb, 0x53, 0xa4, 0x04, |
82 | 0x92, 0xe7, 0x87, 0x94, 0xff, 0xc9, 0x98, 0x5f, 0x93, 0x03, 0x86, 0x45, | 82 | 0x92, 0xe7, 0x87, 0x94, 0xff, 0xc9, 0x98, 0x5f, 0x93, 0x03, 0x86, 0x45, |
83 | 0xe1, 0x97, 0x17, 0x72, 0x7c, 0xbc, 0x31, 0x15}} | 83 | 0xe1, 0x97, 0x17, 0x72, 0x7c, 0xbc, 0x31, 0x15}}, |
84 | {D_STR_W_LEN ("/long/long/long/long/long/long/long/long/long/long/long" \ | ||
85 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
86 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
87 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
88 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
89 | "/long/long/long/long/long/long/long/long/long/long/long" \ | ||
90 | "/long/long/long/long/path?with%20some=parameters"), | ||
91 | {0xbc, 0xab, 0xc6, 0x2c, 0x0a, 0x22, 0xd5, 0xcb, 0xac, 0xac, 0xe9, 0x25, | ||
92 | 0xcf, 0xce, 0xaa, 0xaf, 0x0e, 0xa1, 0xed, 0x42, 0x46, 0x8a, 0xe2, 0x01, | ||
93 | 0xee, 0x2f, 0xdb, 0x39, 0x75, 0x47, 0x73, 0xf1}} | ||
84 | }; | 94 | }; |
85 | 95 | ||
86 | static const size_t units1_num = sizeof(data_units1) / sizeof(data_units1[0]); | 96 | static const size_t units1_num = sizeof(data_units1) / sizeof(data_units1[0]); |