mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
unit: Add another PTK derivation test
This commit is contained in:
parent
ebabfff09a
commit
9ebafd2599
@ -246,6 +246,65 @@ static const struct ptk_data ptk_test_3 = {
|
||||
.tk = tk_data_3,
|
||||
};
|
||||
|
||||
|
||||
static unsigned char pmk_data_4[32] = {
|
||||
0x6f, 0xe8, 0x57, 0xc0, 0xb7, 0x42, 0xdf, 0xc2,
|
||||
0xda, 0x8a, 0x1f, 0xe8, 0xb1, 0xb4, 0xb4, 0x62,
|
||||
0x8d, 0x9f, 0xbb, 0xb0, 0x60, 0x82, 0x6b, 0x83,
|
||||
0xcb, 0x43, 0xb6, 0x4b, 0x13, 0xe1, 0x03, 0xe8,
|
||||
};
|
||||
|
||||
static unsigned char aa_data_4[6] = {
|
||||
0x00, 0x14, 0x6c, 0x7e, 0x40, 0x80,
|
||||
};
|
||||
|
||||
static unsigned char spa_data_4[6] = {
|
||||
0x00, 0x13, 0x46, 0xfe, 0x32, 0x0c,
|
||||
};
|
||||
|
||||
static unsigned char snonce_data_4[32] = {
|
||||
0x59, 0x16, 0x8b, 0xc3, 0xa5, 0xdf, 0x18, 0xd7,
|
||||
0x1e, 0xfb, 0x64, 0x23, 0xf3, 0x40, 0x08, 0x8d,
|
||||
0xab, 0x9e, 0x1b, 0xa2, 0xbb, 0xc5, 0x86, 0x59,
|
||||
0xe0, 0x7b, 0x37, 0x64, 0xb0, 0xde, 0x85, 0x70,
|
||||
};
|
||||
|
||||
static unsigned char anonce_data_4[32] = {
|
||||
0x22, 0x58, 0x54, 0xb0, 0x44, 0x4d, 0xe3, 0xaf,
|
||||
0x06, 0xd1, 0x49, 0x2b, 0x85, 0x29, 0x84, 0xf0,
|
||||
0x4c, 0xf6, 0x27, 0x4c, 0x0e, 0x32, 0x18, 0xb8,
|
||||
0x68, 0x17, 0x56, 0x86, 0x4d, 0xb7, 0xa0, 0x55,
|
||||
};
|
||||
|
||||
static unsigned char kck_data_4[] = {
|
||||
0x9a, 0x75, 0xef, 0x0b, 0xde, 0x7c, 0x20, 0x9c,
|
||||
0xca, 0xe1, 0x3f, 0x54, 0xb1, 0xb3, 0x3e, 0xa3,
|
||||
};
|
||||
|
||||
static unsigned char kek_data_4[] = {
|
||||
0xfa, 0x01, 0x66, 0x16, 0x6e, 0x30, 0x81, 0x1f,
|
||||
0x1b, 0xaa, 0xff, 0x8d, 0x1c, 0x1a, 0xc1, 0x63,
|
||||
};
|
||||
|
||||
static unsigned char tk_data_4[] = {
|
||||
0x82, 0xa4, 0x9b, 0x50, 0xb8, 0x60, 0x88, 0xc5,
|
||||
0xcb, 0x79, 0x3b, 0x54, 0x26, 0x61, 0xa2, 0x8a,
|
||||
0x64, 0x69, 0x3c, 0x72, 0xb8, 0x66, 0x73, 0xe0,
|
||||
0xa8, 0x2d, 0x48, 0xc7, 0x47, 0x68, 0xcb, 0xf9,
|
||||
};
|
||||
|
||||
static const struct ptk_data ptk_test_4 = {
|
||||
.pmk = pmk_data_4,
|
||||
.aa = aa_data_4,
|
||||
.spa = spa_data_4,
|
||||
.snonce = snonce_data_4,
|
||||
.anonce = anonce_data_4,
|
||||
.cipher = CRYPTO_CIPHER_TKIP,
|
||||
.kck = kck_data_4,
|
||||
.kek = kek_data_4,
|
||||
.tk = tk_data_4,
|
||||
};
|
||||
|
||||
static void ptk_test(const void *data)
|
||||
{
|
||||
const struct ptk_data *test = data;
|
||||
@ -292,6 +351,8 @@ int main(int argc, char *argv[])
|
||||
ptk_test, &ptk_test_2);
|
||||
l_test_add("/PTK Derivation/PTK Test Case 3",
|
||||
ptk_test, &ptk_test_3);
|
||||
l_test_add("/PTK Derivation/PTK Test Case 4",
|
||||
ptk_test, &ptk_test_4);
|
||||
|
||||
return l_test_run();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user