Jacob Barthelmeh
d6efc07bc9
sanity check on size returned
2019-03-18 14:28:01 -06:00
JacobBarthelmeh
8038d4835c
Merge pull request #140 from ejohnstown/cleanup
...
Build Cleanup
2019-03-05 17:04:31 -07:00
John Safranek
a2bfd7749c
1. Update the Windows build README.
...
2. Add a guard to the sftpclient.c so it builds without SFTP enabled.
2019-03-04 16:46:25 -08:00
JacobBarthelmeh
8855bdeaeb
Merge pull request #139 from ejohnstown/build-fix
...
Windows Build Fix
2019-03-04 16:06:23 -07:00
John Safranek
c14de5040b
Change the ifdef around the Win32 wrapper functions to be switched off
...
when SCP or SFTP aren't enabled on a windows build.
2019-03-04 13:52:10 -08:00
JacobBarthelmeh
b6e4209d23
Merge pull request #135 from ejohnstown/examples
...
Configure Update
2019-02-27 14:34:15 -07:00
John Safranek
ea515ca1b2
Add configure option to disable building the example tools.
2019-02-27 13:25:55 -08:00
David Garske
c4874154c0
Merge pull request #134 from ejohnstown/nbsftp
...
Non-blocking wolfSFTP
2019-02-27 12:50:36 -08:00
John Safranek
2350ffe00e
Review Fixes
...
1. Add a wrapper to the key-gen code that checks for wolfCrypt's keygen flag and errors if keygen isn't available.
2. The main loops around wolfSSH_stream_read() for the example client and server needed to check the error register for WANT_READ or WANT_WRITE, not the return code.
2019-02-27 11:28:24 -08:00
Jacob Barthelmeh
3a2da4bb0e
account for order of test listing directory
2019-02-19 15:44:56 -07:00
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