Commit Graph

17 Commits (d7cd61d926bff2802310b94652693a7146b56e7f)

Author SHA1 Message Date
John Safranek b63d3c4914
More Options
Added many more guards for algorithms that may be disabled in wolfCrypt
including DH, AES-GCM-CTR-CBC, SHA1, ECC, RSA, etc.
2020-10-13 17:42:02 -07:00
John Safranek cb277a92fc
Error Codes
1. Rename an error code that was prefixed with WC_ instead of WS_.
2. Add a new error code for missing callbacks.
3. Remove a redundant error code. Channel pending appeared twice.
4. Fix the error code vs string test.
2020-03-12 13:30:08 -07:00
Chris Conlon 83f8372458 update copyright to 2020 2020-01-03 15:16:47 -08:00
John Safranek cacd19819b
Maintenance
1. Clean up some scan-build complaints from the unit test. It was
potentially using memory after it was freed.
2019-12-05 13:43:46 -08:00
John Safranek 9aaebbb146 Update the copyright to 2019 2019-04-08 10:24:08 -07:00
John Safranek 1d051e1a84 Memory Update
1. Renumbered the dynamic memory type IDs so they don't conflict with wolfCrypt/wolfSSL.
2. Renumbered the error codes so they don't conflict with wolfCrypt.
3. Fixed a couple of typos when using dynamic memory type IDs that were missed due to default memory handling being used.
2019-04-05 11:36:25 -07:00
John Safranek b97b237695 Static Analysis Fixes
Ran the clang static analysis and infer and fixed most of the reported
items. There were many that infer found that looked like false
positives.
2018-11-15 13:28:42 -08:00
John Safranek 8a13a829df scan-build fixes
1. Didn't initialize errFd before calling select() in wolffwd.
2. Wasn't checking the accepted appFd in wolffwd.
3. For the test_KDF() unit test, a call to ConvertHexToBin() could succeed and leave eKey NULL, and pass it to memcmp().
2018-09-13 17:19:39 -07:00
John Safranek f08628af2b Scan Build Fixes
1. In the echoserver, free the thread context before exiting app on error.
2. In the unit test, when checking the KDF, initialize the sizes to zero
and the pointers to NULL after freeing them.
2018-08-15 12:38:20 -07:00
John Safranek 3ab6f4fbd1 reroll the error string test to check for unknown string and to count the inner loop correctly 2018-06-06 16:02:39 -07:00
John Safranek 8477c4acd6 fix a handful of clang static analysis warnings 2018-06-06 15:04:59 -07:00
John Safranek c77345fc6c Error Code Unit Test
1. Add a unit test to check all error codes have strings.
2. Add public function to return the error string for an error code.
3. Fill in the missing error strings.
4. Fix an error string (change a "verify" to "create").
2018-05-10 13:55:59 -07:00
John Safranek 1498bc5409 IDE Support
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.
2017-09-12 14:42:23 -07:00
John Safranek 9c8a77c240 1. Add a separate API test.
2. Eliminate the unit.h file, included into api.c.
2017-06-14 09:10:35 -07:00
John Safranek 24b19daa16 1. Copied over some of the test infrastructure from wolfSSL.
2. Added API test cases for only wolfSSH_Init and wolfSSH_Cleanup.
2017-06-13 10:35:11 -07:00
John Safranek c3d0c895d2 add stub for the API test 2017-06-13 09:15:44 -07:00
John Safranek efeb9a41b2 rename directory test as tests 2017-06-13 09:05:57 -07:00