Commit Graph

38 Commits (c37e54b2bf95597dc8ff92c82c785e4f002b8e71)

Author SHA1 Message Date
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
Jacob Barthelmeh 04511bafa6 add guard on file system use in example client 2020-08-26 10:38:36 -06:00
Jacob Barthelmeh 1a7a80544d make shutdown error message unique to client used 2020-08-26 10:22:56 -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 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
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 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
Chris Conlon 83f8372458 update copyright to 2020 2020-01-03 15:16:47 -08:00
John Safranek 62f309c8ae
Merge pull request #170 from kojo1/GlobalReq
Global request
2019-06-18 10:18:46 -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
Takashi Kojo faa9764753 add Global Request callback 2019-06-06 07:10:44 +09:00
Takashi Kojo 86cbb26868 Add send Global Request 2019-06-06 07:10:44 +09:00
John Safranek 150ad93a07 Memory Refactor
1. Add functions to print out the sizes of various structures.
2019-05-09 09:37:29 -07: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 9df6e300f8 do not exit on want read with console parsing 2019-04-01 13:16:59 -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 ea515ca1b2 Add configure option to disable building the example tools. 2019-02-27 13:25:55 -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
John Safranek 7e9981c6ec Updated the main API, echoserver, client, and server for the NO_WOLFSSH_SERVER and NO_WOLFSSH_CLIENT options. 2019-01-09 14:25:50 -08:00
Jacob Barthelmeh fc92e85853 use int type for getting example args 2018-12-11 17:01:56 -07:00
John Safranek d2a1c2ab1b Non-blocking fix
1. Added a non-blocking socket option to the client.
2. Added a non-blocking socket option to the server.
3. Added support for select to the test header.
4. Updated the usage strings so they are formatted the same.
2018-11-21 11:38:33 -08:00
John Safranek b97b237695 Static Analysis Fixes
Ran the clang static analysis and infer and fixed most of the reported
items. There were many that infer found that looked like false
positives.
2018-11-15 13:28:42 -08:00
John Safranek cf959db741 Grouping test header functions into test-client, test-server, or
test-threading blocks. Adding flags to the examples and testsuite to
enable various test functions.
2018-09-20 16:10:13 -07:00
Jacob Barthelmeh 73bcd5c95a external test script 2018-07-02 17:07:51 -06:00
Jacob Barthelmeh bb668fe743 use of buffer keys in examples with no filesystem 2018-03-30 10:45:24 -06:00
John Safranek 16b4a31cfb Test Suite
1. Add an automated test suite.
2. Refactor the existing test and example code to be better components for the test suite.
3. Rename some of the internal functions used by the examples and test suite.
4. Echoserver now only handles one connection at a time, has option to exit after single connection.
5. Echoserver can do the port zero trick for the test suite.
6. Some whitespace changes.
7. Added a `(void)` to a variable to hush an unused assignment warning.
2017-09-29 13:48:40 -07:00
John Safranek 65fb16ddc4 Client
1. Added support to the library for clients.
2. Added example client.
3. Added VS solutions for building client example.
4. Added ECC client keys. Renamed existing keys.
5. Since defunct server is copy of echoserver, updated it.
2017-09-25 14:45:03 -07:00