Code review
Typo rproduce -> reproducible Call mbedtls_entropy_func
This commit is contained in:
parent
986b6f20a9
commit
3ca5085f10
2 changed files with 6 additions and 6 deletions
|
@ -567,13 +567,13 @@ int dummy_entropy( void *data, unsigned char *output, size_t len )
|
||||||
size_t i;
|
size_t i;
|
||||||
(void) data;
|
(void) data;
|
||||||
|
|
||||||
//ret = mbedtls_entropy_func( data, output, len );
|
ret = mbedtls_entropy_func( data, output, len );
|
||||||
for ( i = 0; i < len; i++ )
|
for ( i = 0; i < len; i++ )
|
||||||
{
|
{
|
||||||
//replace result with pseudo random
|
//replace result with pseudo random
|
||||||
output[i] = (unsigned char) rand();
|
output[i] = (unsigned char) rand();
|
||||||
}
|
}
|
||||||
return( 0 );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK)
|
#if defined(MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK)
|
||||||
|
@ -2013,7 +2013,7 @@ int main( int argc, char *argv[] )
|
||||||
#if defined(MBEDTLS_PLATFORM_TIME_ALT)
|
#if defined(MBEDTLS_PLATFORM_TIME_ALT)
|
||||||
mbedtls_platform_set_time( dummy_constant_time );
|
mbedtls_platform_set_time( dummy_constant_time );
|
||||||
#else
|
#else
|
||||||
fprintf( stderr, "Warning: reproduce without constant time\n" );
|
fprintf( stderr, "Warning: reproducible without constant time\n" );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -679,12 +679,12 @@ int dummy_entropy( void *data, unsigned char *output, size_t len )
|
||||||
size_t i;
|
size_t i;
|
||||||
(void) data;
|
(void) data;
|
||||||
|
|
||||||
//ret = mbedtls_entropy_func( data, output, len );
|
ret = mbedtls_entropy_func( data, output, len );
|
||||||
for (i = 0; i < len; i++ ) {
|
for (i = 0; i < len; i++ ) {
|
||||||
//replace result with pseudo random
|
//replace result with pseudo random
|
||||||
output[i] = (unsigned char) rand();
|
output[i] = (unsigned char) rand();
|
||||||
}
|
}
|
||||||
return( 0 );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK)
|
#if defined(MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK)
|
||||||
|
@ -2832,7 +2832,7 @@ int main( int argc, char *argv[] )
|
||||||
#if defined(MBEDTLS_PLATFORM_TIME_ALT)
|
#if defined(MBEDTLS_PLATFORM_TIME_ALT)
|
||||||
mbedtls_platform_set_time( dummy_constant_time );
|
mbedtls_platform_set_time( dummy_constant_time );
|
||||||
#else
|
#else
|
||||||
fprintf( stderr, "Warning: reproduce without constant time\n" );
|
fprintf( stderr, "Warning: reproducible without constant time\n" );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue