Commit Graph

2317 Commits (78e38999a19d82ffadd6c1866109cf02899bc609)

Author SHA1 Message Date
John Safranek 78e38999a1 Fix Test Term Size
When running the build tests, the terminal size gets set to 0x0. When
then tests finish, things like vim start to misbehave until you change
your term window size.

1. Echoserver will not change the terminal size when in echo mode.
2. Do not update the modes when the echo server is not in echo mode.
3. Do not set the terminal update callback context when the echo server
   is not in echo mode.
4. Update the guards around the above three items to match the guards for
   the modes update function.
2026-01-13 11:33:03 -08:00
John Safranek fa648eccd0
Merge pull request #864 from JacobBarthelmeh/windows_sshd 2026-01-09 17:18:10 -07:00
David Garske af1dac9910
Merge pull request #866 from JacobBarthelmeh/warninigs
fix for warning with snprintf use in test case
2026-01-09 13:54:28 -08:00
JacobBarthelmeh 069dcc0949 fix for warning with snprintf use in test case 2026-01-09 10:56:11 -07:00
JacobBarthelmeh 9097542760 use sizeof for getting the command buffer size 2026-01-09 10:40:56 -07:00
John Safranek ea563b5bcf
Merge pull request #865 from JacobBarthelmeh/windows
improvements to wolfSSH_CleanPath function used with SCP
2026-01-08 12:12:08 -07:00
JacobBarthelmeh adcb7e1588 add sanity check for Windows terminal resize 2026-01-06 16:15:27 -07:00
JacobBarthelmeh 4cc065b241 improvements to wolfSSH_CleanPath function used with SCP 2026-01-06 16:08:12 -07:00
JacobBarthelmeh 7d48298436
Merge pull request #863 from ejohnstown/release-1.4.22-2
Release v1.4.22
2026-01-05 18:44:44 -07:00
John Safranek 7f6b5b373e Fix String References
1. When looking up a name in the name-ID map, don't bother checking if
   the name is NULL.
2. The GetString functions should fail if the destination string
   parameter is NULL.
3. The GetString functions should not bother to copy an empty string
   found in the data stream.
4. When checking the public key type provided by the callback, do not
   check it when it is NULL.
2026-01-05 15:24:40 -08:00
JacobBarthelmeh fb544737f7
Merge pull request #862 from ejohnstown/strings
Fix String References
2026-01-05 14:03:30 -07:00
John Safranek 864c68afd7 Release v1.4.22
1. Update ChangeLog for release date.
2026-01-05 11:06:46 -08:00
John Safranek 48743008f8 Fix String References
1. Modify GetStringAlloc() to also take the string length as provided by
   GetUint32().
2. New use of GetStringAlloc() was misusing the heap. Fix using the
   updated GetStringAlloc() function.
3. For a pty-req, directly update the heights, widths, and mode.
2026-01-05 11:06:14 -08:00
JacobBarthelmeh deddd3309c
Merge pull request #860 from ejohnstown/release-1.4.22-1
Release v1.4.22
2025-12-30 17:12:29 -07:00
John Safranek 19389809e5 Release v1.4.22
1. Update ChangeLog for last minute PR/Vuln fix.
2025-12-30 15:51:21 -08:00
John Safranek b7c26d273a
Merge pull request #859 from anhu/offby1
Fix an off by one error.
2025-12-30 13:05:25 -07:00
Anthony Hu 65f01e7c7a Fix an off by one error. 2025-12-30 11:03:31 -05:00
JacobBarthelmeh 3e538274df
Merge pull request #858 from ejohnstown/release-1.4.22
Release v1.4.22
2025-12-29 22:02:31 -07:00
John Safranek 8951bd9209 Release v1.4.22
1. Update copyright date to 2026.
2025-12-29 16:53:33 -08:00
John Safranek ef2d4228ba Release v1.4.22
1. Update configure.
2. Update ChangeLog.
3. Let configure link in the keys that are needed for the regression test.
2025-12-29 16:53:19 -08:00
David Garske b5c9751646
Merge pull request #857 from ejohnstown/getstrings
Getting Strings
2025-12-18 13:53:39 -08:00
John Safranek be7784c781 Getting Strings
1. Rewrite GetString() and GetStringAlloc() in terms of GetStringRef().
2. Change GetStringRef() to allow for 0 length strings.
3. Update DoChannelRequest() to use GetStringAlloc() when reading the
   modes from the packet.
2025-12-18 13:27:06 -08:00
John Safranek f1b5b78a98
Merge pull request #847 from miyazakh/sftpclient_RX72N
sftp client example for Renesas RX72N
2025-12-18 09:44:09 -08:00
JacobBarthelmeh 185fe295ed
Merge pull request #856 from LinuxJedi/fix-worker-deadlock
Prevent worker send stall on window backpressure
2025-12-16 16:16:17 -07:00
Andrew Hutchings 05ea1dc3fc Prevent worker send stall on window backpressure
Handle receive-before-send in wolfSSH_worker so window-adjust packets
are processed when the send path is back-pressured, preventing SFTP
stalls with small-window clients.

Add regression that forces WANT_WRITE/WANT_READ paths without relying
on a TTY to guard against deadlock.

Fixed ZD 20958
2025-12-16 17:41:08 +00:00
Eric Blankenhorn 4c7ca0e9eb
Merge pull request #851 from lealem47/vs_fips
Add FIPS configurations to Visual Studio project
2025-12-15 16:35:53 -06:00
Lealem Amedie 1adcdebc1e Documentation feedback 2025-12-15 14:59:32 -07:00
Daniel Pouzzner 3636446baf
Merge pull request #852 from divinity76/fix-sys-errno
replace sys/errno.h with errno.h
2025-12-15 10:42:26 -06:00
Daniel Pouzzner 8a7189d24b
Merge pull request #848 from divinity76/patch-1
fix error: implicit declaration of function 'wc_SSH_KDF'
2025-12-15 10:41:59 -06:00
Daniel Pouzzner 6e9775204a
Merge pull request #855 from ejohnstown/vvv
Out Of Order Messaging Checking
2025-12-15 10:33:48 -06:00
Lealem Amedie 7ed7cd6a7f Add some documentation for the FIPS configs 2025-12-12 10:25:39 -07:00
John Safranek 2086f34ff3 Out of Order Message Handling
1. Always set the expected message right before sending. If the send
   fails, it is either because the socket is closing, or it is wanting
   to block. If it is wanting to block, we still want to check the next
   message as expected.
2025-12-11 10:43:35 -08:00
Hideki Miyazaki 63ed4eb072 Addressed code review comments
- enable TSIP
 - clean up user_settings.h
2025-12-10 04:51:19 +09:00
Hideki Miyazaki 344bba5e51 Addressed review comments
- renamed wolfstp_util.c to wolfsftp_util.c
 - removed unnecessary if condition
2025-12-10 04:51:19 +09:00
Hideki Miyazaki 23cc902466 update README 2025-12-10 04:51:19 +09:00
Hideki Miyazaki 9c9d1b0ee1 sftp client example for Renesas RX72N 2025-12-10 04:51:19 +09:00
John Safranek 03ca9221a3 Zephyr
1. Exclude the file regress.c from the Zephyr testing sample. The test
   is covered in many other environments already. The test needs some
   retooling to fit in with the Zephyr build, as it is a standalone
   application with a main() function and it depends on a testing build
   of libwolfssh.
2. Whitespace.
2025-12-09 09:36:38 -08:00
John Safranek 2e5484f36f Server Out of Order Message Handling
1. Updated the checking for the server to be more like the client's
   checking.
2025-12-09 09:36:38 -08:00
Andrew Hutchings dee1c59f26 Fix double-free crash and socket-close spin 2025-12-09 09:36:38 -08:00
Andrew Hutchings 5ae5c250e2 Add tests and fix issues 2025-12-09 09:36:38 -08:00
John Safranek a87ab400b3 Guard out IsKeyingAllowed() as it is stepping on the wrong messages. 2025-12-09 09:36:38 -08:00
John Safranek 73b165651c Client Out Of Order Messaging Checking
1. Add macro for logging an expected message.
2. Add an expected message ID to the HandshakeInfo.
3. Add a message ID for "none (0)".
4. Add a check in IsMessageAllowedClient() for the expected message ID.
   Clear it if successful.
5. The KEXDH messages sent to the server have expected responses. Set
   them if sending the message is successful.
6. Add the set of message ID ranges and macros for testing if a message
   ID is in a specific range.
7. Add flags for having sent the kexinit message and received it. Tweak
   the checks for isKeying and these flags.
8. IsMessageAllowedClient() to check for appropriate messages at the
   appropriate time during the connect.
2025-12-09 09:36:35 -08:00
David Garske a473a05e42
Merge pull request #854 from miyazakh/fix_uninitialized_var
fix uninitialized authData
2025-12-08 07:52:13 -08:00
Hideki Miyazaki c1cfad706d fix uninitialized authData 2025-12-06 12:40:27 +09:00
Lealem Amedie dc9321b714 Add FIPS configurations to Visual Studio project 2025-12-05 16:45:11 -07:00
David Garske b2c683dd3c
Merge pull request #839 from JacobBarthelmeh/logging
define WLOG to a no-op when not used with debugging
2025-12-04 18:27:29 -08:00
JacobBarthelmeh 92cb91664d define WLOG to a no-op when not used with debugging 2025-11-25 09:24:51 -07:00
hanshenrik 44dc148dbd replace sys/errno.h with errno.h
Historically, some systems have used <sys/errno.h> in place of <errno.h>, but the C standard,
 all the way back to C89/Ansi C, specifies that the correct name is `errno.h` -
and most modern compilers create a sys/errno.h compatibility shim sys/errno.h -
but musl-gcc does not have this compatibility shim,
 reasoning that sys/errno.h is non-standard, and fails to compile:
```
$ CC=musl-gcc ./configure --enable-static --disable-shared --enable-scp --enable-sftp --enable-shell --with-wolfssl=wolfssl/install-musl
(...)
$ make
make -j17  all-am
make[1]: Entering directory '/home/hans/projects/wolfssh'
  CC       examples/client/common.o
  CC       examples/client/client.o
  CC       src/libwolfssh_la-ssh.lo
  CC       src/libwolfssh_la-internal.lo
  CC       src/libwolfssh_la-log.lo
  CC       src/libwolfssh_la-port.lo
  CC       src/libwolfssh_la-io.lo
  CC       src/libwolfssh_la-wolfscp.lo
  CC       src/libwolfssh_la-wolfsftp.lo
  CC       examples/echoserver/echoserver.o
  CC       src/libwolfssh_la-wolfterm.lo
  CC       examples/sftpclient/sftpclient.o
  CC       examples/scpclient/scpclient.o
In file included from examples/echoserver/echoserver.c:91:
/usr/include/x86_64-linux-musl/sys/errno.h:1:2: error: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Werror=cpp]
    1 | #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
      |  ^~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:1452: examples/echoserver/echoserver.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/hans/projects/wolfssh'
make: *** [Makefile:1020: all] Error 2
```

so, unless we need to support pre-C89 (35+ year old C) compilers,
we can just replace sys/errno.h with errno.h.
2025-11-22 17:40:20 +01:00
divinity76 91d5c0a052
fix error: implicit declaration of function 'wc_SSH_KDF'
hopefully resolves https://github.com/wolfSSL/wolfssh/issues/781
when compiling with
./configure --enable-static --disable-shared --enable-scp --enable-sftp --enable-shell --enable-cryptonly --with-wolfssl=wolfssl/install/

I got:
$ make -j20
make -j17  all-am
make[1]: warning: -j17 forced in submake: resetting jobserver mode.
make[1]: Entering directory '/home/hans/projects/wolfssh'
  CC       src/libwolfssh_la-internal.lo
src/internal.c: In function 'GenerateKey':
src/internal.c:2348:15: error: implicit declaration of function 'wc_SSH_KDF'; did you mean 'wc_HKDF'? [-Werror=implicit-function-declaration]
 2348 |         ret = wc_SSH_KDF(hashId, keyId, key, keySz,
      |               ^~~~~~~~~~
      |               wc_HKDF
src/internal.c:2348:15: error: nested extern declaration of 'wc_SSH_KDF' [-Werror=nested-externs]
cc1: all warnings being treated as errors
make[1]: *** [Makefile:1483: src/libwolfssh_la-internal.lo] Error 1
make[1]: Leaving directory '/home/hans/projects/wolfssh'
make: *** [Makefile:1020: all] Error 2
2025-11-13 10:25:33 +01:00
David Garske 967d6c59ff
Merge pull request #846 from JacobBarthelmeh/sftp
Fix for interop case with SFTP
2025-10-24 09:44:15 -07:00