Skip to content

Commit

Permalink
externals/mqtt: Fix TLS handshake failed
Browse files Browse the repository at this point in the history
Set RNG function in mbedtls_ssl_conf_rng() to avoid ssl handshake error.
  • Loading branch information
SPRESENSE committed Mar 9, 2022
1 parent 22c9844 commit dfedec2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void MQTTSslInit(MQTTSocket* n)
(const unsigned char *)pers, strlen(pers))) != 0) {
goto exit;
}
mbedtls_ssl_conf_rng(&g_ssl_conf, NULL, &g_ctr_drbg);
mbedtls_ssl_conf_rng(&g_ssl_conf, mbedtls_ctr_drbg_random, &g_ctr_drbg);

// General configuration
if ((r = mbedtls_ssl_config_defaults(&g_ssl_conf, MBEDTLS_SSL_IS_CLIENT,
Expand Down

0 comments on commit dfedec2

Please sign in to comment.