unit: Add another PTK Derivation test case

This commit is contained in:
Denis Kenzior 2014-12-27 17:48:10 -06:00
parent 7e6b4f8bb0
commit ebabfff09a
1 changed files with 60 additions and 0 deletions

View File

@ -188,6 +188,64 @@ static const struct ptk_data ptk_test_2 = {
.tk = tk_data_2,
};
static unsigned char pmk_data_3[32] = {
0x9e, 0x99, 0x88, 0xbd, 0xe2, 0xcb, 0xa7, 0x43,
0x95, 0xc0, 0x28, 0x9f, 0xfd, 0xa0, 0x7b, 0xc4,
0x1f, 0xfa, 0x88, 0x9a, 0x33, 0x09, 0x23, 0x7a,
0x22, 0x40, 0xc9, 0x34, 0xbc, 0xdc, 0x7d, 0xdb,
};
static unsigned char aa_data_3[6] = {
0x00, 0x0c, 0x41, 0xd2, 0x94, 0xfb,
};
static unsigned char spa_data_3[6] = {
0x00, 0x0d, 0x3a, 0x26, 0x10, 0xfb,
};
static unsigned char snonce_data_3[32] = {
0x89, 0x3e, 0xe5, 0x51, 0x21, 0x45, 0x57, 0xff,
0xf3, 0xc0, 0x76, 0xac, 0x97, 0x79, 0x15, 0xa2,
0x06, 0x07, 0x27, 0x03, 0x8e, 0x9b, 0xea, 0x9b,
0x66, 0x19, 0xa5, 0xba, 0xb4, 0x0f, 0x89, 0xc1,
};
static unsigned char anonce_data_3[32] = {
0xda, 0xbd, 0xc1, 0x04, 0xd4, 0x57, 0x41, 0x1a,
0xee, 0x33, 0x8c, 0x00, 0xfa, 0x8a, 0x1f, 0x32,
0xab, 0xfc, 0x6c, 0xfb, 0x79, 0x43, 0x60, 0xad,
0xce, 0x3a, 0xfb, 0x5d, 0x15, 0x9a, 0x51, 0xf6,
};
static unsigned char kck_data_3[] = {
0xcc, 0xbf, 0x97, 0xa8, 0x2b, 0x5c, 0x51, 0xa4,
0x43, 0x25, 0xa7, 0x7e, 0x9b, 0xc5, 0x70, 0x50,
};
static unsigned char kek_data_3[] = {
0xda, 0xec, 0x54, 0x38, 0x43, 0x0f, 0x00, 0xeb,
0x89, 0x3d, 0x84, 0xd8, 0xb4, 0xb4, 0xb5, 0xe8,
};
static unsigned char tk_data_3[] = {
0x19, 0xf4, 0xdc, 0xe0, 0xcc, 0x5f, 0x21, 0x66,
0xe9, 0x4f, 0xdb, 0x3e, 0xaf, 0x68, 0xeb, 0x76,
0x80, 0xf4, 0xe2, 0x64, 0x6e, 0x6d, 0x9e, 0x36,
0x26, 0x0d, 0x89, 0xff, 0xbf, 0x24, 0xee, 0x7e,
};
static const struct ptk_data ptk_test_3 = {
.pmk = pmk_data_3,
.aa = aa_data_3,
.spa = spa_data_3,
.snonce = snonce_data_3,
.anonce = anonce_data_3,
.cipher = CRYPTO_CIPHER_TKIP,
.kck = kck_data_3,
.kek = kek_data_3,
.tk = tk_data_3,
};
static void ptk_test(const void *data)
{
const struct ptk_data *test = data;
@ -232,6 +290,8 @@ int main(int argc, char *argv[])
ptk_test, &ptk_test_1);
l_test_add("/PTK Derivation/PTK Test Case 2",
ptk_test, &ptk_test_2);
l_test_add("/PTK Derivation/PTK Test Case 3",
ptk_test, &ptk_test_3);
return l_test_run();
}