- Without the guard, inner loops short-circuit and WS_SUCCESS
is returned without any verification.
- Add test case covering the new and existing bad-arg paths.
Issue: F-409
1. Collect all the test function wrappers in internal.c to one location
at the end of the file.
2. Update API test to check other algos if RSA or ECDSA are disabled.
3. Added guarded tests TestClientBuffersIdempotent() for WOLFSSH_NO_RSA
and WOLFSSH_NO_ECDSA_SHA2_NISTP256. If both are set, the test is
skipped.
Replace rewind() with fseek(f, 0, SEEK_SET) in the test helper
function. rewind() internally clears errno, which scan-build flags
as overwriting a previously unchecked errno value. fseek() to
offset 0 is functionally equivalent without the implicit errno
reset.
Static analysis indicated the potential to double-free a pointer in the
`wolfSSH_CTX_UseCert_buffer()` test. Loading the second cert after
freeing the first cert could fail and the test cleanup would free the
pointer again. Just set pointer to null after freeing.
Instantiate a wolfSSH_AGENT_CTX before invoking wolfSSH_AGENT_SignRequest so the regression tests exercise the intended paths instead of failing with WS_AGENT_NULL_E.
Exercise agent write failures, non-signature responses, oversized signatures, and the happy path to cover the recent wolfSSH_AGENT_SignRequest hardening.
1. Due to not checking the result of fseek(), it is possible to try to
malloc() -1 bytes of storage. Checking the return from fseek() and
erring if negative.
2. Changing the check between the result of fseek() and fread() to match
signedness. Adding some casting, as at that point the fseek() result
is always positive.
Fixes CIDs:
573009 572928 572868
1. Fix some resource leaks during error conditions where a socket or a
file descriptor doesn't get closed in all error cases.
2. In wolfSSH_SFTP_RecvOpen(), initialize the file descriptor.
3. For 572902, the error case resource leaks are fixed. There's still an
issue to resolve for storing the FD for use later.
Fixes CIDs:
572856 572902* 573012 573019 573021 573076
1. Modify AssertNotNull() to use the same pattern as AssertNull(). The
macro assigns the pointer to a local variable and that is checked.
Fixes CIDs:
537020 573008 573010 573011 573013 573014 573015
573016 573017 573018 573022 573023 573024
This implements Keyboard-Interactive authentication.
Adds an additional callback set by `wolfSSH_KeyboarAuthPrompts()` which
will set a callback in the server to ask the application to provide the
prompt details for the client.
1. For the ASCII and Wide versions of types and functions, make sure
the wolfSSHd is being consistent using them.
2. In SFTP, use WSOCKETCLOSE to close the socket. Use the correct type
for the socket.
3. Add parens around part of a ternary operator check to clear up some
ambiguous order of operations.
4. Add a variable initializer for a COORD structure.
5. Add parameter checks to the Base16_Decode function.
6. Fix a double-freed handle.
7. Clean up a bunch of build warnings.
1. The wrapper for the pragma PRAGMA_GCC_DIAG_PUSH and its friends are
not set up to be used like a function. Remove the semicolons after
their usage. (Clang doesn't care, but MSVC does.)
1. Add APIs for setting the algorithm lists used in the KEX initization
messages.
2. Add API to check if a specified algorithm name is available.
3. Add APIs to list available algorithms.
4. Add algorithm lists to the WOLFSSH_CTX and WOLFSSH structures.
5. Added a local function to fetch algorithm strings based on their type and
an index.
6. Added starter tests for the algorithm functions.
7. Move the canned algorithm list strings before CtxInit() so they may be
used for default lists in the WOLFSSH_CTX.
8. Carry over the algorithm name lists from WOLFSSH_CTX to WOLFSSH.
9. Remove dead code.
10. Add parameter names to a few function prototypes.
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.
1. In the API test for SFTP, change the amount of the file requested to
the limit WOLFSSH_MAX_SFTP_RW.
2. The check for want read on the exit of the server worker should clear
ret if it is want read.
1. Found a few cases where disabling RSA made some things either not
build or run correctly.
2. Hushed a few unused variables in gated-disabled situations.
3. Moved a temp variable closer to where it is used.
1. Update the release date in the ChangeLog.
2. Move some compiler guards around to hush warnings depending on the
build options.
3. Fix a string name for ECDSA P521 algo.
4. Fix a stray static function definition.
5. For FIPSv5 builds, add CAST tests to the API test and testsuite.
6. Add the wolfSSH_Init() and wolfSSH_Cleanup() to the unit test.