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/vssh/ssh.h | |
parent | ad0aa27a9dfd027ffb62b86dfe8a09feb0fee0d8 (diff) |
wolfSSH: new SSH backend
Adds support for SFTP (not SCP) using WolfSSH.
Closes #4231
Diffstat (limited to 'lib/vssh/ssh.h')
-rw-r--r-- | lib/vssh/ssh.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/vssh/ssh.h b/lib/vssh/ssh.h index 3213c5a52..0d4ee521d 100644 --- a/lib/vssh/ssh.h +++ b/lib/vssh/ssh.h @@ -7,7 +7,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 @@ -30,7 +30,10 @@ #elif defined(HAVE_LIBSSH_LIBSSH_H) #include <libssh/libssh.h> #include <libssh/sftp.h> -#endif /* HAVE_LIBSSH2_H */ +#elif defined(USE_WOLFSSH) +#include <wolfssh/ssh.h> +#include <wolfssh/wolfsftp.h> +#endif /**************************************************************************** * SSH unique setup @@ -188,6 +191,12 @@ struct ssh_conn { #ifdef HAVE_LIBSSH2_KNOWNHOST_API LIBSSH2_KNOWNHOSTS *kh; #endif +#elif defined(USE_WOLFSSH) + WOLFSSH *ssh_session; + WOLFSSH_CTX *ctx; + word32 handleSz; + byte handle[WOLFSSH_MAX_HANDLE]; + curl_off_t offset; #endif /* USE_LIBSSH */ }; @@ -195,9 +204,6 @@ struct ssh_conn { #define CURL_LIBSSH_VERSION ssh_version(0) -extern const struct Curl_handler Curl_handler_scp; -extern const struct Curl_handler Curl_handler_sftp; - #elif defined(USE_LIBSSH2) /* Feature detection based on version numbers to better work with @@ -237,11 +243,13 @@ extern const struct Curl_handler Curl_handler_sftp; #define CURL_LIBSSH2_VERSION LIBSSH2_VERSION #endif -extern const struct Curl_handler Curl_handler_scp; -extern const struct Curl_handler Curl_handler_sftp; #endif /* USE_LIBSSH2 */ #ifdef USE_SSH + +extern const struct Curl_handler Curl_handler_scp; +extern const struct Curl_handler Curl_handler_sftp; + /* generic SSH backend functions */ CURLcode Curl_ssh_init(void); void Curl_ssh_cleanup(void); |