aboutsummaryrefslogtreecommitdiff
path: root/lib/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/version.c')
-rw-r--r--lib/version.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/version.c b/lib/version.c
index 79cc0bba4..f0861ea7a 100644
--- a/lib/version.c
+++ b/lib/version.c
@@ -26,6 +26,7 @@
#include "urldata.h"
#include "vtls/vtls.h"
#include "http2.h"
+#include "ssh.h"
#include "curl_printf.h"
#ifdef USE_ARES
@@ -176,6 +177,11 @@ char *curl_version(void)
left -= len;
ptr += len;
#endif
+#ifdef USE_LIBSSH
+ len = snprintf(ptr, left, " libssh/%s", CURL_LIBSSH_VERSION);
+ left -= len;
+ ptr += len;
+#endif
#ifdef USE_NGHTTP2
len = Curl_http2_ver(ptr, left);
left -= len;
@@ -264,7 +270,7 @@ static const char * const protocols[] = {
#ifndef CURL_DISABLE_RTSP
"rtsp",
#endif
-#ifdef USE_LIBSSH2
+#if defined(USE_LIBSSH) || defined(USE_LIBSSH2)
"scp",
#endif
#ifdef USE_LIBSSH2
@@ -379,7 +385,7 @@ static curl_version_info_data version_info = {
curl_version_info_data *curl_version_info(CURLversion stamp)
{
static bool initialized;
-#ifdef USE_LIBSSH2
+#if defined(USE_LIBSSH) || defined(USE_LIBSSH2)
static char ssh_buffer[80];
#endif
#ifdef USE_SSL
@@ -431,9 +437,12 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
#endif /* _LIBICONV_VERSION */
#endif
-#ifdef USE_LIBSSH2
+#if defined(USE_LIBSSH2)
snprintf(ssh_buffer, sizeof(ssh_buffer), "libssh2/%s", LIBSSH2_VERSION);
version_info.libssh_version = ssh_buffer;
+#elif defined(USE_LIBSSH)
+ snprintf(ssh_buffer, sizeof(ssh_buffer), "libssh/%s", CURL_LIBSSH_VERSION);
+ version_info.libssh_version = ssh_buffer;
#endif
#ifdef HAVE_BROTLI