Commit Graph

198 Commits (7911c7034971be65f90b52cb020c6e4688e089fc)

Author SHA1 Message Date
Jacob Barthelmeh 7911c70349 sanity check that WOLFSSH struct has handshake info 2018-12-12 13:34:18 -07:00
John Safranek 6d8e55eb8c Typecast some strlen return values to the type they are assigned to. 2018-12-03 16:27:45 -08:00
John Safranek 35938eb1a2 wolfSFTP for Windows
1. Updated file functions to be usable by Win32.
2018-12-03 16:27:45 -08:00
Jacob Barthelmeh c033c6e979 use a dynamic buffer for SCP base path with Nucleus port 2018-11-30 16:58:48 -07:00
John Safranek dcd924577e Non-blocking fix
When sending data, if there is pending data, try to send it first before
setting up the next message.
2018-11-21 11:42:50 -08:00
John Safranek f414e7721a Non-blocking fix
1. If data is still in the buffer, try sending it again.
2018-11-21 11:38:33 -08:00
John Safranek 79646f93d1 Function Name Change
wolfSSL and wolfSSH both have a function named SendBuffered() and they
are both set to local visibility. There is at least one build
configuration where both versions of the function are visible and the
compile fails. Changing the name in wolfSSH to add the pseudonamespace
prefix wolfSSH_, and also changed the name of the function to
SendPacket() since it is used with two other functions with Packet in
the name.
2018-11-20 16:35:53 -08:00
Jacob Barthelmeh bdae414009 sanity check on buffer length 2018-11-15 16:28:22 -07:00
John Safranek 3b276aaae9
Merge pull request #115 from JacobBarthelmeh/fuzz
additional sanity checks
2018-11-15 14:44:57 -08:00
Jacob Barthelmeh 9f3d1f07d2 additional sanity checks 2018-11-15 15:36:51 -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
Jacob Barthelmeh 6c0d053f57 gcc-7 build fall through warning 2018-10-29 15:29:25 -06:00
JacobBarthelmeh ba4fae0054
Merge pull request #98 from ejohnstown/fwd
TCP Port Forwarding
2018-09-20 13:39:07 -06:00
John Safranek 1478f47296 remove an unused global request case we aren't using at this point 2018-09-19 15:42:35 -07:00
JacobBarthelmeh b889645008
Merge pull request #101 from ejohnstown/small-fixes
Small Fixes
2018-09-11 15:20:48 -06:00
John Safranek 94626a5a2c Small Fixes
1. fixed bug in DoKexDhGexGroup() where ret was initialized to an error
2. The peer channel ID set during the connect needs to be saved for use later.
2018-09-11 14:01:59 -07:00
Jacob Barthelmeh 89a4c1015e add default SCP state of no direction set 2018-09-11 14:33:06 -06:00
John Safranek cf8b597250 Match Fix
When matching ID lists during the KEX Init, the client needs to swap lists.
2018-09-07 15:10:03 -07:00
John Safranek cbeb2cf566 TCP/IP Forwarding
1. Fixed an issue with the FD_SET copy.
2. Fixed some memory issues discovered with Valgrind.
2018-09-04 15:17:14 -07:00
Jacob Barthelmeh 634de0dc89 sanity checks on arguments 2018-08-31 16:56:55 -06:00
John Safranek a42075d823 TCP/IP Forwarding
1. Removed some unused macros in the configure.ac script.
2. Added option for enabling TCP/IP Forwarding.
3. Coalesced the option enable checks to one location in the configure script.
4. Removed redundant compile flags from the wolfSSH automake include.
5. Added a check of the BUILD_SCP option to leave out the wolfcsp file as needed.
6. Removed the redundant debug flags from the ax_harden macro since we add them at the configure level.
7. Modified the ax_harden macro to add the flags to AM_CFLAGS rather than CFLAGS.
8. Removed redundant AM_CFLAGS from the include.am that are adding them to their build's CFLAGS.
9. Replaced the have-wolfssl macro with AC_CHECK_LIB.
10. When adding per-target CPPFLAGS, add the AM_CPPFLAGS back in.
11. remove redundant call to wolfSSH_Init() from echoserver
12. Add runtime configuration of the session window size and max packet size.
13. Parse the TCP/IP direct connect flavor of the Channel Open message.
14. Save and release the host and origin addresses.
15. Added an example forwarding tool.
16. Move and rename the FIND_SELF and FIND_PEER constants.
17. Add planned functions ChannelSend, ChannelRead, ChannelExit, worker.
18. Add new function ChannelNext, which returns the next channel in the list.
19. Changed SendBuffered() from static to local so it could be used by the worker.
20. Separated creating a channel and sending an channel open request.
21. Added status code for pending open channel and for received data.
2018-08-31 11:21:42 -07:00
Jacob Barthelmeh 962ee5a06b fix for possible overflow with sanity check 2018-08-13 10:39:15 -06:00
Jacob Barthelmeh 5cbfa5e43f rename from different drives and list drives 2018-07-31 14:39:46 -06:00
John Safranek 419efeb59c
Merge pull request #80 from JacobBarthelmeh/sftp-nuc
fix when reading directory
2018-07-16 10:28:25 -07:00
Jacob Barthelmeh 8601a73026 sanity check that handshake information can be used 2018-07-02 15:23:14 -06:00
Jacob Barthelmeh e47427c484 fix when reading directory
change from NO_WOLFSSL_DIR to NO_WOLFSSH_DIR

add chmod feature

changes for sftp port

file attributes and SFTP version

no exit on echoserver and revert scp
2018-06-29 09:19:40 -06:00
Jacob Barthelmeh c7b2dfbf1d sanity check on arguments with debug 2018-06-14 17:17:07 -06:00
John Safranek fbdff7f186 a few whitespace fixes 2018-06-14 14:30:40 -07:00
Jacob Barthelmeh 522d93add3 scp nucleus port
fix for uninitialised value

fix compile time warnings

scp only build and handle file size of 0

macro guard on sftp build

adjust directory pointer on desktop build

close connection still on fail and update derefrence of dir with nucleus

ssh only build for nucleus
2018-06-13 16:23:08 -06:00
Jacob Barthelmeh 6d434d0030 initial port to Nucleus
update example on Nucleus

add code sourcery IDE project

fix naming of IDE project files

clean up opendir for fail case

fix for build warnings

add fstat and fixes for nucleus port

update FALL_THROUGH case

add null terminator and more memory free's

fix for scan build warnings

fix warning of no return value

better bounds checking

better path cleaning

fix return values in header file

clean path before access

remove trailing delimiter from clean path
2018-06-13 09:44:54 -06:00
Chris Conlon 37e3250164 fix scanbuild warning in SendChannelRequest() 2018-06-12 10:51:17 -06:00
JacobBarthelmeh 0fc6f343b0
Merge pull request #72 from ejohnstown/static-fixes
fix a handful of clang static analysis warnings
2018-06-07 09:38:46 -06:00
John Safranek 8477c4acd6 fix a handful of clang static analysis warnings 2018-06-06 15:04:59 -07:00
Jacob Barthelmeh dfdb2b1335 change return value for SFTP connection and clean up after rebase 2018-06-01 17:22:06 -06:00
Jacob Barthelmeh b467a3073c able to establish SFTP connection and start of adding commands (still in devel, has debug print statements)
refactor sending SFTP packets

try to make internal function names more clear, add comments, and update sftp example

add parsing names and most of attributes

add SFTP debug tag

add mkdir with SFTP

start of framework for get

add get command and keep track of working directory

base case of put command

basic sftp rename command

basic sftp rm command

initial basic rmdir command added

initial basic reget/reput commands

clean up absolute path to working directory

move location of sftp client app and more testing

add more comments and make code more readable

cast on values and add exit

adjust macro names and test make dist

adjust gitignore and macro names

gcc-7 build

revert nameListIdx increment to find ssh-rsa

more comments

fix for possible use uninitialized warning

initial SFTP accept

send status packet and start of realpath

server side mkdir

initial process of stat and lstat packets

initial processing of rmdir packet

basics for server handling SFTP get command

initial commit for server handling basic put command

initial handling of receiving remove packet

initial server handling of rename packet

initial implementation of handling directory packets

better checking on return values

set correct return value on successful read

additional sanity checks on user inputs

make send and read packet API name more clear

cast for warning building with clang
2018-06-01 17:20:54 -06:00
John Safranek 5e67f2f027 Logging Update
1. Added new error codes for being unable to match ciphers with peer.
2. Whitespace updates in the error header.
3. Added disable flag to leave out the default log callback so user can supply own custom callback.
2018-06-01 15:00:40 -07:00
JacobBarthelmeh 99a8f00061
Merge pull request #67 from ejohnstown/fix-fuzz
Fix Fuzz
2018-06-01 13:36:00 -06:00
John Safranek a399617780 Fuzz Test Fixes
1. Fix a possible underflow error when reading the F value from the KEX DH Reply message.
2018-06-01 11:05:13 -07:00
Chris Conlon a6e8c59b97 scp modifications from embedded port 2018-05-31 13:45:55 -06:00
Chris Conlon 871a3fa719 update scp error codes and strings 2018-05-31 13:45:54 -06:00
Chris Conlon 2151229eb4 switch SCP_USER_CALLBACKS to WOLFSSH_SCP_USER_CALLBACKS 2018-05-31 13:45:54 -06:00
Chris Conlon bfd0d925d9 add NO_FILESYSTEM checks for scp build 2018-05-31 13:45:54 -06:00
Chris Conlon 6cbfb0e26d add scp server support for copy from server to peer 2018-05-31 13:45:54 -06:00
Chris Conlon 5a42829087 add scp server support for receiving individual files and recursive
directories
2018-05-31 13:45:54 -06:00
Jacob Barthelmeh ff9d88f2ee update name for SHA 2018-05-30 11:29:12 -06:00
John Safranek 37eb1bc59d Fuzz Test Fixes
1. Add a maximum packet size value and verify the read packet size.
2018-05-24 13:10:49 -07:00
John Safranek a528f57840 Fuzz Test Fixes
1. Added some more size checks for the signature parsing in `KexDhReply()`.
2018-05-24 11:36:12 -07:00
John Safranek 945703b791 Fuzz Test Fixes
1. A bounds check in `KexDhReply()` for fSz could be tricked into using an incorrect value and trigger a crash. Rearranged the inequality so it can't be tricked.
2. A bounds check in `GetUint32()` for the size of the length value being used could cause crashes. Rearranged the inequality so it can't be tricked.
3. Modified other similar bounds checks.
4. In `KexDhReply()` check the sigSz after reading.
2018-05-24 10:50:53 -07:00
Jacob Barthelmeh 9312179ec8 revert increment of nameListIdx for RSA connection 2018-05-18 09:45:40 -06:00
JacobBarthelmeh c2a3de1332
Merge pull request #59 from ejohnstown/test-errcode
Error Code Unit Test
2018-05-10 15:06:10 -06:00