Commit Graph

587 Commits (e004dfa2b86fa1c2fbc1204ae414c40e135cc169)

Author SHA1 Message Date
John Safranek 8672e8fb6d
Merge pull request #132 from JacobBarthelmeh/readme
adjust the default window size
2019-02-14 15:15:17 -08:00
John Safranek 5fe676862c Made a similar fix for the non-windows code as in the last commit. Also
cleaned up some tabs that an editor added.
2019-02-13 17:13:28 -08:00
John Safranek 0ffab772b4 Update to the SFTP functions. Directory handles are 64-bit values. They
weren't getting mangled to be sent to the peer or unmangled on receipt
consistently. Fixed.
2019-02-13 16:58:40 -08:00
Jacob Barthelmeh 4733878fc9 adjust the default window size 2019-02-08 16:40:14 -07:00
Jacob Barthelmeh aa7330f7fc nonblocking chmod, add chmod sftp test 2019-02-07 17:51:52 -07:00
John Safranek 854fb8d7e8 Added some porting fixes for OSE. Added the switch USE_OSE_API to enable
them.
2019-02-07 11:55:39 -08:00
Jacob Barthelmeh d0a7e69487 adjustement to sftp test and fix typo 2019-02-07 12:12:30 -07:00
Jacob Barthelmeh a6a1297c93 check for socket disconnect error 2019-02-07 11:07:10 -07:00
Jacob Barthelmeh 249795ce9a account for order of handle when sent across the wire 2019-02-07 10:15:03 -07:00
John Safranek 8fe5ad76d4 Fixed a couple of the updates to the Windows side of the code for
removing 64-bit values.
2019-02-06 16:38:00 -08:00
Jacob Barthelmeh 99c4cfca00 adjustments to handle array
Signed-off-by: Jacob Barthelmeh <jacob@wolfssl.com>
2019-02-06 17:14:21 -07:00
John Safranek accd3c299d Add a function to assign-add a 32-bit value to a 64-bit value. The
64-bit value is an array 2 of 32-bit values. In SFTP, changed up all the
uses (most) of word64 to word32 arrays. Not all systems we support have
64-bit types available.
2019-02-06 14:31:31 -08:00
Jacob Barthelmeh a92bcdc074 add test cases for more SFTP commands 2019-02-06 13:45:18 -07:00
Jacob Barthelmeh a268085b0b cast return value of wstrlen 2019-02-04 14:53:45 -07:00
Jacob Barthelmeh 55a763c360 add missing testsuite.h file 2019-02-04 14:49:56 -07:00
Jacob Barthelmeh 9c73700f25 add SFTP tests to testsuite 2019-02-04 12:22:31 -07:00
John Safranek 055fbe6e4b 1. Updated SFTP_GetAttributes to take a heap pointer, just in case.
2. Put SFTP_RecvSTAT back into the build.
3. Use the common practice of setting the permissions on files from
windows to have all rx access, and add the write bit if file isn't read
only.
2019-01-30 14:29:34 -08:00
John Safranek 9b817d702c Update some more actions with Windows API calls instead of POSIX. 2019-01-29 17:11:10 -08:00
John Safranek 69455eafe7 When reading the data from the server during wolfSSH_SFTP_Get(), make
sure to get all the data from the server if the read_stream() doesn't
provide all that is present.
2019-01-29 16:06:07 -08:00
John Safranek 5512128aa5 1. Fix allocation for UNICODE strings. Need to be (count+1)*2 octets.
2. Added a local dynamic memory type in the ports for strings.
3. Removed the includes for winsock2.h. It is included by windows.h.
4. In the example client, switched fin and fout to macros to stdin and
stdout. While they are FILE in POSIX, in Windows they are a function.
2019-01-25 11:45:46 -08:00
Jacob Barthelmeh f2cb7a3356 scan-build fixes 2019-01-25 10:47:24 -07:00
John Safranek 4f8623b9b6 Add wrappers to the UNICODE Win32 functions to translate the strings
from ANSI C strings to wchar_t strings.
2019-01-24 17:34:35 -08:00
Jacob Barthelmeh b8ae2fab59 add non blocking testing and better support for non blocking edge cases 2019-01-24 15:48:34 -07:00
Jacob Barthelmeh 0cefa074fb remove guard on remove and rename 2019-01-24 11:28:16 -07:00
John Safranek 1891546c01 Back out a test case in Windows. Reconsolidated the checks into a single
check. (wrt WriteFile)
2019-01-24 10:20:23 -08:00
John Safranek a611c02211 Merge remote-tracking branch 'origin/nbsftp' into nbsftp 2019-01-23 18:27:56 -08:00
John Safranek ae6144f596 1. Add the default path parameter to the wolfsftp client.
2. Split the error check on the Windows file write into two checks.
3. Check the success of closing the local file in Windows.
4. Rearrange the Get state machine to attempt to close the remote file
first then the local file. The local file close is always attempted.
2019-01-23 18:22:56 -08:00
Jacob Barthelmeh 58186064de clean up closing directory with SFTP 2019-01-23 17:47:20 -07:00
Jacob Barthelmeh 756d5898f6 fix for listing directory with SFTP server on Windows 2019-01-23 16:58:10 -07:00
John Safranek 4bdfb5bfa3 Add MKDIR and RMDIR back into the Windows server. 2019-01-23 15:17:50 -08:00
John Safranek d9568efdcf Fix server side of Get(). 2019-01-23 13:51:42 -08:00
Jacob Barthelmeh 2c77a5c4bf fix for handle with Windows open dir 2019-01-23 14:08:18 -07:00
John Safranek eecae42f4a Fix invalid response when closing a file due to non-initialized result value. 2019-01-23 11:47:59 -08:00
Jacob Barthelmeh df6955866d add sftp test cases, fix build for C89, add flag print out to echoserver 2019-01-23 12:02:35 -07:00
John Safranek 6bac023986 1. Fix double free of "data" in the RecvWrite() function.
2. When writing to disk, add the idx to the data pointer.
2019-01-23 11:00:12 -08:00
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