diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-01-05 10:51:39 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-01-12 17:19:12 +0100 |
commit | 6773c7ca65cf2183295e56603f9b86a5ce816a06 (patch) | |
tree | 838cfbdd4048179b987a1256ab5af39fe3c0ef14 /lib/easy.c | |
parent | ad0aa27a9dfd027ffb62b86dfe8a09feb0fee0d8 (diff) | |
download | curl-6773c7ca65cf2183295e56603f9b86a5ce816a06.tar.gz |
wolfSSH: new SSH backend
Adds support for SFTP (not SCP) using WolfSSH.
Closes #4231
Diffstat (limited to 'lib/easy.c')
-rw-r--r-- | lib/easy.c | 13 |
1 files changed, 12 insertions, 1 deletions
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, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, 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; } |