summaryrefslogtreecommitdiff
path: root/lib/easy.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-10-23 13:49:23 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-12-01 17:35:14 +0100
commitc92d2e14cfb0db662f958effd2ac86f995cf1b5a (patch)
treea5352cc296c3f7230dc0e34391262941b070feda /lib/easy.c
parent3973ee6a654e96c027afee86037680334b24e709 (diff)
downloadcurl-c92d2e14cfb0db662f958effd2ac86f995cf1b5a.tar.gz
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>
Diffstat (limited to 'lib/easy.c')
-rw-r--r--lib/easy.c11
1 files changed, 11 insertions, 0 deletions
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;
}