mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-09 03:04:24 +02:00
Allow compile-time configuration of PRNG in SSL module
Introduces MBEDTLS_SSL_CONF_RNG to allow configuring the RNG to be used by the SSL module at compile-time. Impact on code-size: | | GCC 8.2.1 | ARMC5 5.06 | ARMC6 6.12 | | --- | --- | --- | --- | | `libmbedtls.a` before | 23535 | 24089 | 27103 | | `libmbedtls.a` after | 23471 | 24077 | 27045 | | gain in Bytes | 64 | 12 | 58 |
This commit is contained in:
@@ -1764,7 +1764,12 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(MBEDTLS_SSL_CONF_RNG)
|
||||
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
|
||||
#else
|
||||
mbedtls_ssl_conf_rng_ctx( &conf, &ctr_drbg );
|
||||
#endif
|
||||
|
||||
mbedtls_ssl_conf_dbg( &conf, my_debug, stdout );
|
||||
|
||||
#if !defined(MBEDTLS_SSL_CONF_READ_TIMEOUT)
|
||||
|
||||
Reference in New Issue
Block a user