Commit Graph

602 Commits (384a00000f3db814492602cf15d72a3a643f70eb)

Author SHA1 Message Date
Jacob Barthelmeh 02bf8632a8 lower platform toolset version for sftp client 2019-01-23 11:43:46 -07:00
Jacob Barthelmeh d54a42161e move sftp client example to examples directory 2019-01-23 11:23:32 -07:00
Jacob Barthelmeh fff773213a change wolffwd example name to portfwd 2019-01-23 11:23:21 -07:00
Jacob Barthelmeh 5b50b3c031 more support for want write on client side 2019-01-23 11:16:12 -07:00
Jacob Barthelmeh ee85cc552e add more support for want writes on server side 2019-01-23 10:37:21 -07:00
John Safranek 5386297429 Whitespace changes.
Change the file permissions when opening a file.
2019-01-22 16:24:18 -08:00
John Safranek e5b2e8478b Use fewer options when opening the file on Windows. 2019-01-22 14:04:48 -08:00
John Safranek d13607d889 1. Add a defaultSftpPath to the server, with an API function.
2. Add option to echoserver for the SFTP path.
3. Fix issues with the Get() and Put() state machines with respect to
file access. Windows builds to use Win32 API. Windows builds do not use
fseek().
4. RecvRealPath() to use the new default path option if available. It
does not call getcwd() for Windows builds.
2019-01-22 11:38:28 -08:00
John Safranek a457abd11d 1. Initialize the ret value in RecvSetSTAT().
2. Delete trailing commas in a couple enums.
3. Add extern "C" C++ guards around wolfsftp.h.
4. In port.c, comment out the pwrite and pread wrappers for Windows builds.
5. Remove the getcwd from RecvRealPath(), but needs a better fix.
6. Leave out several operations that need to be touched later. Emphasis is to get Get and Put running.
7. Open, Close, Read, Write, have a WINCE version using the Win32 API.
8. Remove the include of stdio.h from port.c for Windows builds.
9. Remove and Rename actions return an error for Windows builds.
2019-01-18 16:53:07 -08:00
Jacob Barthelmeh 73839469ed adjust stream_send behavior with WANT_WRITE 2019-01-18 10:19:18 -07:00
Jacob Barthelmeh 61a41b5b7b remove possible double free and fix non blocking echoserver 2019-01-17 17:22:41 -07:00
Jacob Barthelmeh 19a4ce6403 initial sftp server non blocking 2019-01-16 18:03:36 -07:00
John Safranek a8cf8b6b97 Fix a few more WinCE header issues. 2019-01-16 11:02:53 -08:00
Jacob Barthelmeh 0f77f67bdf check for scp + no server and have print outs for servers 2019-01-11 09:48:58 -07:00
John Safranek 39fce973f2 Cleaned up three compile type warnings. 2019-01-09 14:40:58 -08:00
John Safranek 7e9981c6ec Updated the main API, echoserver, client, and server for the NO_WOLFSSH_SERVER and NO_WOLFSSH_CLIENT options. 2019-01-09 14:25:50 -08:00
John Safranek 42675723e2 Fixed some issues with NO_WOLFSSH_SERVER builds. wolfSSH proper still
has the server code, but the wolfSFTP code excludes the server side.
2019-01-09 13:14:25 -08:00
John Safranek 8ec417b97b 1. Move some more includes in port.h to a block for WINCE where they aren't included.
2. Added "SINGLE_THREADED" to the vs user_settings.h.
2019-01-08 11:51:29 -08:00
Jacob Barthelmeh 6668ef2b80 advance file state on resume of put 2019-01-07 15:33:31 -07:00
John Safranek 9bba844e35 Put file should fail if the local file doesn't exist before trying to
open the remote file. Rearrange the Put state machine. Add an error code
for SFTP_FILE_DNE.
2019-01-07 14:12:12 -08:00
John Safranek 09bfe48615 Get and Put a file that doesn't exist, and their state machines didn't
transition to the cleanup state.
2019-01-07 14:05:00 -08:00
John Safranek 67ec3a0bad Bug fix in SFTP_Put where it would just fail with a non-blocking socket.
Caused by three issues:
1. an unsigned return code was checked for a negative error code
2. a state was skipped in the case of a would block situation
3. a possible blocking point wasn't getting checked for want-read or
write.
2019-01-07 13:21:20 -08:00
John Safranek 6d295bc396 add some logging of the states in SFTP_SendReadPacket() 2019-01-07 11:51:36 -08:00
John Safranek 9d589ea769 SFTP_SendReadPacket() can return a 0 in normal situations. SFTP_Get()
was treating it like an error and skipping the file close.
2019-01-07 11:50:15 -08:00
John Safranek c91dc02336 Do some line wrapping in the sftp source. 2019-01-07 11:34:25 -08:00
John Safranek 5fd1e5daf8 fix a memory leak with the data buffer for SFTP_STAT(). 2019-01-07 11:33:54 -08:00
John Safranek 3ebecebed4 Fixes with maxSz being word32. Should be int as a negative error code
may be returned.
2019-01-07 11:11:49 -08:00
John Safranek aba491f927 fix a missing return code in Rename 2019-01-07 10:55:33 -08:00
Jacob Barthelmeh efb3d30026 add rmdir SFTP non blocking 2019-01-07 11:40:33 -07:00
John Safranek 11512b8144 Update wolfSSH_SFTP_Rename() for non-blocking. 2019-01-07 10:20:04 -08:00
Jacob Barthelmeh f3a0bf9802 add non blocking SFTP mkdir 2019-01-04 17:49:33 -07:00
Jacob Barthelmeh d5b623a0a9 add non blocking SFTP remove 2019-01-04 17:03:23 -07:00
John Safranek ea10ce7947 Put guards around including a couple more files when building for WINCE. 2019-01-04 15:00:27 -08:00
Jacob Barthelmeh 26daac6645 adjust SFTP handle state cleanup 2019-01-04 15:13:20 -07:00
John Safranek 157b71be7c Update wolfSSH_SFTP_Put() and wolfSSH_SFTP_SendWritePacket() for non-blocking. 2019-01-04 10:44:41 -08:00
Jacob Barthelmeh 3f1ebe292c initial LS nonblocking (needs more work) 2019-01-03 17:15:36 -07:00
John Safranek 2662e43cf1 Fix a couple scan-build warnings. 2019-01-02 15:11:05 -08:00
John Safranek 5c49c3fd46 Changing some spots where we weren't following the pattern of setting
the error field of the ssh object and just returning WS_FATAL_ERROR.
Instead of changing all the downstream fucntions from DoReceive(), have
it store the return value into the error register and return WS_FATA_ERROR.
2019-01-02 15:00:02 -08:00
John Safranek a28bf9902c Changing some spots where we weren't following the pattern of setting
the error field of the ssh object and just returning WS_FATAL_ERROR.
2019-01-02 14:38:22 -08:00
John Safranek 1ff58f0a94 Fixed some of the updated functions to clean themselves up on error,
except for would block situations.
2019-01-02 12:42:01 -08:00
Jacob Barthelmeh 887b4fa3ba adjust read on SFTP get 2019-01-02 13:31:20 -07:00
Jacob Barthelmeh f0ba3a0849 malloc lstat buffer and rework SFTP send packet type 2019-01-02 11:32:41 -07:00
Jacob Barthelmeh 821b34df23 use buffer for parsing SFTP attributes rather than reads 2019-01-02 10:05:23 -07:00
Jacob Barthelmeh 05f8070fa2 sftp real path non blocking 2019-01-02 09:46:46 -07:00
John Safranek 554fbda213 Non-blocking SFTP
1. Updated wolfSSH_SFTP_ClearState() with missing states.
2018-12-28 14:45:14 -08:00
John Safranek b4eff0ce7c Non-blocking SFTP
1. Updated wolfSSH_SFTP_GetHandle() using the new state machine method.
2018-12-28 14:38:51 -08:00
John Safranek 6fd588f208 Non-blocking SFTP
1. Updated wolfSSH_SFTP_Close() using the new state machine method.
2018-12-28 10:33:00 -08:00
Jacob Barthelmeh c06bb7db56 modify wolfSSH_stream_send behavior with non blocking want write case 2018-12-28 11:02:25 -07:00
John Safranek af32ee760f Fix failure in initializing the LSTAT state machine. 2018-12-28 09:57:51 -08:00
John Safranek bf89f60f14 scan-build fixes 2018-12-27 17:53:05 -08:00