1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-06-24 14:20:59 +08:00

Remove srand from fuzz

Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
This commit is contained in:
Ben Taylor 2025-03-19 13:51:42 +00:00
parent 03c05c336e
commit b9f83b3d07
4 changed files with 0 additions and 8 deletions

View File

@ -141,8 +141,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
//There may be other options to add : //There may be other options to add :
// mbedtls_ssl_conf_cert_profile, mbedtls_ssl_conf_sig_hashes // mbedtls_ssl_conf_cert_profile, mbedtls_ssl_conf_sig_hashes
srand(1);
if (mbedtls_ssl_setup(&ssl, &conf) != 0) { if (mbedtls_ssl_setup(&ssl, &conf) != 0) {
goto exit; goto exit;
} }

View File

@ -68,7 +68,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
} }
#endif /* MBEDTLS_USE_PSA_CRYPTO */ #endif /* MBEDTLS_USE_PSA_CRYPTO */
srand(1);
if (mbedtls_ctr_drbg_seed(&ctr_drbg, dummy_entropy, &entropy, if (mbedtls_ctr_drbg_seed(&ctr_drbg, dummy_entropy, &entropy,
(const unsigned char *) pers, strlen(pers)) != 0) { (const unsigned char *) pers, strlen(pers)) != 0) {
goto exit; goto exit;

View File

@ -98,9 +98,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
goto exit; goto exit;
} }
srand(1);
#if defined(MBEDTLS_X509_CRT_PARSE_C) && defined(MBEDTLS_PEM_PARSE_C) #if defined(MBEDTLS_X509_CRT_PARSE_C) && defined(MBEDTLS_PEM_PARSE_C)
mbedtls_ssl_conf_ca_chain(&conf, srvcert.next, NULL); mbedtls_ssl_conf_ca_chain(&conf, srvcert.next, NULL);
if (mbedtls_ssl_conf_own_cert(&conf, &srvcert, &pkey) != 0) { if (mbedtls_ssl_conf_own_cert(&conf, &srvcert, &pkey) != 0) {

View File

@ -112,8 +112,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
goto exit; goto exit;
} }
srand(1);
#if defined(MBEDTLS_X509_CRT_PARSE_C) && defined(MBEDTLS_PEM_PARSE_C) #if defined(MBEDTLS_X509_CRT_PARSE_C) && defined(MBEDTLS_PEM_PARSE_C)
mbedtls_ssl_conf_ca_chain(&conf, srvcert.next, NULL); mbedtls_ssl_conf_ca_chain(&conf, srvcert.next, NULL);
if (mbedtls_ssl_conf_own_cert(&conf, &srvcert, &pkey) != 0) { if (mbedtls_ssl_conf_own_cert(&conf, &srvcert, &pkey) != 0) {