Added support for libssh SSH SCP back-end

libssh is an alternative library to libssh2.
https://www.libssh.org/

That patch set also introduces support for ECDSA
ed25519 keys, as well as gssapi authentication.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
This commit is contained in:
Nikos Mavrogiannopoulos 2017-10-23 13:49:23 +02:00 committed by Daniel Stenberg
parent 3973ee6a65
commit c92d2e14cf
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
13 changed files with 1626 additions and 198 deletions

View file

@ -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