Commit Graph

714 Commits (76a17c97656db2bf28ccf1ccca65fc7d4f712eec)

Author SHA1 Message Date
John Safranek b60f802de0
Merge pull request #429 from embhorn/zd14507
Fix mem init error in DoKexDhReply
2022-07-15 13:41:10 -07:00
JacobBarthelmeh 3013eee8cb handle pending sent packets with SFTP and want write case with rekey 2022-07-14 09:17:43 -07:00
JacobBarthelmeh 3475e99f96 reset want read/write state on calling wolfSSH_accept and do not allow calling in error state 2022-07-13 21:41:52 -07:00
JacobBarthelmeh 0b5a36661c handle the case where SSH takes over output packet with SFTP want write 2022-07-13 21:35:32 -07:00
JacobBarthelmeh be2f462f73 handle sftp change to directory '/' 2022-07-13 21:31:26 -07:00
Eric Blankenhorn c31efcd8ed Fix mem init error in DoKexDhReply 2022-07-13 11:30:34 -05:00
John Safranek 7116dd1d14
ECC Userauth Initialization
For ECC user authentication, initialize the mpints used to store the
signature before checking it. (ZD 14412)
2022-06-29 11:18:24 -07:00
John Safranek 4ff0683a16
RSA Userauth Initialization
For RSA user authentication, initialize the arrays used to store the
check value and the signature before loading and comparing them.
(ZD 14412)
2022-06-28 11:38:07 -07:00
JacobBarthelmeh cbd5ae04a4 handle extended data with scp connection 2022-06-14 15:30:24 -07:00
John Safranek d30b1a91b4 ECDSA Issues
1. Several ifdef switches were using incorrect logic.
2022-05-25 14:21:50 -07:00
John Safranek 73249c7257
Merge pull request #408 from anhu/saber
SABER Level 1 Support in wolfSSH
2022-05-24 14:51:39 -07:00
Anthony Hu 3cd804bd8d Un-interleave and comment alignment 2022-05-20 11:14:13 -04:00
Anthony Hu 19a5938419 Clang does not like poinless parenthesis. 2022-05-19 17:45:17 -04:00
Anthony Hu 71761d9ccb Changes based on code review. 2022-05-19 17:32:46 -04:00
John Safranek 5b8db26063
Add ECDSA Key Generation Wrapper
1. Added a wrapper function for ECDSA key generation like the RSA key
   generation.
2. Added keygen to the unit test.
2022-05-16 11:58:12 -07:00
JacobBarthelmeh 1f0864d6c7 cast for g++ build warning 2022-05-12 13:15:21 -07:00
Kareem eb1222521e Fix variable declaration order for Visual Studio. 2022-05-12 10:51:14 -07:00
Kareem 7a98d90436 Fix heap location. 2022-05-12 10:48:54 -07:00
Kareem 7a3a8d43be Fix r/s in BuildUserAuthRequestEcc and refactor function for small stack support. 2022-05-10 15:45:04 -07:00
Kareem 578f3c989f Translate return code in wsEmbedSend. 2022-05-09 15:19:02 -07:00
Anthony Hu cdde29da65 SABER Level 1 Support in wolfSSH 2022-05-05 16:47:41 -04:00
gojimmypi d99f3fc61b initialize pointers to NULL, others to zero 2022-04-07 15:01:21 -07:00
John Safranek b34f144814
Preprocessor Guards
1. Add preprocessor guards for RSA/ECC to agent and the example and test
applications.
2. Remove redundant copy of FwdStates from internal.h.
2022-04-05 11:02:23 -07:00
David Garske 76ba904819 Fixes for all FIPS 140-3 cases. 2022-04-04 16:27:23 -07:00
David Garske fba8e78e79 Fix for building with older FIPS. 2022-04-04 11:32:17 -07:00
David Garske 509851e64e
Merge pull request #398 from ejohnstown/status
Echoserver SFTP status update
2022-03-25 14:45:56 -07:00
John Safranek fa2123dbfc
Merge pull request #397 from dgarske/cross_fips
Fixes for cross compiling with FIPS
2022-03-25 14:31:43 -07:00
John Safranek b94349bbc5
Echoserver SFTP status update
1. In wolfsftp, treat all the status codes the same when trying to read.
2. In the echoserver, treat all the status codes the same in the
   sftp_worker.
2022-03-24 16:55:12 -07:00
David Garske 0f22329187 Fix for FIPS 140-3 on ECC private key use. Fix for IPv6 with scpclient. Wrong macro for fall through. Add support for flushing file IO using `WOLFSCP_FLUSH`. 2022-03-24 13:34:26 -07:00
Anthony Hu 6c6b405f68 Bugfix: erroring out on copying empty file; don't read if file size is 0. 2022-03-24 15:36:55 -04:00
Anthony Hu 312b9d1d7a
Merge pull request #393 from ejohnstown/sftp-rxd 2022-03-21 17:55:15 -04:00
John Safranek 981b8e8b30
SFTP Channel Receive Fix
1. The echoserver's sftp_worker() was treating the WS_CHAN_RXD status as
   an error and failing out. Updated to clear the error status.
2. wolfSSH_SFTP_read() was also treating WS_CHAN_RXD status as an error
   and terminating the transfer. Update to treat like the other status.
2022-03-21 14:39:52 -07:00
John Safranek b1967829cd
Small Buffer wolfSCP
When using a small file buffer for SCP, there was a combination of file
size and channel window size where SCP would read the remainder of the
file, close it, send a small message because the peer's window was full,
then try reading the file again. The change keeps trying to send if the
file buffer still has data.
(ZD #13808)
2022-03-17 15:21:13 -07:00
John Safranek d7b453ba1f
Merge pull request #389 from kojo1/zd13769
Missing return value
2022-03-03 08:59:12 -08:00
Takashi Kojo cefde5f4d3 Missing return value 2022-03-03 10:21:12 +09:00
David Garske 6162cd1181 Fixes for building without RSA or ECC. 2022-02-28 12:48:22 -08:00
Hideki Miyazaki d080111157
fix handling sending data if the data size is greater than peer max packet size 2022-02-17 13:36:16 +09:00
John Safranek 4354edc945
Fix SCP Extended Data Print
The OSS-Fuzz detected a possible use of uninitialized data. Since it is
text output for the STDERR of the peer, make sure the string is actually
null terminated before fprintf to stderr.
2022-02-01 14:14:04 -08:00
John Safranek bd312c34f2
Old Compiler Warning Cleanup (GCC 4.0.2)
1. client.c: It was warning a recommendation to tag the function
   `readInput()` as non-return. Changed the err_sys() calls to
   `fprintf(stderr, ...)` and then return from the function.
2. internal.c: In functions `DoKexInit()` and
   `DoUserAuthRequestPublicKey()`, initialized a couple variables that
   could be used uninitialized.
3. wolfsftp.c: Fixed a variable that was shadowing a global label.
4. wolfsftp.c: In function `wolfSSH_SFTP_RecvFSTAT()`, initialized a
   variable that could be used uninitialized.
5. scpclient.c: The command line argument was read into a char value
   assuming it was signed, which is usually true. On the PowerPC this
   value is unsigned. Promoted it to int to match the other tools.
2022-01-27 10:36:51 -08:00
John Safranek ba42d6f732
Fix missing pread() and pwrite()
1. configure.ac: Check that the DECLs for `pread()` and `pwrite()` exist
   in unistd.h.
2. port.c: If `pread()` or `pwrite()` aren't available, use the local
   versions that are wrappers around `seek()` and `read()` and
   `write()`.
2022-01-27 10:36:42 -08:00
Takashi Kojo a8dee72390 macro guarde for WOLFSSH_NO_DH_GEX_SHA256 2021-12-15 10:25:36 +09:00
John Safranek e582d29f33
Remove redundant free
1. Free the handshake hash right after final.
2. Change GenerateKeys() to take a hashId as a parameter.
3. Clear the handshake hash ID right after freeing.
4. Free the handshake hash if the hash ID isn't NONE in
   HandshakeINfoFree.
2021-12-06 10:30:20 -08:00
John Safranek 15b62dd26b
Merge pull request #378 from JacobBarthelmeh/memory
small stack optimizations
2021-12-03 10:23:09 -08:00
Jacob Barthelmeh 7dd9d1fa2e fix check on RSA import size 2021-12-01 15:54:26 -07:00
Jacob Barthelmeh 6b4bd138af small stack optimizations 2021-11-19 16:14:30 -07:00
John Safranek 49bd5d6988
Add window updates to Channel reads and ChannelId reads. 2021-11-09 10:15:45 -08:00
John Safranek caedd5339c When scp receives a string in STDERR, print it out. 2021-11-04 14:45:34 -07:00
Jacob Barthelmeh ba99ddda68 run license update script 2021-11-04 13:11:53 -06:00
Jacob Barthelmeh db00600628 fixes for warnings from scan-build 2021-11-04 09:43:53 -06:00
Jacob Barthelmeh d3c80b8fe8 g++ build warning fixes 2021-11-04 00:59:21 -06:00