Commit Graph

32 Commits (66f8a47a6aa3d118c17a38d68d3769b34e29b467)

Author SHA1 Message Date
Jacob Barthelmeh cc7db42475 free name list after done and fix clean_path 2020-03-03 15:33:01 -07:00
Jacob Barthelmeh 22cab294b1 fix XFREE/MALLOC typo to be WFREE/MALLOC 2020-02-26 13:19:43 -07:00
JacobBarthelmeh 552b763e4f
Merge pull request #243 from ejohnstown/vxworks
VxWorks Customizations
2020-02-18 17:08:00 -07:00
John Safranek 7c8ae04b44
VxWorks Customizations
Also includes some bug fixes.
1. Add a function that returns a pointer to a session's username string.
2. Add a function to set a "raw" username copied from an incoming packet.
3. Add tests for 1 and 2.
4. Server saves a copy of the username on successful authentication.
5. Fix bug with GetString() where it would choke on a 0 length string.
6. Clean up the termios macros and mode creation.
7. Add some options for when WOLFSSL_VXWORKS is set.
2020-02-18 16:01:00 -08:00
Jacob Barthelmeh 67851e5c10 updates to auth callback 2020-02-11 15:04:50 -07:00
Jacob Barthelmeh 31131c0e03 public key vs password is now decision of user callback 2020-01-27 10:33:28 -07:00
Chris Conlon 83f8372458 update copyright to 2020 2020-01-03 15:16:47 -08:00
John Safranek 56be98ae5e
Merge pull request #210 from JacobBarthelmeh/sftp
adjust example sftp client chmod command parsing
2019-10-28 08:15:22 -07:00
John Safranek 8328ad57a6
Added an error message when the wolfsftp client fails to copy a file on autopilot. Prints out the whole remote file name. Deleted a now unused constant. 2019-10-25 13:07:18 -07:00
Jacob Barthelmeh ca1f59d7fc adjust example sftp client chmod command parsing 2019-10-25 14:00:37 -06:00
John Safranek c07a743c1a
Autopilot SFTP Test
1. Added some command line options to the wolfSFTP client to show how to
use a hardcoded automatic file transfer rather than using the command
shell. On top of that, added a script to get and put some sample files.
It was built into the wolfSFTP client to allow for using all forms of
authentication as well as using the command line password.
2. Update wolfSSH_SFTP_STAT() with clearing the error register if it is WANT_READ.
2019-10-25 10:51:36 -07:00
John Safranek 365be7d63c Maintenance
1. Clean up a few compiler warnings.
2. Between Windows, MacOS, and Linux, the %llu printf tag varies
slightly, add a typecast of the word64 to unsigned long long to hush the
compiler warning.
2019-09-11 14:10:16 -07:00
John Safranek 56616d3416 Public key authentication
1. Cleanup some debug printouts.
2. Add option to the echoserver and wolfSFTP client to use ECC keys or RSA
keys for user authentication.
3. Add option to the echoserver to use ECC keys for peer authentication.

Note, the user authentication type is still hardcoded in the library as
password. To use public key, need to update the authId in
SendUserAuthFailure().
2019-06-06 11:59:35 -07:00
John Safranek d755132ccf Public key authentication
1. Refactor of the RSA public key and password user auth code.
2. In the userauth code remove some usused variable names or use some orphaned variables.
3. Fix the sizes used for calculating the buffer size for ECC public keys.
4. Add in the length of the ECDSA signature wrapping the set r,s.
5. Return the public key rejected error code from DoUserAuthRequestPublicKey when the callback returns invalid public key.
2019-06-06 10:37:22 -07:00
Jacob Barthelmeh cfe2aafbf0 static analysis and cast of argument 2019-04-30 13:02:08 -06:00
Jacob Barthelmeh 9f66a16ed5 add wc_ecc_fp_free to test treads for ecc caching 2019-04-09 15:46:11 -06:00
John Safranek 9aaebbb146 Update the copyright to 2019 2019-04-08 10:24:08 -07:00
Jacob Barthelmeh d27454d567 remove duplicate line 2019-04-03 17:09:07 -06:00
Jacob Barthelmeh ff84dea8a0 add function to get extended data and example remote command execute
update client example remote command execute for Windows

add wolfSSH_stream_peek and console translation

improvements to console translation and add client side psuedo terminal

windows client -c fix, clang build, sanity check on side for exec

fix for warnings with VS 2010 build

cast return value of WSTRLEN

update termios guard and fix for scan-build check

advance extended data buffer index on read

fix for error.h after rebase
2019-03-29 09:25:27 -06:00
John Safranek 8a267e2bd2 Public Key Check Callback
The public key check callback hook is given a pointer to the public key, the size of the key, and the application-specific context data.
1. Added a callback function hook for checking the public key sent to the client by the server. It defaults to accepting the key.
2. Added accessors for the public key check callback function and context data.
3. Added a dummy callback to all the example tools.
2019-03-26 13:51:35 -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
Jacob Barthelmeh aa7330f7fc nonblocking chmod, add chmod sftp test 2019-02-07 17:51:52 -07:00
Jacob Barthelmeh a6a1297c93 check for socket disconnect error 2019-02-07 11:07:10 -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 9c73700f25 add SFTP tests to testsuite 2019-02-04 12:22:31 -07: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
Jacob Barthelmeh b8ae2fab59 add non blocking testing and better support for non blocking edge cases 2019-01-24 15:48:34 -07: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 df6955866d add sftp test cases, fix build for C89, add flag print out to echoserver 2019-01-23 12:02:35 -07:00
Jacob Barthelmeh d54a42161e move sftp client example to examples directory 2019-01-23 11:23:32 -07:00