Commit Graph

576 Commits (ec2ecb8a8288b7c54feee07ff6e91e011b95d83a)

Author SHA1 Message Date
Guido Vranken ace2546ce2 Fix memmove length calculation in wolfSSH_CleanPath 2021-01-08 10:34:22 +01:00
John Safranek ee139f8e0d
Merge pull request #291 from JacobBarthelmeh/sftp
add special case for real path and refactor clean_path
2020-11-09 09:02:03 -08:00
JacobBarthelmeh 86fdc40a58
Merge pull request #297 from ejohnstown/agent-null
Null Agent
2020-10-29 11:42:22 +08:00
John Safranek 7900d47036
Check that the agent was set in the SSH session before trying to set its channel ID. (ZD 11099) 2020-10-28 15:50:10 -07:00
John Safranek 1cd6d4c29c
Merge pull request #295 from douzzer/ZD11139-SendKexDhReply-clear-sigKeyBlock
in SendKexDhReply(), clear sigKeyBlock before use (fixes ZD11139).
2020-10-27 16:13:56 -07:00
Daniel Pouzzner d80f141569 in SendKexDhReply(), clear sigKeyBlock before use (fixes ZD11139). 2020-10-27 16:58:16 -05:00
John Safranek 79d2ff2760
KEX Packet Follows Fix
1. When filtering out the unknown names from name lists, the one that
   will be the client's guess KEX type can get removed if unknown. Let
   the first item in the client's list be added if unknown.
2020-10-27 09:38:02 -07:00
Jacob Barthelmeh 209d5f5c16 fix heap hint and type 2020-10-16 10:57:27 -06:00
Jacob Barthelmeh e693e159a0 fix variable type 2020-10-15 15:29:57 -06:00
John Safranek 22c67b26ce
More Options
1. Moved the options checking to internal.h so other sources can use it.
2. Added some additional option checks and groups.
3. Added some guard checksto the key exchange.
2020-10-15 13:51:10 -07:00
John Safranek 28f5d750c9
More Options
1. Fix the key offerings in the echoserver and client with ifdef guards.
2. Fix a couple guards that weren't copy-pasted correctly.
2020-10-15 08:48:02 -07:00
John Safranek b9ccb6f4fb
Fix a couple dead stores. 2020-10-14 16:44:50 -07:00
John Safranek 91ca3ee43b
Fix a mix up between two prime names in a lookup table. 2020-10-14 15:23:04 -07:00
John Safranek 4d5ce88cc9
More Options
Wrapped more items with guards to disable them if not usable.
2020-10-13 17:42:02 -07:00
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
Jacob Barthelmeh a83a0c62f5 add special case for real path and refactor clean_path 2020-10-09 13:27:57 -06:00
John Safranek 0e065459bc
User Authentication Bounds Checks
Added some additional bounds checking to some of the parameters in the
public key user auth messages. There was a chance that an out of bounds
buffer read could happen.
2020-10-07 15:46:23 -07:00
JacobBarthelmeh 0b1e0345c4
Merge pull request #288 from ejohnstown/ecc-keys
ECC Key Reading
2020-09-29 10:04:52 -06:00
John Safranek b44ba5b1e3
Remove redundant printf() from testing. 2020-09-29 08:54:23 -07:00
John Safranek 82c69b9758
Keys
1. Add P-384 and P-521 sample user public and private keys.
2. Add DER format versions of the sample user private keys.
3. Add the sample user public keys for P-256 and RSA-2048.
4. Fix a bug where the user authentication signing would fail if using an ECDSA curve other than P-256.
2020-09-25 16:59:44 -07:00
John Safranek a269b1e843
ECC Key Reading
Update wolfSSH_ReadKey_buffer() to handle P-384 and P-521 when reading a key from a buffer.
2020-09-25 14:45:12 -07:00
Jacob Barthelmeh 496754c12f add debug message 2020-09-23 11:36:45 -06:00
JacobBarthelmeh 4dad28da55
Merge pull request #280 from ejohnstown/fix-id-list
Fix ID List
2020-09-11 11:41:51 -06:00
JacobBarthelmeh a3dd039224
Merge pull request #283 from ejohnstown/hmac-free
HMAC Free
2020-09-08 15:21:16 -06:00
JacobBarthelmeh c4578da7a2
Merge pull request #282 from ejohnstown/optional-build
Optional Builds
2020-09-08 15:15:22 -06:00
John Safranek cacea588b5
Add calls to wc_HmacFree(). Normally, HMAC isn't allocating resources.
This is future proofing when using wolfSSH with async crypto.
2020-09-08 10:22:32 -07:00
John Safranek 9fced1fe7d
Optional DH
1. If DH is disabled in the wolfCrypt build, the DH related code
   in wolfSSH shall be disabled.
2020-09-08 09:48:40 -07:00
John Safranek 39f30e25a4
Optional RSA
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.
2020-09-04 15:28:25 -07:00
John Safranek 487bcef2cc
Fix Memory
1. A couple places weren't passing the correct heap pointer to free.
   Normally this was ignored in the build because the WMALLOC macro left
   them out. Found using wolfCrypt memory logging.
2. Replaced the call to strdup() with wstrdup() that takes a heap and
   type parameter so sit may allocate a buffer with WMALLOC() and be
   freed correctly by WFREE().
3. Tweaked the client to use a preallocated buffer for the private key
   rather than letting ReadKey allocate one. (Another WFREE() heap/type
   issue.)
2020-09-02 12:11:24 -07:00
John Safranek 21451a9243
Fix ID List
1. Increase the size of the processed ID list from the peer from 8 to 16. (ZD 9820)
2020-09-02 11:49:06 -07:00
John Safranek 132a0a52f6
Clean up a couple issues where building the code with a C++ reported build errors.
1. Typecasting the return from malloc.
2. strncpy() checking.
2020-08-31 09:31:47 -07:00
John Safranek 8c719f5f57
Merge pull request #274 from JacobBarthelmeh/sftp
fix for non blocking interop with winscp
2020-08-27 17:09:13 -07:00
JacobBarthelmeh 849797a398 handle dangling directory opens 2020-08-27 14:33:23 -07:00
Jacob Barthelmeh f380c4f653 add check for WS_WINDOW_FULL error 2020-08-27 13:49:48 -06:00
John Safranek e052108d0c
Merge pull request #271 from JacobBarthelmeh/scp
add callback and example for no file system with SCP
2020-08-27 09:23:17 -07:00
JacobBarthelmeh 12f86ea267
Merge pull request #276 from ejohnstown/send-fix
SendChannel fix
2020-08-27 10:13:51 -06:00
John Safranek ede1f01752
SendChannel fix
When changing the functions SendChannelData() and
SendChannelAdjustWindow() to use the self channel ID instead of the peer
channel ID, forgot to update a couple instances. The test case at the
time had matching ID numbers for self and peer and happened to work.
2020-08-26 14:56:32 -07:00
Jacob Barthelmeh 76bdcd9438 add error out when receiving a file larger than the buffer 2020-08-26 15:14:54 -06:00
Jacob Barthelmeh 64d8d21209 remove accessing WS_SFTP_BUFFER directly 2020-08-26 13:33:23 -06:00
John Safranek e5c90b31e1
Merge pull request #273 from JacobBarthelmeh/testing
graceful shutdown with scp interop
2020-08-26 10:28:23 -07:00
Jacob Barthelmeh 9a8b9e72c9 adjust check for :/ and check on compare of file name 2020-08-26 10:22:56 -06:00
Jacob Barthelmeh 44d18953ed allow scp to '/' and increase file buffer in example server 2020-08-26 10:22:56 -06:00
Jacob Barthelmeh c2a2c03095 fix check on file size 2020-08-26 10:22:56 -06:00
Jacob Barthelmeh 9a83d7998a add status callback to SCP no filesystem 2020-08-26 10:22:56 -06:00
Jacob Barthelmeh 649a523b35 sanity check for file name size and typo fix from review 2020-08-26 10:22:56 -06:00
Jacob Barthelmeh 217a7d6520 add callback and example for no file system with SCP 2020-08-26 10:22:56 -06:00
John Safranek 7aedc31045
Add comment block to internal.c to start listing all the flags used in the file. 2020-08-24 09:37:15 -07:00
John Safranek 4055d91c11
ECC Update for wolfSSL v4.5.0
wolfSSL v4.5.0 introduced a new function, `wc_ecc_set_rng()`, which is
present when ECC_TIMING_RESISTANCE is enabled. Added a check to the
configure script for that function, and disable calls to the function
if it isn't present. This allows wolfSSH to build against older
versions of wolfSSL.
2020-08-21 16:57:43 -07:00
JacobBarthelmeh a81c3f6a6e
Merge pull request #269 from ejohnstown/agent
Agent
2020-08-21 16:21:27 -06:00
Jacob Barthelmeh 03fac18efd graceful shutdown with scp interop 2020-08-19 10:55:45 -06:00