aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2017-02-26 18:49:39 -0500
committerJay Satiro <raysatiro@yahoo.com>2017-02-26 18:49:39 -0500
commita21cae5f97727ab357c8527b0a7dc8820e335012 (patch)
tree976b6ede7537cb4fa0b2dcf1f6f2622c142ddc0d
parent4fa2de3698c7fdf2985a6d0ba742fb4ea214b8d5 (diff)
cyassl: get library version string at runtime
wolfSSL >= 3.6.0 supports getting its library version string at runtime.
-rw-r--r--lib/vtls/cyassl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c
index 5e5947ce0..1e3b346d6 100644
--- a/lib/vtls/cyassl.c
+++ b/lib/vtls/cyassl.c
@@ -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);