mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-10-01 22:37:23 +00:00
Add further rng removals highlighted by the ci
Signed-off-by: Ben Taylor <[email protected]>
This commit is contained in:
@@ -818,7 +818,6 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
psa_status_t status;
|
psa_status_t status;
|
||||||
|
|
||||||
rng_context_t rng;
|
|
||||||
mbedtls_ssl_context ssl;
|
mbedtls_ssl_context ssl;
|
||||||
mbedtls_ssl_config conf;
|
mbedtls_ssl_config conf;
|
||||||
mbedtls_ssl_session saved_session;
|
mbedtls_ssl_session saved_session;
|
||||||
@@ -1652,7 +1651,7 @@ usage:
|
|||||||
mbedtls_printf("\n . Seeding the random number generator...");
|
mbedtls_printf("\n . Seeding the random number generator...");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
ret = rng_seed(&rng, opt.reproducible, pers);
|
ret = rng_seed(opt.reproducible, pers);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -600,9 +600,6 @@ int main(void)
|
|||||||
(out_be)[(i) + 7] = (unsigned char) (((in_le) >> 0) & 0xFF); \
|
(out_be)[(i) + 7] = (unsigned char) (((in_le) >> 0) & 0xFF); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is global so it can be easily accessed by callback functions */
|
|
||||||
rng_context_t rng;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* global options
|
* global options
|
||||||
*/
|
*/
|
||||||
@@ -2538,7 +2535,7 @@ usage:
|
|||||||
mbedtls_printf("\n . Seeding the random number generator...");
|
mbedtls_printf("\n . Seeding the random number generator...");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
ret = rng_seed(&rng, opt.reproducible, pers);
|
ret = rng_seed(opt.reproducible, pers);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,10 +46,9 @@ mbedtls_time_t dummy_constant_time(mbedtls_time_t *time)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int rng_seed(rng_context_t *rng, int reproducible, const char *pers)
|
int rng_seed(int reproducible, const char *pers)
|
||||||
{
|
{
|
||||||
/* The PSA crypto RNG does its own seeding. */
|
/* The PSA crypto RNG does its own seeding. */
|
||||||
(void) rng;
|
|
||||||
(void) pers;
|
(void) pers;
|
||||||
if (reproducible) {
|
if (reproducible) {
|
||||||
mbedtls_fprintf(stderr,
|
mbedtls_fprintf(stderr,
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ mbedtls_time_t dummy_constant_time(mbedtls_time_t *time);
|
|||||||
*
|
*
|
||||||
* return 0 on success, a negative value on error.
|
* return 0 on success, a negative value on error.
|
||||||
*/
|
*/
|
||||||
int rng_seed(rng_context_t *rng, int reproducible, const char *pers);
|
int rng_seed(int reproducible, const char *pers);
|
||||||
|
|
||||||
/** Parse command-line option: key_opaque_algs
|
/** Parse command-line option: key_opaque_algs
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user