mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 17:25:37 +01:00
Changed test function to inline to pass tests/scripts/check-names.sh
This commit is contained in:
parent
0cf14c10d4
commit
ae1cb12d82
@ -441,12 +441,6 @@ static const unsigned char test_message[] = {
|
||||
0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17,
|
||||
0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10
|
||||
};
|
||||
/* Function Prototype */
|
||||
int test_cmac_with_cipher( int verbose, const char* testname, const unsigned char* key,
|
||||
int keybits, const unsigned char* messages,
|
||||
const unsigned int message_lengths[4], const unsigned char* subkeys,
|
||||
const unsigned char* expected_result, mbedtls_cipher_id_t cipher_id,
|
||||
int block_size );
|
||||
|
||||
|
||||
#endif /* defined(MBEDTLS_AES_C) || defined(MBEDTLS_DES_C) */
|
||||
@ -673,7 +667,7 @@ static const unsigned char PRFT[NB_PRF_TESTS][16] = {
|
||||
};
|
||||
#endif /* MBEDTLS_AES_C */
|
||||
|
||||
int test_cmac_with_cipher( int verbose,
|
||||
static inline int cmac_test_wth_cipher( int verbose,
|
||||
const char* testname,
|
||||
const unsigned char* key,
|
||||
int keybits,
|
||||
@ -746,10 +740,7 @@ int test_cmac_with_cipher( int verbose,
|
||||
}
|
||||
|
||||
#ifdef MBEDTLS_AES_C
|
||||
/* Function Prototype */
|
||||
int test_aes128_cmac_prf( int verbose );
|
||||
|
||||
int test_aes128_cmac_prf( int verbose )
|
||||
static inline int test_aes128_cmac_prf( int verbose )
|
||||
{
|
||||
int i;
|
||||
int ret;
|
||||
@ -779,7 +770,7 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
int ret;
|
||||
|
||||
#ifdef MBEDTLS_AES_C
|
||||
if( ( ret = test_cmac_with_cipher( verbose,
|
||||
if( ( ret = cmac_test_wth_cipher( verbose,
|
||||
"AES 128",
|
||||
aes_128_key,
|
||||
128,
|
||||
@ -793,7 +784,7 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
return( ret );
|
||||
}
|
||||
|
||||
if( ( ret = test_cmac_with_cipher( verbose,
|
||||
if( ( ret = cmac_test_wth_cipher( verbose,
|
||||
"AES 192",
|
||||
aes_192_key,
|
||||
192,
|
||||
@ -807,7 +798,7 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
return( ret );
|
||||
}
|
||||
|
||||
if( ( ret = test_cmac_with_cipher ( verbose,
|
||||
if( ( ret = cmac_test_wth_cipher ( verbose,
|
||||
"AES 256",
|
||||
aes_256_key,
|
||||
256,
|
||||
@ -823,7 +814,7 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
#endif /* MBEDTLS_AES_C */
|
||||
|
||||
#ifdef MBEDTLS_DES_C
|
||||
if( ( ret = test_cmac_with_cipher( verbose,
|
||||
if( ( ret = cmac_test_wth_cipher( verbose,
|
||||
"3DES 2 key",
|
||||
des3_2key_key,
|
||||
192,
|
||||
@ -837,7 +828,7 @@ int mbedtls_cmac_self_test( int verbose )
|
||||
return( ret );
|
||||
}
|
||||
|
||||
if( ( ret = test_cmac_with_cipher( verbose,
|
||||
if( ( ret = cmac_test_wth_cipher( verbose,
|
||||
"3DES 3 key",
|
||||
des3_3key_key,
|
||||
192,
|
||||
|
Loading…
Reference in New Issue
Block a user