Commit 73ed39d4 authored by Manuel Pégourié-Gonnard's avatar Manuel Pégourié-Gonnard
Browse files

Remove slow PKCS5 test

parent f427f885
...@@ -301,36 +301,34 @@ int pkcs5_self_test( int verbose ) ...@@ -301,36 +301,34 @@ int pkcs5_self_test( int verbose )
#define MAX_TESTS 6 #define MAX_TESTS 6
static size_t plen[MAX_TESTS] = static size_t plen[MAX_TESTS] =
{ 8, 8, 8, 8, 24, 9 }; { 8, 8, 8, 24, 9 };
static unsigned char password[MAX_TESTS][32] = static unsigned char password[MAX_TESTS][32] =
{ {
"password", "password",
"password", "password",
"password", "password",
"password",
"passwordPASSWORDpassword", "passwordPASSWORDpassword",
"pass\0word", "pass\0word",
}; };
static size_t slen[MAX_TESTS] = static size_t slen[MAX_TESTS] =
{ 4, 4, 4, 4, 36, 5 }; { 4, 4, 4, 36, 5 };
static unsigned char salt[MAX_TESTS][40] = static unsigned char salt[MAX_TESTS][40] =
{ {
"salt", "salt",
"salt", "salt",
"salt", "salt",
"salt",
"saltSALTsaltSALTsaltSALTsaltSALTsalt", "saltSALTsaltSALTsaltSALTsaltSALTsalt",
"sa\0lt", "sa\0lt",
}; };
static uint32_t it_cnt[MAX_TESTS] = static uint32_t it_cnt[MAX_TESTS] =
{ 1, 2, 4096, 16777216, 4096, 4096 }; { 1, 2, 4096, 4096, 4096 };
static uint32_t key_len[MAX_TESTS] = static uint32_t key_len[MAX_TESTS] =
{ 20, 20, 20, 20, 25, 16 }; { 20, 20, 20, 25, 16 };
static unsigned char result_key[MAX_TESTS][32] = static unsigned char result_key[MAX_TESTS][32] =
{ {
...@@ -343,9 +341,6 @@ static unsigned char result_key[MAX_TESTS][32] = ...@@ -343,9 +341,6 @@ static unsigned char result_key[MAX_TESTS][32] =
{ 0x4b, 0x00, 0x79, 0x01, 0xb7, 0x65, 0x48, 0x9a, { 0x4b, 0x00, 0x79, 0x01, 0xb7, 0x65, 0x48, 0x9a,
0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0, 0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0,
0x65, 0xa4, 0x29, 0xc1 }, 0x65, 0xa4, 0x29, 0xc1 },
{ 0xee, 0xfe, 0x3d, 0x61, 0xcd, 0x4d, 0xa4, 0xe4,
0xe9, 0x94, 0x5b, 0x3d, 0x6b, 0xa2, 0x15, 0x8c,
0x26, 0x34, 0xe9, 0x84 },
{ 0x3d, 0x2e, 0xec, 0x4f, 0xe4, 0x1c, 0x84, 0x9b, { 0x3d, 0x2e, 0xec, 0x4f, 0xe4, 0x1c, 0x84, 0x9b,
0x80, 0xc8, 0xd8, 0x36, 0x62, 0xc0, 0xe4, 0x4a, 0x80, 0xc8, 0xd8, 0x36, 0x62, 0xc0, 0xe4, 0x4a,
0x8b, 0x29, 0x1a, 0x96, 0x4c, 0xf2, 0xf0, 0x70, 0x8b, 0x29, 0x1a, 0x96, 0x4c, 0xf2, 0xf0, 0x70,
...@@ -376,9 +371,6 @@ int pkcs5_self_test( int verbose ) ...@@ -376,9 +371,6 @@ int pkcs5_self_test( int verbose )
goto exit; goto exit;
} }
if( verbose != 0 )
polarssl_printf( " PBKDF2 note: test #3 may be slow!\n" );
for( i = 0; i < MAX_TESTS; i++ ) for( i = 0; i < MAX_TESTS; i++ )
{ {
if( verbose != 0 ) if( verbose != 0 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment