From c92d2e14cfb0db662f958effd2ac86f995cf1b5a Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 23 Oct 2017 13:49:23 +0200 Subject: 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 --- lib/easy.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/easy.c') diff --git a/lib/easy.c b/lib/easy.c index 5917db36a..72506488a 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -253,6 +253,13 @@ static CURLcode global_init(long flags, bool memoryfuncs) } #endif +#if defined(USE_LIBSSH) + if(ssh_init()) { + DEBUGF(fprintf(stderr, "Error: libssh_init failed\n")); + return CURLE_FAILED_INIT; + } +#endif + if(flags & CURL_GLOBAL_ACK_EINTR) Curl_ack_eintr = 1; @@ -330,6 +337,10 @@ void curl_global_cleanup(void) (void)libssh2_exit(); #endif +#if defined(USE_LIBSSH) + (void)ssh_finalize(); +#endif + init_flags = 0; } -- cgit v1.2.3