Commit Graph

343 Commits (b6ccb07de4d1ca6e2e89c39c6b04e23c52b11984)

Author SHA1 Message Date
David Garske b6ccb07de4
Merge pull request #703 from anhu/ipv6_part2
improvements for ipv6
2024-06-03 16:22:16 -07:00
Anthony Hu 1697d603c0 Changes inspired by ejohnstown comments. 2024-06-03 14:40:52 -04:00
Anthony Hu 499a742097 improvements for ipv6 2024-05-31 17:32:20 -04:00
Juliusz Sosinowicz 6de1230e6b scpclient.c: correct call to wolfSSH_SetPublicKeyCheckCtx 2024-05-31 17:06:34 +02:00
JacobBarthelmeh ebfd175bf1 add example and account for curve25519 / kyber1 2024-05-17 14:51:46 -06:00
John Safranek 2e1ca68652 Static Memory
1. Update the scpclient's use of the common key and cert function calls to
   pass NULL for the heap.
2024-04-26 10:21:29 -07:00
John Safranek d6d67c889c Static Memory
1. In the echoserver, change the names of the defines for the
   static memory values.
2. Modify the client common functions for keys and certs to take a heap
   value for their allocations.
3. Update the client's use of the common key and cert function calls to
   pass NULL for the heap.
4. Add a static memory description for the sftp client code.
2024-04-26 10:21:29 -07:00
John Safranek 559f24b476 Static Memory
1. Change the static buffer for the echoserver and the memory
   descriptions to be static values.
2. Fixed a double-free on the memory statistics.
2024-04-26 10:21:29 -07:00
John Safranek 6a65f16083 Static Memory
1. Modify the echoserver to use a static memory pool when using the flag
   WOLFSSH_STATIC_MEMORY. Uses NULL otherwise. The WOLFSSH_CTX is
   created with the pool and subsequent allocations for the WOLFSSH
   server use the same pool.
2. Add a configuration for the memory pool. Only works with SFTP
   enabled.
3. Add the memory pool use statistics to the echoserver.
2024-04-26 10:21:29 -07:00
John Safranek 6d51cc8278
Release v1.4.17: Release Testing Fixes
1. C++ build required some additional typecasting.
2. C++ complained about using the `= { 0 }` initializer, switched to
   `WMEMSET()`.
2024-03-22 17:09:01 -07:00
John Safranek 1736a4cabf
Update Copyright Date
1. Bring all copyright dates up to 2024.
2. Fix a few files with incorrect licensing.
2024-03-22 12:17:09 -07:00
JacobBarthelmeh 902cff345f
Merge pull request #667 from ejohnstown/sftp-fix
SFTP Fix
2024-03-19 00:21:38 +07:00
John Safranek 76e8d66289
SFTP Fix
1. Remove the continue from the SFTP worker loop when there's a timeout
   on the select and when there's a want_read from the wolfSSH_worker.
2. When the select has receive data ready, check it. Don't make it
   conditional on want read as well.

The goal is that when there isn't data waiting on the socket, check and
process the data in the SFTP channel's buffer, always.
2024-03-13 15:08:07 -07:00
JacobBarthelmeh 5d3f8776ed add macro guard on windows version for VT 2024-03-06 09:49:42 -07:00
JacobBarthelmeh e137865ab2 use windows terminal parsing for VT 2024-03-06 09:01:48 -07:00
JacobBarthelmeh bb9efdcb5c use WOLFSSL_RETURN_FROM_THREAD in example client 2024-03-05 08:02:06 +07:00
JacobBarthelmeh e617e20e7a example set key algos 2024-03-05 05:14:33 +07:00
JacobBarthelmeh 8b7a15f0fd check for channel closed on shutdown 2024-02-22 07:44:24 -08:00
John Safranek 815d22f729
Merge pull request #650 from miyazakh/no_rsa
fix WOLFSSH_NO_RSA
2024-01-31 13:20:53 -08:00
Hideki Miyazaki b256522f5b
fix WOLFSSH_NO_RSA 2024-01-27 13:03:10 +09:00
JacobBarthelmeh ab45a98d18 fix for building with QNX 2024-01-26 14:01:52 -07:00
JacobBarthelmeh 903bc98c34 update example client shell settings 2024-01-26 14:01:52 -07:00
JacobBarthelmeh 7d2b4c5e39 fix typo in macro guard 2024-01-22 15:10:53 -07:00
JacobBarthelmeh 0d480fa419 adjust shutdown for sending exit status cleanly 2024-01-19 09:18:41 -07:00
JacobBarthelmeh afe109acf8 client side handling of exit-status packet 2024-01-19 09:18:41 -07:00
John Safranek ec1248f14d
SFTP Test Maintenance
1. Modified SignalTcpReady() to test.h. Matched its prototype to the
   other functions for TcpReady.
2. Add a timeout in WaitTcpReady() specifically for Zephyr builds.
3. Misc few cleanups.
2024-01-03 13:24:10 -08:00
John Safranek 25a4984e59
Remove Example Server
The example server was never used. All new behaviors were added to the
echoserver only. Now with wolfSSHd, the server example can finally be
removed.

1. Remove the example server from the build.
2. Remove the file notes.md.
3. Update the readme.
2023-12-28 12:28:16 -08:00
John Safranek 948b545ad8
Release v1.4.15: Release Testing Fixes
1. Fix an instance in the example sftpclient where the size of something
   is treated as an int and may have caused trouble, per the pedantic
   compiler settings.
2. Changed a check for snprintf where we checked the lengths of
   everything before calling snprintf. Turned it around where we check
   the return of snprintf and error if the process would have output too
   much.
2023-12-22 14:43:34 -08:00
John Safranek f35cab9e86 SFTP Zero Byte Files
1. When putting a file with SFTP, the client should check that the
   requested file is a regular file based on its attributes.
 2. Add the attributes to check in the permissions.
 3. Add server checking for non-regular files and not allowing them to
    be opened for reading or writing.
2023-12-06 14:04:27 -08:00
John Safranek 9d92672931 SFTP Zero Byte Files
1. When getting a file with SFTP, the client should check that the
   requested file is a regular file based on its attributes.
2. Add the attributes to check in the permissions.
3. Add a new error for a non-regular file.
2023-12-06 14:04:27 -08:00
John Safranek 66dc60853c
Echoserver Select Timeouts
A couple changes to keep the echoserver from spin-locking.

1. The SFTP worker should wait for data if the channel window is full.
   If the client isn't sending a window adjust, it might be because of a
   human time scale issue. New timeout is 60 seconds.
2. When the echoserver is waiting for something from the user and the
   select times out, wait a second instead.
2023-10-31 10:21:44 -07:00
Juliusz Sosinowicz 37412ff50f Init zephyr support
- SSH
- SFTP
- SCP
2023-10-02 20:38:21 +02:00
JacobBarthelmeh 5780570880 limit additional nonblocking test 2023-09-29 16:12:21 -07:00
JacobBarthelmeh bbc9f9e157 add more test debug prints and better rekeying handling 2023-09-29 15:05:39 -07:00
JacobBarthelmeh a650415476
Merge pull request #582 from danielinux/fix_no_term
Fix compile errors when WOLFSSH_TERM is undefined
2023-09-25 09:45:18 -06:00
John Safranek 481c334a39
Fix No Term
1. Widened the scope of a couple of the guards for WOLFSSH_TERM.
2. Added a pthread_join for one of the threads in the example client.
2023-09-22 16:26:23 -07:00
John Safranek 5b094d6f43
Term Update
1. Change GetTerminalSize() to GetTerminalInfo().
2. Add the term variable to the things GetTerminalInfo() looks up.
3. Return the actual value of the environment variable TERM to the
   server. If one isn't present, default to "xterm".
4. Clean up the whitespace in SendChannelTerminalRequest().

Misc other changes:
1. Cleanup whitespace in the recently added function
   SendChannelOpenFail().
2. Add labels to the parameters in the prototype for
   SendChannelOpenFail().
3. Remove the CR addition for Windows in the example client. Causes the
   enter key to double-strike.
2023-09-19 11:40:23 -07:00
Daniele Lacamera 7ff76751f6 Fix compile errors when WOLFSSH_TERM is undefined 2023-09-18 08:23:30 +02:00
John Safranek 526ade03df
Linux-Semaphore
1. Made a similar change for Linux semaphores.
2. Moved the check for the quit flag in the windowMonitor.
2023-09-14 16:46:06 -07:00
John Safranek 503e1bb288
Mac-Semaphore
1. Add quit parameter to the example client's thread_args structure.
   This will be used to let the windowMonitor thread know the
   application is quitting.
2. If the windowMonitor's quit flag is set, it will exit and not call
   wait again.
3. Join the windowMonitor thread rather than cancel it.
2023-09-14 16:30:44 -07:00
John Safranek f35a92fd48
Nonblock Client Login Failure
When the example client is using non-blocking sockets, sometimes they
don't block. The monitor thread on the socket wasn't handling
WS_WANT_READ explicitly, and treated it as a fatal error. It should be
reset to WS_SUCCESS.
2023-09-13 09:26:29 -07:00
JacobBarthelmeh 57519c6a54
remove extra newline in debug message 2023-09-07 13:28:43 -06:00
JacobBarthelmeh 6e5b3c00d2 use WLOG for debug messages when checking peer IP address 2023-09-06 11:03:45 -07:00
John Safranek d4fa4ebd69
Merge branch 'master' into pull-reqs/f4021bb_All_the_filesystem-related_W_macros_accept_a_filesystem_context_pointer_as_first_parameter 2023-09-01 09:08:34 -07:00
JacobBarthelmeh 034ed7fe9f fix ups for format, spelling, includes, and string compare 2023-08-30 13:32:17 -07:00
JacobBarthelmeh 3e270cd0df still need to send initial terminal size with exec command 2023-08-30 09:08:25 -07:00
JacobBarthelmeh 0bd4539ef6 adjust req-pty terminal size sent with Windows 2023-08-30 09:08:25 -07:00
JacobBarthelmeh ecd47ddfd6 add OSX semaphore use, and fix warning 2023-08-30 09:08:25 -07:00
JacobBarthelmeh ab742ca766 wolfSSHd port to Windows
handling of terminal size adjustments

stub case for ECH virtual terminal command
2023-08-30 09:08:25 -07:00
JacobBarthelmeh bd1506db93 reset want read before attempting to read 2023-08-25 15:29:23 -06:00