Skip to content

Commit 2cc7442

Browse files
Teppo JärvelinArto Kinnunen
authored andcommitted
Added new global rng, needed for MbedTLS optimisations
1 parent f861157 commit 2cc7442

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/coap_security_handler.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,9 @@ int coap_security_handler_connect_non_blocking(coap_security_t *sec, bool is_ser
396396
mbedtls_ssl_conf_handshake_timeout(&sec->_conf, timeout_min, timeout_max);
397397
}
398398

399+
#if !defined(MBEDTLS_SSL_CONF_RNG)
399400
mbedtls_ssl_conf_rng(&sec->_conf, mbedtls_ctr_drbg_random, &sec->_ctr_drbg);
401+
#endif
400402

401403
if ((mbedtls_ssl_setup(&sec->_ssl, &sec->_conf)) != 0) {
402404
return -1;

0 commit comments

Comments
 (0)