From 6773c7ca65cf2183295e56603f9b86a5ce816a06 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 5 Jan 2020 10:51:39 +0100 Subject: wolfSSH: new SSH backend Adds support for SFTP (not SCP) using WolfSSH. Closes #4231 --- lib/easy.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lib/easy.c') diff --git a/lib/easy.c b/lib/easy.c index 6382cee3d..9211bc219 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -193,6 +193,13 @@ static CURLcode global_init(long flags, bool memoryfuncs) } #endif +#ifdef USE_WOLFSSH + if(WS_SUCCESS != wolfSSH_Init()) { + DEBUGF(fprintf(stderr, "Error: wolfSSH_Init failed\n")); + return CURLE_FAILED_INIT; + } +#endif + if(flags & CURL_GLOBAL_ACK_EINTR) Curl_ack_eintr = 1; @@ -272,6 +279,10 @@ void curl_global_cleanup(void) Curl_ssh_cleanup(); +#ifdef USE_WOLFSSH + (void)wolfSSH_Cleanup(); +#endif + init_flags = 0; } -- cgit v1.2.1