Commit Graph

187 Commits (5285132db93658ce182122444cb26322032a51ea)

Author SHA1 Message Date
John Safranek bbd3d76291
Add some option disables to the api test and the echoserver. 2021-02-02 11:45:21 -08:00
Guido Vranken ec2ecb8a82 Fix memmove length calculation in SFTP client example 2021-01-08 11:07:15 +01:00
John Safranek 31912462a0
Hide SHA from Echoserver
1. Remove calls to wc_Sha256 Init, Update, and Final and remove the
   instances of the wc_Sha256 structure.
2. Remove the c32toa function, it isn't used at this point.
3. Add calls to wc_Sha256Hash().

This removes the Sha256 structure off the stack and replaces it with the
direct call to the single-shot hash routine. Flattening the size of the
hashed data and hashing it in was removed as redundant.
2020-12-10 08:42:37 -08:00
John Safranek 28f5d750c9
More Options
1. Fix the key offerings in the echoserver and client with ifdef guards.
2. Fix a couple guards that weren't copy-pasted correctly.
2020-10-15 08:48:02 -07:00
John Safranek 740d47d0b7
More Options
1. Wrapped the user keys in client.c with guards.
2. Added the ECC-521 key for hansel.
3. Touched up the loads of the keys with guards.
2020-10-14 14:28:26 -07:00
John Safranek 4d5ce88cc9
More Options
Wrapped more items with guards to disable them if not usable.
2020-10-13 17:42:02 -07:00
Takashi Kojo 69791e1ff2 moving WOLFSSH_TEST guard into test.h 2020-10-11 11:54:39 +09:00
Takashi Kojo 28b8e745b1 fix for MQX 2020-10-11 06:53:46 +09:00
John Safranek 06ea6eb2d0
Merge pull request #289 from JacobBarthelmeh/interop
add peek when waiting for data
2020-10-01 12:05:06 -07:00
John Safranek b7a6a51f4f
Merge pull request #284 from JacobBarthelmeh/sftp
add example timeout to sftp example
2020-10-01 11:48:20 -07:00
Jacob Barthelmeh 000b8544c6 add peek when waiting for data 2020-09-30 13:22:07 -06:00
Jacob Barthelmeh a4b2c693fe use word32 type with timeout example 2020-09-30 11:45:33 -06:00
John Safranek 1be4042711
Change examples' header file including guard from pragma-once to ifndef-define. 2020-09-24 16:50:35 -07:00
Jacob Barthelmeh 69b91a3a2e adjust size of strncpy and time limit 2020-09-17 11:16:22 -06:00
Jacob Barthelmeh f8b092c5b4 add example timeout to sftp example 2020-09-17 10:43:38 -06:00
JacobBarthelmeh c4578da7a2
Merge pull request #282 from ejohnstown/optional-build
Optional Builds
2020-09-08 15:15:22 -06:00
John Safranek 39f30e25a4
Optional RSA
1. If RSA is disabled in the wolfCrypt build, the RSA related code
   in wolfSSH shall be disabled.
2. Examples will force themselves to use ECC if RSA is disabled.
2020-09-04 15:28:25 -07:00
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