Commit Graph

170 Commits (487bcef2cc25db02e0d5a2e3f8c0101245338e03)

Author SHA1 Message Date
John Safranek 487bcef2cc
Fix Memory
1. A couple places weren't passing the correct heap pointer to free.
   Normally this was ignored in the build because the WMALLOC macro left
   them out. Found using wolfCrypt memory logging.
2. Replaced the call to strdup() with wstrdup() that takes a heap and
   type parameter so sit may allocate a buffer with WMALLOC() and be
   freed correctly by WFREE().
3. Tweaked the client to use a preallocated buffer for the private key
   rather than letting ReadKey allocate one. (Another WFREE() heap/type
   issue.)
2020-09-02 12:11:24 -07:00
John Safranek 132a0a52f6
Clean up a couple issues where building the code with a C++ reported build errors.
1. Typecasting the return from malloc.
2. strncpy() checking.
2020-08-31 09:31:47 -07:00
John Safranek e052108d0c
Merge pull request #271 from JacobBarthelmeh/scp
add callback and example for no file system with SCP
2020-08-27 09:23:17 -07:00
John Safranek e5c90b31e1
Merge pull request #273 from JacobBarthelmeh/testing
graceful shutdown with scp interop
2020-08-26 10:28:23 -07:00
Jacob Barthelmeh 04511bafa6 add guard on file system use in example client 2020-08-26 10:38:36 -06:00
Jacob Barthelmeh 9a8b9e72c9 adjust check for :/ and check on compare of file name 2020-08-26 10:22:56 -06:00
Jacob Barthelmeh 44d18953ed allow scp to '/' and increase file buffer in example server 2020-08-26 10:22:56 -06:00
Jacob Barthelmeh 1a7a80544d make shutdown error message unique to client used 2020-08-26 10:22:56 -06:00
Jacob Barthelmeh 217a7d6520 add callback and example for no file system with SCP 2020-08-26 10:22:56 -06:00
Jacob Barthelmeh 03fac18efd graceful shutdown with scp interop 2020-08-19 10:55:45 -06:00
John Safranek bfa3d5717c
SSH-AGENT Touchup
1. Add function to request the channel ID for the last message received.
2. Changed the send channel functions to use the self channel ID rather
   than the peer's channel ID.
3. Modified client and echoserver to use the channel ID for the agent
   to send messages.
4. Modify client to receive the entire message from the agent before
   trying to relay it to the peer.
2020-07-30 14:00:28 -07:00
John Safranek 2be3f15106
Remove the select.h header from examples if autoconf cannot find it. 2020-07-22 15:25:51 -07:00
John Safranek 2bf3d5bd87
SSH-AGENT (peer review)
1. Cleanup redundant includes.
2. Add comments to the Read Key function pair.
3. Remove my name as an example user.
4. Change ECC sig build arrays to use macro for size rather than
   bare number.
5. Remove empty if state for agent.
6. Added a couple needed NULL checks on allocs for the agent.
7. If unable to create an agent object on connect, disable agent use.
2020-07-22 14:48:45 -07:00
John Safranek 365d1fd8ea
SSH-AGENT
1. Added option to client to load a public key.
2. Added function ReadKey to load a key from a buffer or from a file
   and store it. Utility for the client.
2020-07-17 14:54:36 -07:00
John Safranek 636cd81d32
SSH-AGENT
1. Example client should check the authType passed into the function,
   not the type stored in the authData.
2. Restore the hansel keys to example client.
3. Add user ECC option to the example client for selecting
   hansel's RSA or ECC key.
4. Restore the ordering of public key and password in
   SendUserAuthRequest().
2020-07-15 09:30:41 -07:00
John Safranek 1250e1f9d8
SSH-AGENT
1. Added the agent support to the configure.ac script.
2. Updated the gitignore file to ignore any stamp-h file.
3. Changed to use the parsing functions and to make the parsing functions
   local.
4. Updates to multichannel.
5. Add -lutil only if needed.
6. Add configure checks for some headers that change based on target OS.
7. Bump version.
8. Test doesn't have real account or real key so agent doesn't test well.
2020-07-15 09:29:49 -07:00
John Safranek a996d1e1c2
Clean up some scan-build complaints. 2020-07-09 09:33:30 -07:00
John Safranek bd4ebe1a1d
Add check of return value of chdir(). 2020-07-08 15:23:26 -07:00
John Safranek 9c4739e3b2
Shell Worker
1. Add the echoserver shell support as a configure option.
2. Added some header and function checks to configure.
3. Use the new header and function checks to select includes
   in the echoserver.
2020-07-08 13:40:00 -07:00
John Safranek 49bd9ad518
Shell Worker
1. Fixed issue with the testsuite failing when the shell is enabled.
2. Added option to echoserver to force the echo behavior instead of
the shell when shell is enabled.
2020-07-08 12:02:27 -07:00
John Safranek 18ec6d927c
Shell Worker
Add customer contributed code to the echoserver for handling spawning a shell.
2020-07-08 12:00:32 -07:00
John Safranek df74449ea1
Auth Type None
1. Added a compile time option to allow None as an authentication type, mainly
for testing.
2. Added a couple updates for VxWorks builds.
2020-05-28 15:15:38 -07:00
John Safranek 0ea40ec85f
Release Rollup
1. Fix some C++ compiler errors.
2. Added "static" to the globals in the client and SFTP client.
3. Removed an unused string.
2020-04-24 10:50:22 -07:00
John Safranek 2c710dcfd8
Merge pull request #251 from JacobBarthelmeh/sftp
free name list after done and fix clean_path
2020-03-03 15:06:40 -08:00
Jacob Barthelmeh cc7db42475 free name list after done and fix clean_path 2020-03-03 15:33:01 -07:00
John Safranek 9d1cbbab8e
wolfSCP
Add support for an example SCP client.
2020-03-03 11:27:02 -08:00
Chris Conlon 86ee47bd33
Merge pull request #246 from JacobBarthelmeh/memory
fix XFREE/MALLOC typo to be WFREE/MALLOC
2020-02-28 09:12:57 -07:00
John Safranek 380a53554b
Merge pull request #241 from JacobBarthelmeh/scp
exit channel in echoserver before sending disconnect
2020-02-27 19:18:30 -08: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
John Safranek 52183c3018
Merge pull request #242 from JacobBarthelmeh/auth
updates to auth callback
2020-02-18 14:29:22 -08:00
Jacob Barthelmeh 9b7700cd6b adjust stream exit in scp case 2020-02-14 17:52:25 -07:00
Jacob Barthelmeh 67851e5c10 updates to auth callback 2020-02-11 15:04:50 -07:00
Jacob Barthelmeh 84785ffe39 exit channel in echoserver before sending disconnect 2020-02-11 14:41:14 -07:00
John Safranek 51d4b14155
Automake Include Maintenance
Remove redundant items from the automake includes. They were including files already included.
2020-02-10 15:44:55 -08:00
Jacob Barthelmeh 31131c0e03 public key vs password is now decision of user callback 2020-01-27 10:33:28 -07:00
Jacob Barthelmeh f1d00102ba fix for no old name build 2020-01-23 08:54:21 -08:00
Chris Conlon 83f8372458 update copyright to 2020 2020-01-03 15:16:47 -08:00
John Safranek e68e6620ce Update and clarify the ECC options to the echoserver. (Added -E to the list.) 2019-12-05 13:18:16 -08:00
John Safranek 1cc53ef330 removed a dead assign from the echoserver 2019-10-29 14:51:55 -07: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
JacobBarthelmeh f0c93bdd08
Merge pull request #206 from ejohnstown/auto-test
Automatic Client Test
2019-10-25 14:11:27 -06: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 8d2900cbab
1. Reflowed some whitespace.
2. Removed a redundant function that was an artifact of the rebase.
3. Added a reset of the retry count.
2019-10-24 11:10:28 -07:00
Takashi Kojo 55c0352a76 sendDisconnect at password reject, example code in echoserver 2019-10-24 10:55:05 -07:00
John Safranek 744a67e53b
Echoserver Maintenance
1. When printing server worker errors, print out the error string on the
stored error code, not the return value.
2. If the error is a socket error, don't try to send a shutdown message
to the peer.
3. Update the echoserver to close the connection cleanly when the SFTP
peer exits.
4. Added a function to check a WOLFSSL_CHANNEL if it is in eof.
2019-10-10 10:57:39 -07:00
JacobBarthelmeh 4a246abc76
Merge pull request #197 from ejohnstown/maintenance
Maintenance
2019-09-19 22:36:48 -06:00