cyassl: get library version string at runtime

wolfSSL >= 3.6.0 supports getting its library version string at runtime.
This commit is contained in:
Jay Satiro 2017-02-26 18:49:39 -05:00
parent 4fa2de3698
commit a21cae5f97

View File

@ -736,7 +736,9 @@ void Curl_cyassl_session_free(void *ptr)
size_t Curl_cyassl_version(char *buffer, size_t size)
{
#ifdef WOLFSSL_VERSION
#if LIBCYASSL_VERSION_HEX >= 0x03006000
return snprintf(buffer, size, "wolfSSL/%s", wolfSSL_lib_version());
#elif defined(WOLFSSL_VERSION)
return snprintf(buffer, size, "wolfSSL/%s", WOLFSSL_VERSION);
#elif defined(CYASSL_VERSION)
return snprintf(buffer, size, "CyaSSL/%s", CYASSL_VERSION);