mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 08:16:33 +01:00
Add missing 'const' on selftest data
This commit is contained in:
parent
27d813993f
commit
28122e4329
8 changed files with 40 additions and 42 deletions
|
|
@ -396,7 +396,7 @@ int hmac_drbg_self_test( int verbose )
|
|||
#define OUTPUT_LEN 80
|
||||
|
||||
/* From a NIST PR=true test vector */
|
||||
static unsigned char entropy_pr[] = {
|
||||
static const unsigned char entropy_pr[] = {
|
||||
0xa0, 0xc9, 0xab, 0x58, 0xf1, 0xe2, 0xe5, 0xa4, 0xde, 0x3e, 0xbd, 0x4f,
|
||||
0xf7, 0x3e, 0x9c, 0x5b, 0x64, 0xef, 0xd8, 0xca, 0x02, 0x8c, 0xf8, 0x11,
|
||||
0x48, 0xa5, 0x84, 0xfe, 0x69, 0xab, 0x5a, 0xee, 0x42, 0xaa, 0x4d, 0x42,
|
||||
|
|
@ -412,7 +412,7 @@ static const unsigned char result_pr[OUTPUT_LEN] = {
|
|||
0xe1, 0x5c, 0x02, 0x9b, 0x44, 0xaf, 0x03, 0x44 };
|
||||
|
||||
/* From a NIST PR=false test vector */
|
||||
static unsigned char entropy_nopr[] = {
|
||||
static const unsigned char entropy_nopr[] = {
|
||||
0x79, 0x34, 0x9b, 0xbf, 0x7c, 0xdd, 0xa5, 0x79, 0x95, 0x57, 0x86, 0x66,
|
||||
0x21, 0xc9, 0x13, 0x83, 0x11, 0x46, 0x73, 0x3a, 0xbf, 0x8c, 0x35, 0xc8,
|
||||
0xc7, 0x21, 0x5b, 0x5b, 0x96, 0xc4, 0x8e, 0x9b, 0x33, 0x8c, 0x74, 0xe3,
|
||||
|
|
@ -461,7 +461,7 @@ int hmac_drbg_self_test( int verbose )
|
|||
|
||||
test_offset = 0;
|
||||
CHK( hmac_drbg_init( &ctx, md_info,
|
||||
hmac_drbg_self_test_entropy, entropy_pr,
|
||||
hmac_drbg_self_test_entropy, (void *) entropy_pr,
|
||||
NULL, 0 ) );
|
||||
hmac_drbg_set_prediction_resistance( &ctx, POLARSSL_HMAC_DRBG_PR_ON );
|
||||
CHK( hmac_drbg_random( &ctx, buf, OUTPUT_LEN ) );
|
||||
|
|
@ -480,7 +480,7 @@ int hmac_drbg_self_test( int verbose )
|
|||
|
||||
test_offset = 0;
|
||||
CHK( hmac_drbg_init( &ctx, md_info,
|
||||
hmac_drbg_self_test_entropy, entropy_nopr,
|
||||
hmac_drbg_self_test_entropy, (void *) entropy_nopr,
|
||||
NULL, 0 ) );
|
||||
CHK( hmac_drbg_reseed( &ctx, NULL, 0 ) );
|
||||
CHK( hmac_drbg_random( &ctx, buf, OUTPUT_LEN ) );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue