James Housley brought support for SCP transfers
This commit is contained in:
@@ -45,6 +45,11 @@
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBSSH2
|
||||
#include <libssh2.h>
|
||||
#endif
|
||||
|
||||
|
||||
char *curl_version(void)
|
||||
{
|
||||
static char version[200];
|
||||
@@ -88,6 +93,11 @@ char *curl_version(void)
|
||||
left -= len;
|
||||
ptr += len;
|
||||
#endif
|
||||
#ifdef USE_LIBSSH2
|
||||
len = snprintf(ptr, left, " libssh2/%s", LIBSSH2_VERSION);
|
||||
left -= len;
|
||||
ptr += len;
|
||||
#endif
|
||||
|
||||
return version;
|
||||
}
|
||||
@@ -125,6 +135,11 @@ static const char * const protocols[] = {
|
||||
"ftps",
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBSSH2
|
||||
"scp",
|
||||
#endif
|
||||
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -179,10 +194,15 @@ static curl_version_info_data version_info = {
|
||||
0, /* c-ares version numerical */
|
||||
NULL, /* libidn version */
|
||||
0, /* iconv version */
|
||||
NULL, /* ssh lib version */
|
||||
};
|
||||
|
||||
curl_version_info_data *curl_version_info(CURLversion stamp)
|
||||
{
|
||||
#ifdef USE_LIBSSH2
|
||||
static char ssh_buffer[80];
|
||||
#endif
|
||||
|
||||
#ifdef USE_SSL
|
||||
static char ssl_buffer[80];
|
||||
Curl_ssl_version(ssl_buffer, sizeof(ssl_buffer));
|
||||
@@ -217,6 +237,11 @@ curl_version_info_data *curl_version_info(CURLversion stamp)
|
||||
#endif /* _LIBICONV_VERSION */
|
||||
#endif
|
||||
|
||||
#ifdef USE_LIBSSH2
|
||||
snprintf(ssh_buffer, sizeof(ssh_buffer), "libssh2/%s", LIBSSH2_VERSION);
|
||||
version_info.libssh_version = ssh_buffer;
|
||||
#endif
|
||||
|
||||
(void)stamp; /* avoid compiler warnings, we don't use this */
|
||||
|
||||
return &version_info;
|
||||
|
||||
Reference in New Issue
Block a user