Commit Graph

274 Commits (b530d263577c295f3d1b1627e7fd54d4e1d148cd)

Author SHA1 Message Date
John Safranek 95a435055f Update a few debugging strings were copied and pasted. 2017-06-12 10:17:54 -07:00
John Safranek 711a52e4ce Adding the macOS DS_Store filename to the gitignore. 2017-05-30 16:16:16 -07:00
John Safranek ff14fbaef8 In GetString() added a check for the size of the destination buffer. 2017-05-30 14:38:15 -07:00
John Safranek a4285571f4 Update the banner
1. Add the banner to the WOLFSSH_CTX.
2. Moved the canned banner to be a debug option.
3. Default the banner to NULL of zero length.
4. Use the banner stored in the WOLFSSH_CTX.
5. Add an accessor to set the banner to a C string.
2017-05-30 14:25:41 -07:00
John Safranek 3d79d4ffa3 Global Request Message
1. Added parsing of the Global Request message. Will log the request
   name string.
2. Send global request failure response if reply is requested.
(This was an issue with a particular SSH client.)
2016-11-11 12:00:22 -08:00
toddouska 87eb3ad26d Merge pull request #24 from ejohnstown/chan-success
Channel Success Message
2016-10-25 14:45:45 -07:00
John Safranek c2480eb46c Add function to send Channel Success and Failure to the client when
receiving Channel Request messages, when requested.
2016-10-25 14:14:05 -07:00
toddouska ad80b4b613 Merge pull request #23 from ejohnstown/wc-fix
wolfCrypt Fix
2016-10-25 12:19:30 -07:00
John Safranek 6af24baf38 Fixed a missed set of wolfCrypt functions whose return values weren't getting checked. 2016-10-24 15:24:04 -07:00
toddouska a612d6cafe Merge pull request #22 from ejohnstown/rekeying
Rekeying
2016-10-24 15:19:05 -07:00
John Safranek 4ff6a525b6 Update README with the change of name of the keys directory. 2016-10-24 15:10:22 -07:00
John Safranek b76f376381 scan-build fix. clear a whole buffer before filling it before checking
with ConstantCompare().
2016-10-24 15:08:58 -07:00
John Safranek c802b331bd Check all return codes on wolfCrypt functions. 2016-10-24 15:03:54 -07:00
John Safranek c183000b93 1. Manage case where Client KEX Init arrives in same recv() as the
client version string.
2. Shrink the receive buffer after reading the client version
   string.
3. Resize the buffer correctly when needed data is already in the input
   buffer and grab the remainder as expected.
2016-10-24 13:42:58 -07:00
John Safranek 718a4f4b40 cleanup accept state machine 2016-10-24 11:51:42 -07:00
John Safranek ccc1101612 Fix where the result of sending a channel close was getting replaced
with success.
2016-10-23 16:14:17 -07:00
John Safranek 184182d152 Prep for v1.0.0
1. Bump version number.
2. Update readme.
3. Move the coding standard to a notes file.
2016-10-23 16:06:08 -07:00
John Safranek bc9eff91d6 1. Rename function ProcessReply(), conflicts when linking against
wolfSSL not using cryptonly mode.
2. Send server version before expecting client version.
2016-10-23 15:43:08 -07:00
John Safranek 5b07c8cb1d 1. Parse the Channel EOF message.
2. Parse the Channel Close message, and reply with a Channel Close.
2016-10-23 14:46:34 -07:00
John Safranek 184b2218d4 Rekeying Update
1. Add the Trigger Rekeying function.
2. Fixing the keying state machine.
3. Modify echoserver for rekeying.
2016-10-21 13:40:35 -07:00
John Safranek 41ec11e6ab Rekeying Update
1. Flushing out the keying state machine, taking it out of the accept
   state machine.
2. Changed the HandshakeInfo record to be something that can be
   recreated post-initial connection for rekeying.
3. Fixed the name of a previously unused size variable.
4. Moved some constants around.
2016-10-16 20:25:24 -07:00
John Safranek c564550999 Automatic Session Rekeying
1. Add stub rekey trigger function.
2. Add new default highwater callback that calls the rekey trigger
   function.
3. Rename the highwater level as "mark" rather than "count".
4. Add a flag to call the highwater callback once, cleared when the
   txCount is cleared when sending new keys message to peer.
5. Add new state machine for key exchange.
6. Start massaging the accept state machine for new KEX machine.
7. Update some default sizes, and replace magic numbers with named
   constants.
8. Scale back the accept state machine to add in the KEX state
   machine.
9. Capture the client version string and the server's KEX init message
   for rekeying.
10. Add compiler flag to allow "none" as a user auth method.
2016-10-16 15:16:24 -07:00
John Safranek b3ee5cd381 Send channel window adjust update when the receive buffer
has processed at least half of its available space. By
default, the receive window is 1MB, and the window size is
increased every 512kB.
2016-10-16 12:11:50 -07:00
John Safranek 919ed1f944 Optionally compile keygen.c. 2016-10-14 13:16:07 -07:00
John Safranek b6cda842e8 add function to notify peer of window size adjustment 2016-10-14 12:45:09 -07:00
John Safranek a69b7fba26 More Tweaks
1. Made default window size updatable at configure time.
2. Lowered the default highwater mark by 32k.
3. Removed a parameter name from a couple function protypes.
2016-10-14 12:45:09 -07:00
John Safranek d9808cec31 tweak the peerWindowSz updating and logging 2016-10-14 12:45:09 -07:00
JacobBarthelmeh 1524047311 Merge pull request #20 from ejohnstown/keygen
RSA Private Key Generation Wrapper Function
2016-10-13 15:20:20 -06:00
John Safranek da4b19524d RSA Private Key Generation Wrapper Function
1. Implemented the RSA key generation wrapper function.
2. Rearrange the unit test code.
3. Added RSA key generation wrapper function to unit test.
4. Removed certificate load from echoserver.
5. Not using certificates, removed the functions and storage.
6. Removed unused certificate files.
7. Renamed certs directory as keys.
8. Removed the example server from the build for now.
9. Created new server key with the RSA key generation function.
10. Add IDs for public keys for keygen use.
11. Whitespace cleanup.
2016-10-13 10:02:03 -07:00
JacobBarthelmeh 00b6383b11 Merge pull request #19 from ejohnstown/fix-warning
fix scan-build warning on ConstantCompare
2016-10-07 11:07:06 -06:00
John Safranek 04e361a558 1. fix scan-build warning on ConstantCompare
2. fix visibility label typos
2016-10-07 10:04:04 -07:00
JacobBarthelmeh 7952fdf035 Merge pull request #17 from ejohnstown/highwater
Transfer Highwater Mark, Session Key Refactoring
2016-10-05 17:07:10 -06:00
John Safranek 569890067a Added a transfer highwater callback to the echoserver that
prints that the highwater mark was hit and doubles the
highwater mark value. It is disabled by default. To use,
when configuring add the CPPFLAG "DEFAULT_HIGHWATER_MARK".
For example, `CPPFLAGS=-DDEFAULT_HIGHWATER_MARK=128`
2016-10-05 14:56:21 -07:00
JacobBarthelmeh 69a6fbccb1 Merge pull request #18 from ejohnstown/wolfCrypt
wolfCrypt
2016-10-05 13:26:04 -06:00
John Safranek b0d318fce0 wolfCrypt Update
Include wolfSSL's options.h to echoserver.c. When building wolfSSL
with AES-NI and wolfSSH in debug, the ALIGN16 on the SHA-256
structure is lost in wolfSSH, where the wolfCrypt code is expecting
the parameters to be ALIGN16.
2016-10-05 12:14:05 -07:00
John Safranek 2cf5ad63ac wolfCrypt
1. Add call to wolfCrypt_Init() to wolfSSH_Init().
2. Modify have_wolfssl.m4 to check for wolfCrypt, not wolfSSL.
2016-10-05 10:55:30 -07:00
John Safranek 6561da9ce2 Updates to the data highwater marks for a callback. 2016-10-04 09:55:09 -07:00
John Safranek 7c8801409c Move the WOLFSSH and WOLFSSH_CTX initializer and free functions from
ssh.c to internal.c.
2016-10-04 09:55:09 -07:00
John Safranek 73e4e58795 1. Regroup the session keys into a separate structure.
2. Separate sets of keys for client and server.
3. Store generated keys in handshake info record.
4. Copy session keys over when sending and receiving the
   New Keys message.
2016-10-04 09:55:09 -07:00
John Safranek 30c4a32611 1. Add accessors for session data high water mark.
2. Check transmit and receive against high water mark and log.
2016-10-04 09:55:09 -07:00
dgarske db57a01613 Merge pull request #16 from ejohnstown/commit-tests
Add pre-commit test script
2016-10-04 06:37:43 -07:00
John Safranek eea065727b Add pre-commit test scripts like wolfSSL. 2016-10-03 15:52:38 -07:00
dgarske 626708de86 Merge pull request #15 from ejohnstown/errsys
err_sys() static analysis issue
2016-08-27 15:46:07 -07:00
John Safranek c71f4e8948 tweaked the err_sys to follow the updated wolfSSL version 2016-08-27 14:08:53 -07:00
John Safranek 629cb8d160 Copied change to err_sys() from wolfSSL. Cleaned up a static analysis
issue. Also added the attribute noreturn to the function since it
doesn't actually return.
2016-08-25 13:15:24 -07:00
dgarske 31b411bbed Merge pull request #14 from ejohnstown/misc-inline
Update misc inline code
2016-08-10 08:56:13 -07:00
John Safranek 2c3d78b4a6 Change misc.c error to warning and exclude the misc.c code from being compiled. Most people include all .c files and by default inlining is allowed, which in turn causes an #error in misc.c and it must be excluded. Since we know its already been properly included there is no reason to throw error here. Instead, show warning and exclude code in .c file.
Copied from wolfSSL pull request #521.
2016-08-09 10:44:33 -07:00
JacobBarthelmeh 1039cb9d43 Merge pull request #13 from ejohnstown/more-cleanup
More Cleanup
2016-07-22 10:31:34 -06:00
John Safranek c8da16cbe8 use the proper memcpy alias for wolfSSH 2016-07-22 09:30:02 -07:00
John Safranek 2e1744265b more return code checking 2016-07-21 20:07:29 -07:00