aboutsummaryrefslogtreecommitdiff
path: root/lib/vssh
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-08-16 15:32:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-08-17 16:57:58 +0200
commitea28a6cb2f168ce0b4e01c0f05e3675687dbd497 (patch)
tree064695cfa7d49323e3a73d53f127f37c11f0b7dd /lib/vssh
parent1a7634e484f1f1b46cada618ac3df04a9273571f (diff)
ssh: add a generic Curl_ssh_version function for SSH backends
Closes #4235
Diffstat (limited to 'lib/vssh')
-rw-r--r--lib/vssh/libssh.c5
-rw-r--r--lib/vssh/libssh2.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c
index d8186e0b2..76956a3c1 100644
--- a/lib/vssh/libssh.c
+++ b/lib/vssh/libssh.c
@@ -2739,4 +2739,9 @@ void Curl_ssh_cleanup(void)
(void)ssh_finalize();
}
+size_t Curl_ssh_version(char *buffer, size_t buflen)
+{
+ return msnprintf(buffer, buflen, "libssh/%s", CURL_LIBSSH_VERSION);
+}
+
#endif /* USE_LIBSSH */
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
index 011f1ecf3..2b25a514f 100644
--- a/lib/vssh/libssh2.c
+++ b/lib/vssh/libssh2.c
@@ -3338,5 +3338,9 @@ void Curl_ssh_cleanup(void)
#endif
}
+size_t Curl_ssh_version(char *buffer, size_t buflen)
+{
+ return msnprintf(buffer, buflen, "libssh2/%s", LIBSSH2_VERSION);
+}
#endif /* USE_LIBSSH2 */