Merge branch 'mbedtls-1.3' into development

* mbedtls-1.3:
  Use link-time garbage collection in memory.sh
  scripts/memory.sh only work on Linux
  Add missing 'const' on selftest data
  Use only headers for doxygen (no doc in C files)
  Add missing extern "C" guard in aesni.h
  Fix compile error with renego disabled
  Remove slow PKCS5 test
  Stop checking key-cert match systematically
  Make tests/*.sh runnable from anywhere
  Update visual C files
This commit is contained in:
Manuel Pégourié-Gonnard 2015-03-11 10:30:21 +00:00
commit 57a26da593
13 changed files with 70 additions and 64 deletions

View file

@ -300,39 +300,37 @@ int pkcs5_self_test( int verbose )
#define MAX_TESTS 6
static size_t plen[MAX_TESTS] =
{ 8, 8, 8, 8, 24, 9 };
static const size_t plen[MAX_TESTS] =
{ 8, 8, 8, 24, 9 };
static unsigned char password[MAX_TESTS][32] =
static const unsigned char password[MAX_TESTS][32] =
{
"password",
"password",
"password",
"password",
"passwordPASSWORDpassword",
"pass\0word",
};
static size_t slen[MAX_TESTS] =
{ 4, 4, 4, 4, 36, 5 };
static const size_t slen[MAX_TESTS] =
{ 4, 4, 4, 36, 5 };
static unsigned char salt[MAX_TESTS][40] =
static const unsigned char salt[MAX_TESTS][40] =
{
"salt",
"salt",
"salt",
"salt",
"saltSALTsaltSALTsaltSALTsaltSALTsalt",
"sa\0lt",
};
static uint32_t it_cnt[MAX_TESTS] =
{ 1, 2, 4096, 16777216, 4096, 4096 };
static const uint32_t it_cnt[MAX_TESTS] =
{ 1, 2, 4096, 4096, 4096 };
static uint32_t key_len[MAX_TESTS] =
{ 20, 20, 20, 20, 25, 16 };
static const uint32_t key_len[MAX_TESTS] =
{ 20, 20, 20, 25, 16 };
static unsigned char result_key[MAX_TESTS][32] =
static const unsigned char result_key[MAX_TESTS][32] =
{
{ 0x0c, 0x60, 0xc8, 0x0f, 0x96, 0x1f, 0x0e, 0x71,
0xf3, 0xa9, 0xb5, 0x24, 0xaf, 0x60, 0x12, 0x06,
@ -343,9 +341,6 @@ static unsigned char result_key[MAX_TESTS][32] =
{ 0x4b, 0x00, 0x79, 0x01, 0xb7, 0x65, 0x48, 0x9a,
0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0,
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,
0x80, 0xc8, 0xd8, 0x36, 0x62, 0xc0, 0xe4, 0x4a,
0x8b, 0x29, 0x1a, 0x96, 0x4c, 0xf2, 0xf0, 0x70,
@ -376,9 +371,6 @@ int pkcs5_self_test( int verbose )
goto exit;
}
if( verbose != 0 )
polarssl_printf( " PBKDF2 note: test #3 may be slow!\n" );
for( i = 0; i < MAX_TESTS; i++ )
{
if( verbose != 0 )