The function mbedtls_version_get_string() is only available if
MBEDTLS_VERSION_C is set in the mbedtls configuration. Check this
before calling this function and print the mbedtls version this was
compiled against instead if mbedtls_version_get_string() is not
available.
This fixes a compile problem when MBEDTLS_VERSION_C is not set.
Change-Id: I54c2c2a3fc1f9d35afa475500e3db68420a1b54a
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16231
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
/* Initialize TLS library
*/
#if !defined(NDEBUG) || defined(TB_LOG)
+#ifdef MBEDTLS_VERSION_C
char version[MBED_TLS_VERSION_LEN];
mbedtls_version_get_string(version);
OIC_LOG_V(INFO, NET_SSL_TAG, "mbed TLS version: %s", version);
+#else
+ OIC_LOG_V(INFO, NET_SSL_TAG, "mbed TLS version: %s", MBEDTLS_VERSION_STRING);
+#endif
#endif
/* Entropy settings