1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-30 05:24:26 +01:00

Fixed lots of warnings in test cases, due to narrowing conversions.

This commit is contained in:
Matias Fontanini
2013-03-18 11:32:34 -03:00
parent a8edc2af74
commit 0f27b04a92
37 changed files with 216 additions and 305 deletions

View File

@@ -19,48 +19,38 @@ public:
uint8_t empty_iv[RSNEAPOL::key_iv_size] = { 0 };
const uint8_t nonce[RSNEAPOL::nonce_size] = {
'\xb9', 'o', '\xe7', '\xfa', '\xca', '[', '\'', '\xe2', 'M', '\x04',
'\xf1', '\xe6', 'l', '\x06', '\xe1', '\x9b', '\xb3', ':', 'k', '$',
'\xb4', '9', '\xbb', '\xe4', '\xde', '\xd9', '\n', '\xcc', '\xd1',
'3', '\x1e', '\x9e'
185, 111, 231, 250, 202, 91, 39, 226, 77, 4, 241, 230, 108, 6, 225,
155, 179, 58, 107, 36, 180, 57, 187, 228, 222, 217, 10, 204, 209, 51,
30, 158
};
const uint8_t mic[RSNEAPOL::mic_size] = {
'\xb1', '\xba', '\xac', 'U', '\x96', 'J', '\xbd', '0', 'V',
'\x85', 'e', '*', '\xb2', '&', 'u', '\x82'
177, 186, 172, 85, 150, 74, 189, 48, 86, 133, 101, 42, 178, 38, 117,
130
};
const uint8_t key[56] = {
'\xe2', '\xc5', 'O', 'G', '\xf3', '\x0e', '\xc9', '/', 'B', '\xd8',
'\xd5', '\x1e', '1', '\x9d', '\xf5', 'H', '`', 'm', 'N', '\xe3',
'\xd9', '\x84', '\xd3', 'C', 'Z', '\x15', '\xfc', 'X', '\x0f',
'>', 't', '`', '@', '\x91', '\x10', '`', '\xef', '\xb1', 'C',
'\xf8', '\xfd', '\xb6', '\n', '6', '\xcb', '\xa4', 'D', '\x98',
'&', '\x07', '\x1a', '\xff', '\x8b', '\x93', '\xd3', '.'
226, 197, 79, 71, 243, 14, 201, 47, 66, 216, 213, 30, 49, 157, 245,
72, 96, 109, 78, 227, 217, 132, 211, 67, 90, 21, 252, 88, 15, 62, 116,
96, 64, 145, 16, 96, 239, 177, 67, 248, 253, 182, 10, 54, 203, 164,
68, 152, 38, 7, 26, 255, 139, 147, 211, 46
};
const uint8_t rsc[RSNEAPOL::rsc_size] = {
'\xb1', '\x06'
177, 6
};
const uint8_t id[RSNEAPOL::id_size] = {
0
};
const uint8_t RSNEAPOLTest::expected_packet[] = {
'\x01', '\x03', '\x00', '\x97', '\x02', '\x13', '\xca', '\x00',
'\x10', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00',
'\x02', '\xb9', 'o', '\xe7', '\xfa', '\xca', '[', '\'', '\xe2', 'M',
'\x04', '\xf1', '\xe6', 'l', '\x06', '\xe1', '\x9b', '\xb3', ':',
'k', '$', '\xb4', '9', '\xbb', '\xe4', '\xde', '\xd9', '\n', '\xcc',
'\xd1', '3', '\x1e', '\x9e', '\x00', '\x00', '\x00', '\x00', '\x00',
'\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00',
'\x00', '\x00', '\xb1', '\x06', '\x00', '\x00', '\x00', '\x00', '\x00',
'\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00',
'\xb1', '\xba', '\xac', 'U', '\x96', 'J', '\xbd', '0', 'V', '\x85',
'e', '*', '\xb2', '&', 'u', '\x82', '\x00', '8', '\xe2', '\xc5', 'O',
'G', '\xf3', '\x0e', '\xc9', '/', 'B', '\xd8', '\xd5', '\x1e', '1',
'\x9d', '\xf5', 'H', '`', 'm', 'N', '\xe3', '\xd9', '\x84', '\xd3',
'C', 'Z', '\x15', '\xfc', 'X', '\x0f', '>', 't', '`', '@', '\x91',
'\x10', '`', '\xef', '\xb1', 'C', '\xf8', '\xfd', '\xb6', '\n', '6',
'\xcb', '\xa4', 'D', '\x98', '&', '\x07', '\x1a', '\xff', '\x8b',
'\x93', '\xd3', '.'
1, 3, 0, 151, 2, 19, 202, 0, 16, 0, 0, 0, 0, 0, 0, 0, 2, 185, 111,
231, 250, 202, 91, 39, 226, 77, 4, 241, 230, 108, 6, 225, 155, 179,
58, 107, 36, 180, 57, 187, 228, 222, 217, 10, 204, 209, 51, 30, 158,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 6, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 186, 172, 85, 150, 74, 189, 48,
86, 133, 101, 42, 178, 38, 117, 130, 0, 56, 226, 197, 79, 71, 243,
14, 201, 47, 66, 216, 213, 30, 49, 157, 245, 72, 96, 109, 78, 227,
217, 132, 211, 67, 90, 21, 252, 88, 15, 62, 116, 96, 64, 145, 16, 96,
239, 177, 67, 248, 253, 182, 10, 54, 203, 164, 68, 152, 38, 7, 26,
255, 139, 147, 211, 46
};
void RSNEAPOLTest::test_equals(const RSNEAPOL &eapol1, const RSNEAPOL &eapol2) {