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.
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.
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.
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.
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
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.
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.
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.
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.