You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.3 KiB

  1. From 3684ac3720f91dc131c1c61689395a69ae1865f9 Mon Sep 17 00:00:00 2001
  2. From: Hauke Mehrtens <hauke@hauke-m.de>
  3. Date: Sun, 8 Jan 2017 20:31:18 +0100
  4. Subject: [PATCH 7/7] ssl: call mbedtls_ssl_conf_renegotiation() only if
  5. available
  6. The function mbedtls_ssl_conf_renegotiation() is only available if
  7. MBEDTLS_SSL_RENEGOTIATION is set in the mbedtls configuration. Check this
  8. before calling this function.
  9. This fixes a compile problem when MBEDTLS_SSL_RENEGOTIATION is not set.
  10. Change-Id: I69f15359d2dcaed1e4fe56fc7799737e38d6c2e7
  11. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  12. ---
  13. resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c | 2 ++
  14. 1 file changed, 2 insertions(+)
  15. --- a/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
  16. +++ b/resource/csdk/connectivity/src/adapter_util/ca_adapter_net_ssl.c
  17. @@ -1273,7 +1273,9 @@ static int InitConfig(mbedtls_ssl_config
  18. mbedtls_ssl_conf_rng(conf, mbedtls_ctr_drbg_random, &g_caSslContext->rnd);
  19. mbedtls_ssl_conf_curves(conf, curve[ADAPTER_CURVE_SECP256R1]);
  20. mbedtls_ssl_conf_min_version(conf, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3);
  21. +#ifdef MBEDTLS_SSL_RENEGOTIATION
  22. mbedtls_ssl_conf_renegotiation(conf, MBEDTLS_SSL_RENEGOTIATION_DISABLED);
  23. +#endif
  24. mbedtls_ssl_conf_authmode(conf, MBEDTLS_SSL_VERIFY_REQUIRED);
  25. #if !defined(NDEBUG) || defined(TB_LOG)