Commit Graph

349 Commits (53e14bd3c9c81aafe0a413216d4d186ee5dbe091)

Author SHA1 Message Date
Chris Conlon fb8b9d5ee3 scanbuild: fix for value is never read 2018-05-03 15:22:51 -06:00
Chris Conlon f87adbd82c scanbuild: fix for possible null pointer dereferences 2018-05-03 15:19:39 -06:00
Chris Conlon d2b96e9335 scanbuild: fix begin var value never read warning 2018-05-03 15:10:32 -06:00
Chris Conlon c0cb237881 scanbuild: fix bufName dead assignment 2018-05-03 14:56:27 -06:00
Chris Conlon 634a356993 scanbuild: fix for sigKeyBlock.useRsa evaluating to garbage 2018-05-03 14:51:53 -06:00
Chris Conlon 6ff33be668 remove hard tabs, gcc 7.2.0 complains 2018-05-03 14:32:30 -06:00
Jacob Barthelmeh b4e02d77b1 check for overflow case 2018-04-10 13:19:39 -06:00
John Safranek 6d6c0ed23b
Merge pull request #53 from JacobBarthelmeh/fuzz
additional sanity checks on buffers
2018-04-10 09:45:53 -07:00
Jacob Barthelmeh a8ddc51331 buffer size check with sig verify 2018-04-09 13:56:22 -06:00
Jacob Barthelmeh f8a8fd51fa additional sanity checks on buffers 2018-04-06 16:30:54 -06:00
John Safranek 5e15ae7061
Merge pull request #51 from JacobBarthelmeh/testing
Adds extra checks for AES buffer size and update verify mac return error
2018-04-05 15:14:13 -07:00
Jacob Barthelmeh 7ef8b02e90 extra check on buffer size before AES-CBC encrypt/decrypt 2018-04-05 15:16:57 -06:00
Jacob Barthelmeh e3228ee300 return value for verify mac result 2018-04-05 15:16:48 -06:00
John Safranek 989d0f3d55
Merge pull request #47 from JacobBarthelmeh/testing
use of buffer keys in examples with no filesystem
2018-04-05 13:59:56 -07:00
John Safranek ed37ae9fd0
Merge pull request #48 from JacobBarthelmeh/pic32
initial port to pic32
2018-04-05 13:59:39 -07:00
Jacob Barthelmeh ed2f9c6cbe add port to test.h file 2018-04-05 13:21:23 -06:00
John Safranek 2cea13ab52
Merge pull request #49 from JacobBarthelmeh/fuzz
additional sanity checks
2018-03-30 17:49:21 -07:00
Jacob Barthelmeh ce1ced27dc additional sanity checks 2018-03-30 17:05:04 -06:00
Jacob Barthelmeh bb668fe743 use of buffer keys in examples with no filesystem 2018-03-30 10:45:24 -06:00
Jacob Barthelmeh ae70eb7b44 initial port to pic32 2018-03-30 10:33:25 -06:00
Chris Conlon 48590f6896
Merge pull request #44 from ejohnstown/scp-submission
SCP Contribution
2018-03-29 15:11:20 -06:00
John Safranek 5b739831fc
Merge pull request #46 from JacobBarthelmeh/testing
update SHA256 name
2018-03-27 14:51:59 -07:00
Jacob Barthelmeh 3b6b70adeb update SHA256 name 2018-03-27 14:42:06 -06:00
JacobBarthelmeh 2e42701c35
Merge pull request #45 from ejohnstown/bugs
Bug Fixes
2018-03-27 14:04:09 -06:00
John Safranek b578aadc6d SCP Contribution 2018-03-26 11:09:21 -07:00
John Safranek bbbc14ea6b Bug Fixes
1. Fix an incorrect memory free when releasing a bad WOLFSSH object.
2. Pass correct context to the I/O Send Callback function.
2017-12-01 12:04:56 -08:00
dgarske fe3f19190e Merge pull request #43 from ejohnstown/logging2
Logging
2017-10-04 15:10:52 -07:00
dgarske 83db50f7b6 Merge pull request #40 from ejohnstown/testsuite
Test Suite
2017-10-04 15:10:36 -07:00
John Safranek e2fc544eac Logging
Removed the `INLINE` tag from the accessor `wolfSSH_LogEnabled()`, it was causing trouble under Windows.
2017-10-04 14:14:00 -07:00
JacobBarthelmeh 7361c98314 Merge pull request #42 from ejohnstown/channelclose
Channel Close
2017-09-29 17:25:14 -06:00
John Safranek 911a00ae2c Channel Close
1. Renumbered a few error codes.
2. Added an error code for stream reading when the channel is closed during the read action.
2017-09-29 16:11:04 -07:00
JacobBarthelmeh 4715a00d58 Merge pull request #41 from ejohnstown/logging
Logging Update
2017-09-29 15:37:16 -06:00
John Safranek fe14efc62d Logging Update
1. Added a logging function that always works whether or not debugging is enabled.
2. Modified the WLOG macro to always be built in, but disables cleanly.
2017-09-29 14:15:38 -07:00
John Safranek 16b4a31cfb Test Suite
1. Add an automated test suite.
2. Refactor the existing test and example code to be better components for the test suite.
3. Rename some of the internal functions used by the examples and test suite.
4. Echoserver now only handles one connection at a time, has option to exit after single connection.
5. Echoserver can do the port zero trick for the test suite.
6. Some whitespace changes.
7. Added a `(void)` to a variable to hush an unused assignment warning.
2017-09-29 13:48:40 -07:00
Chris Conlon 815d2919d5 Merge pull request #39 from ejohnstown/release-v1.2.0
wolfSSH v1.2.0
2017-09-26 14:16:11 -06:00
John Safranek 776ec729ca Update the configure script and readme for v1.2.0. 2017-09-26 11:47:47 -07:00
dgarske 524e56e999 Merge pull request #38 from ejohnstown/client
Client
2017-09-26 11:28:49 -07:00
John Safranek 65fb16ddc4 Client
1. Added support to the library for clients.
2. Added example client.
3. Added VS solutions for building client example.
4. Added ECC client keys. Renamed existing keys.
5. Since defunct server is copy of echoserver, updated it.
2017-09-25 14:45:03 -07:00
dgarske 8e2d1056a0 Merge pull request #37 from ejohnstown/ide
Visual Studio IDE Support
2017-09-18 11:46:13 -07:00
John Safranek 7e08469794 IDE DLL Builds
1. Moved some of the files around.
2. Updated the readme.
3. Added a property file with a set of user macros to point at wolfSSL include and build directories.
4. Updated all the project files to use the new user macros.
5. Add guard around including options.h in the echoserver.
2017-09-15 16:46:14 -07:00
John Safranek e471635373 IDE
1. Added DLL builds.
2. Cleaned up some of the build configuration.
3. Updated the README files for building.
4. Renamed the function ProcessBuffer() with a prefix due to a conflicting name with wolfSSL.
5. Added test.h to include.am.
6. Moved the user_settings.h for wolfSSL into the wolfcrypt directory.
7. Changed the echoserver so that it binds to INADDR_ANY.
2017-09-13 15:33:23 -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 60d945699a IDE
Add the echoserver to the project.
2017-08-31 13:25:03 -07:00
John Safranek faf3f45ed8 IDE
Updated the two projects with similar settings so they build without warnings. The wolfSSH library project needs the wolfSSL header path added before building. The api-test project needs the wolfSSL library added before building.
2017-08-31 11:26:24 -07:00
John Safranek a48a13e6ba IDE
1. Added a user_settings.h file to be used with building wolfSSL.
2. Removed misc.c from the wolfSSH library project.
3. Added the WOLFSSL_USER_SETTINGS define to the wolfSSH library project.
4. Replaced vsnprintf() and localtime_r() with macros to use the correct functions for Win32 builds.
5. Replaced the misc.c warning with the VS style of doing it if building for Win32.
6. Defined USE_WINDOWS_API if _WIN32 is set.

Note: The wolfSSH library builds in 32-bit Debug mode. To do so, you need to add the directory holding the wolfSSL headers to the AdditionalIncludeDirectories list.
2017-08-31 11:02:23 -07:00
John Safranek 6ac63009dc IDE
1. Adding the VisualStudio solution file.
2. Updated gitignore with the VS debris.
3. Adding project files for wolfssh library and apt-test.
2017-08-30 17:03:41 -07:00
John Safranek 05ee7b34c7 IDE
Add initial IDE build support with Windows VisualStudio. Just put in
the autoconf includes and a readme.
2017-07-21 14:25:38 -07:00
John Safranek 1d594eba1f ECC (#35)
* Renamed the server key files to indicate they are rsa keys.
* Add ecc key files for the server.
* Move ProcessBuffer from ssh.c to internal.c.
* Remove #includes for headers from files that are not used.
* Added support for KEX algorithms: ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521
* Updated readme
* Added support for the public key algorithm ecdsa-sha2-nistp256.
* Added support for public key algorithms ecdsa-sha2-nistp384 and ecdsa-sha2-nistp521.
* The Key Algorithm list for the KEX picks a single value to offer based on the private key used.
* Added private keys on curves nistp384 and nistp521. The curve nistp256 is used as the default.
* Added the new ecc keys to include.am
2017-07-14 12:24:38 -07:00
dgarske 4106ce3186 Merge pull request #34 from ejohnstown/aes-gcm
Add AES-GCM
2017-07-11 11:13:56 -07:00
John Safranek 686184d34d Update echoserver for an option to allow multiple connections
or single connections to ease memory testing.
2017-07-11 09:33:33 -07:00