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.
The test for wolfSSH_SFTP_SendReadPacket() expects to receive the
requested amount of data in response. The only guarantee is that up to
the requested amount of data is returned. Change the test so it checks
the return code is greater than 0, and less-than-equal-to the requested
amount.
1. Regroup some of the test code inside the guards to disable it.
2. Remove the SFTP testing if single threaded is enabled.
3. Disable the testsuite if single threded is enabled.
1. Make whitespace in asserts consistent.
2. Make asserts consistent with wolfSSL's.
3. Added the pointer asserts.
4. Wrapper around abort() to disable it.
1. Remove the flag NO_MAIN_FUNCTION from the test tools.
2. For unit and api tests, follow the patter for the testsuite with its
NO_TESTSUITE_MAIN_DRIVER check.
1. Move ConvertHexToBin() and Base16_Decode() into test.h.
2. Add a description for the options in test.h.
3. Add a static to the hexDecode const array for Base16_Decode().
4. Add the check for options.h/user_settings.h to api and unit tests.
1. Rename ApiTest() and UnitTest() with wolfSSH prefix.
2. Modify wolfSSH_ApiTest() and wolfSSH_UnitTest() to take argc and argv
parameters.
3. Add main functions to the unit and api tests, that can be left out of
the build with the flag NO_MAIN_FUNCTION.
The echoserver will check the return on the shutdown function for
success and socket error. Socket error is for the peer already having
shut down their socket. This is mapped back to success so it shuts down
cleanly. Add this behavior to the API test client in the test for SFTP
recv read command test.
1. Allow user to add multiple server keys to the CTX up to a limit.
2. Clear the list of server's keys when releasing the CTX.
3. Update the API test case.
4. Server key algo list based on keys loaded.
5. Server uses key requested by client.
6. Change echoserver to load ECC and RSA key, -E option to select order.
7. Added a function to identify keys, and another to identify certs.
8. Added a function to add keys or certs to the list of keys and certs.
9. Fix return value for MAC Algo C2S match fail to the correct value.
1. Update wolfSSH_SFTPNAME_readdir() to have a special case getting
the drive letters at root in Windows.
2. The Win32 APIs can use forward slashes, but cannot have one at the
beginning of the path before the drive letter. Add a trim function
to remove the leading slash in the SFTP paths.
3. Update echoserver to always set the default SFTP path to either the
provided command line option or to the CWD for the echoserver run.
4. Get the RealPath for the default path
5. Tweak wolfSSH_RealPath() to handle some Windows cases.
6. Added more test cases.
1. Add some more test cases to the RealPath() test.
2. Change the API for the function wolfSSH_RealPath(). It doesn't need
the currentPath. Non-absolute paths are relative to defaultPath.
3. If defaultPath isn't present, use "/".
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.
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.
1. If RSA is disabled in the wolfCrypt build, the RSA related code
in wolfSSH shall be disabled.
2. Examples will force themselves to use ECC if RSA is disabled.
Also includes some bug fixes.
1. Add a function that returns a pointer to a session's username string.
2. Add a function to set a "raw" username copied from an incoming packet.
3. Add tests for 1 and 2.
4. Server saves a copy of the username on successful authentication.
5. Fix bug with GetString() where it would choke on a 0 length string.
6. Clean up the termios macros and mode creation.
7. Add some options for when WOLFSSL_VXWORKS is set.
1. Added API test for wolfSSH_CTX_UsePrivateKey_buffer().
2. Added the string->binary code to the API test.
3. Fixed a bug in UsePrivateKey(). When loading a new key into a CTX that already has a key, also reset useEcc.
4. Added a test case for wolfSSH_new() returning a null.
5. The test tools can find the -D flags for SFTP and SCP.
POSIX uses an int for a file descriptor. In Windows, they use a SOCKET
type which isn't an int, it is a unsigned long. Changed the types of
the file descriptors to a WS_SOCKET_T, which is either an int or a
SOCKET. Added a unit test.
update client example remote command execute for Windows
add wolfSSH_stream_peek and console translation
improvements to console translation and add client side psuedo terminal
windows client -c fix, clang build, sanity check on side for exec
fix for warnings with VS 2010 build
cast return value of WSTRLEN
update termios guard and fix for scan-build check
advance extended data buffer index on read
fix for error.h after rebase
64-bit value is an array 2 of 32-bit values. In SFTP, changed up all the
uses (most) of word64 to word32 arrays. Not all systems we support have
64-bit types available.
1. Added Windows Visual Studio build solution. Includes projects for:
* wolfSSH static library
* echoserver
* unit-test
* api-test
* 32- and 64-bit debug and release builds for all
2. Made necessary tweaks including adding some wrapper functions so the code compiles for both Linux/macOS and Windows.
3. Fixed a bug in the KDF test where the output buffer wasn't updated when SHA-256 was added.
4. Added the fallthrough attribute for GCC7.
5. Replaced all uses of `uint8_t`, `uint16_t`, and `uint32_t` with the wolfCrypt provided `byte`, `word16`, and `word32`.
6. Split the new channel function into new and init.
7. Added some ECC keys for authentication testing.
8. Moved some functions and includes around.
9. Removed the keying state machine and replaced with a flag.
10. Added rekey trigger if the client sends *CTRL-F* to echoserver.
11. Moved the sequence number increase outside `CreateMac()`. Incremented if the packet was successfully created. This way the sequence number is incremented when using AES-GCM.
12. Removed the redundant function `SendText()`.
13. Renamed the `clientId` related functions and data members to `protoId` to keep things role agnostic.
14. Changed all references of `clientKey` and `serverKey` to `keys` and `peerKeys`.
15. Updated `GenerateKeys()` to generate `keys` and `peerKeys` appropriately based on the endpoint side.
16. Added the wolfSSL style _test.h_ file to group shared example functions in one place.
17. Changed the echoserver to be similar to wolfSSL's where the code may be included without the main function in another executable.
Note:
This commit is a squash of more than a dozen commits. IDE support was added to the client branch, but the client branch is on hold. There were many changes in the client branch that are needed going forward. The code at the head of the client branch was copied over to the IDE branch, and the client code either deleted or removed from the build.