Commit Graph

240 Commits (331753c7763256e8cc788724b7b179f19301288c)

Author SHA1 Message Date
Hayden Roche 8cda0c4cc9
Merge pull request #445 from ejohnstown/wildcard 2022-08-29 17:44:45 -07:00
John Safranek 79ddd784c7
Scan-Build Cleaning
1. The portfwd example had a couple spots in command line option
   processing where atol could get called with a null pointer.
2022-08-29 17:13:12 -07:00
JacobBarthelmeh 5d8922e5a2 update readme for certs., add examples certs. to include.am, update comment in example 2022-08-26 23:41:50 -07:00
JacobBarthelmeh e40e852bc2 handle certificate chains 2022-08-24 06:35:40 -07:00
JacobBarthelmeh 69e1cde58f update macro guard in echoserver 2022-08-24 06:35:40 -07:00
JacobBarthelmeh 71d7f9c8cc more return code checking 2022-08-24 06:35:40 -07:00
JacobBarthelmeh 8fa67a041b add argument to client for loading certificate 2022-08-24 06:35:40 -07:00
JacobBarthelmeh c507c77431 add UUID and FASC-N 2022-08-24 06:35:40 -07:00
John Safranek f929c5e0b6 Added RSA cert support 2022-08-24 06:35:40 -07:00
John Safranek 13e525478c X.509 Certificate Support
1. Quality of Life improvements to echoserver: command line user config
2. adding policy checking
2022-08-24 06:35:40 -07:00
John Safranek a8fa38d7f8 OCSP Lookups
1. Changed to use the new set of certs.
2. Do an actual cert check and report errors.
3. Do an actual OCSP lookup and report errors.
2022-08-24 06:35:40 -07:00
John Safranek 1405eeae62 X.509 Certificate Support
1. Fix build error when building without certificates.
2. Add the root CA option to the echoserver usage.
3. Update the readme file to include the new certificate option.
4. Added command line option to load a CA cert into the echoserver.
2022-08-24 06:35:40 -07:00
JacobBarthelmeh 20ace73349 fix new scan-build warning 2022-08-22 18:09:07 -06:00
Jacob Barthelmeh 92d1f39065 update copyright date 2022-08-17 16:58:21 -06:00
John Safranek 511a022833
Merge pull request #435 from JacobBarthelmeh/sshd
Alpha version of SSHD support with wolfSSH
2022-08-16 16:22:55 -07:00
John Safranek a0da4e3cc5
Merge pull request #431 from JacobBarthelmeh/sftp
handle files with . in name and fix for window resize want write case
2022-08-10 13:30:35 -07:00
Jacob Barthelmeh 5806d28dd2 check for null port value 2022-08-09 13:24:58 -06:00
JacobBarthelmeh dba42d3dc7 Non-blocking SFTP and SSH fixes, handle edge case with files having '.' in name, alter want write case to return consumed size 2022-08-08 13:43:34 -07:00
Eric Blankenhorn 90625af050 Add WIN time support in SFTP client 2022-07-28 15:58:18 -05:00
JacobBarthelmeh 7b8ce149d7 add look for libpam and adjust for QNX build 2022-07-21 13:31:22 -07:00
JacobBarthelmeh 3013eee8cb handle pending sent packets with SFTP and want write case with rekey 2022-07-14 09:17:43 -07:00
John Safranek 6bc47eef77 No User
1. In the echoserver, add a print to the case where a user doesn't exist
   in the system.
2022-05-25 14:21:50 -07:00
John Safranek b34f144814
Preprocessor Guards
1. Add preprocessor guards for RSA/ECC to agent and the example and test
applications.
2. Remove redundant copy of FwdStates from internal.h.
2022-04-05 11:02:23 -07:00
David Garske 509851e64e
Merge pull request #398 from ejohnstown/status
Echoserver SFTP status update
2022-03-25 14:45:56 -07:00
John Safranek b94349bbc5
Echoserver SFTP status update
1. In wolfsftp, treat all the status codes the same when trying to read.
2. In the echoserver, treat all the status codes the same in the
   sftp_worker.
2022-03-24 16:55:12 -07:00
David Garske 0f22329187 Fix for FIPS 140-3 on ECC private key use. Fix for IPv6 with scpclient. Wrong macro for fall through. Add support for flushing file IO using `WOLFSCP_FLUSH`. 2022-03-24 13:34:26 -07:00
John Safranek 17008c635e
Merge pull request #394 from anhu/prevent_false_timeout
Clean out the currentFile file name ensuring reset of the timeout value
2022-03-21 15:40:34 -07:00
Anthony Hu e1949d2fd6 Clean out the currentFile file name to ensure reset of the timeout value. 2022-03-21 17:43:51 -04:00
John Safranek 981b8e8b30
SFTP Channel Receive Fix
1. The echoserver's sftp_worker() was treating the WS_CHAN_RXD status as
   an error and failing out. Updated to clear the error status.
2. wolfSSH_SFTP_read() was also treating WS_CHAN_RXD status as an error
   and terminating the transfer. Update to treat like the other status.
2022-03-21 14:39:52 -07:00
John Safranek bd312c34f2
Old Compiler Warning Cleanup (GCC 4.0.2)
1. client.c: It was warning a recommendation to tag the function
   `readInput()` as non-return. Changed the err_sys() calls to
   `fprintf(stderr, ...)` and then return from the function.
2. internal.c: In functions `DoKexInit()` and
   `DoUserAuthRequestPublicKey()`, initialized a couple variables that
   could be used uninitialized.
3. wolfsftp.c: Fixed a variable that was shadowing a global label.
4. wolfsftp.c: In function `wolfSSH_SFTP_RecvFSTAT()`, initialized a
   variable that could be used uninitialized.
5. scpclient.c: The command line argument was read into a char value
   assuming it was signed, which is usually true. On the PowerPC this
   value is unsigned. Promoted it to int to match the other tools.
2022-01-27 10:36:51 -08:00
John Safranek 796423bfac
Update tests and examples to include config.h
1. All the sources for the tests and examples did not have an include
   for config.h. This fixed some inconsistent builds with an older
   version of gcc.
2. Moved config.h from the src directory to the top level of the repo
   directory.
2022-01-26 15:06:07 -08:00
Jacob Barthelmeh ba99ddda68 run license update script 2021-11-04 13:11:53 -06:00
Jacob Barthelmeh db00600628 fixes for warnings from scan-build 2021-11-04 09:43:53 -06:00
John Safranek f95e0995cc
After sending the shutdown messages, client needs to wait for the server to respond before closing its socket. 2021-10-07 15:28:40 -07:00
John Safranek 3c8b2a622a
In the echoserver, added a state check when a channel closes so it doesn't try to check a bad fd. 2021-10-07 15:09:02 -07:00
John Safranek a1f90568ab
Some cleanup for Windows build. 2021-10-06 18:08:04 -07:00
John Safranek fde6ce4550
SSH Port Forwarding Redux
1. Fixed a leak from a commit earlier in this branch.
2. Freed the correct address name when a forwarded connection closes.
3. Only muck about with the childFd when using the shell.
4. Treat the error code WS_CHANNEL_CLOSED as status, not a failure.
2021-10-06 13:24:13 -07:00
John Safranek d66fb26158
Update the echoserver to look up addresses used. 2021-10-06 13:24:05 -07:00
John Safranek 1ad3fc052b
Change the checked error codes to their names. 2021-10-05 19:38:33 -07:00
John Safranek 0dd21f4593
Change portfwd's data buffers to use the define EXAMPLE_BUFFER_SZ for a size. It can be changed at configure time. Use allocated buffers for small stack builds. 2021-10-05 19:38:33 -07:00
John Safranek 061463e604
Changed calls to malloc, free, memcpy, etc. with uses of the wrappers WMALLOC, WFREE, WMEMCPY, etc. 2021-10-05 19:38:33 -07:00
John Safranek dd79a54541
Fix issue with shutting down a channel. It would try to do it twice and error out. 2021-10-05 19:38:18 -07:00
John Safranek f369f4346c
Static Analysis Test Report Fixes
1. Moved SendKexDhReply()'s signature data to the heap. (413)
2. Moved SendUserAuthRequest()'s signature data to the heap. (414)
3. Moved DoKexDhReply()'s signature data to the heap. (415)
4. Moved DoUserAuthRequestRsa()'s RSA key to the heap. (416)
5. Moved wolfSSH_ProcessBuffer()'s key buffer to the heap. (422)
6. Moved wolfSSH_ReadKey_buffer()'s key bugger to the heap. (423)
7. In the echoserver, fixed a small-stack related allocation. It was
   using a DYNTYPE constant, but those aren't visible. Also, the
   wrong variable name was getting freed. (rebase)
2021-09-27 08:35:15 -07:00
John Safranek b3e9321a3c
Fixed an echoserver leak with forwarding. 2021-09-27 08:06:54 -07:00
John Safranek 1a807f1da4
Move some buffers around in the echoserver so they are allocated once per thread. 2021-09-27 08:06:54 -07:00
John Safranek 6d606dff45
Port Forwarding Update
1. Fix issue with local port forwarding example.
2. Add remote port forwarding to the echoserver.
3. Updated the unsupported GlobalReq response.
2021-09-27 08:06:54 -07:00
JacobBarthelmeh df753b0b4b sanity check on the end of the buffer in example 2021-08-27 13:41:41 -06:00
Jacob Barthelmeh 7968cb479e make loading user created keys into the examples easier 2021-08-25 09:53:58 -06:00
John Safranek 21f54b0599 Clean up some awkward debug logging with respect to userauth. 2021-08-02 23:41:27 +07:00
Eric Blankenhorn 5931aefff5 Fix for NO_FILESYSTEM and WOLFSSH_NO_AES_GCM 2021-07-20 11:22:04 -07:00