Commit Graph

1522 Commits (049e40bb1c5c20ff9bc335ffba07aa44c92735a2)

Author SHA1 Message Date
JacobBarthelmeh cd70e15d60 add additional sshd test framework 2023-01-18 14:54:39 -08:00
JacobBarthelmeh f8b46ce1e3 alter setting of ssh->error with SFTP get and return value 2023-01-18 09:27:47 -08:00
JacobBarthelmeh 3135bf87b6 add test for ls -s with sftp 2023-01-17 15:12:37 -08:00
JacobBarthelmeh cb4a50a764 set ssh error in sftp status not ok state 2023-01-16 09:31:31 -08:00
JacobBarthelmeh c1ea43d505 add handling exec sub shell to wolfsshd app 2023-01-15 14:36:56 -08:00
JacobBarthelmeh d82283a8e3 add '-s' option to print file sizes with 'ls' command 2023-01-15 13:44:02 -08:00
JacobBarthelmeh 834a03ce84
Merge pull request #484 from ejohnstown/release-cleanup2
Release Cleanup 2
2022-12-28 10:59:28 -07:00
John Safranek 0336676ff7
Release Cleanup 2
1. Remove ununsed variable in a function for the Windows build.
2022-12-28 09:51:31 -08:00
JacobBarthelmeh e4ffaa946f
Merge pull request #483 from ejohnstown/release-cleanup
Release Cleanup
2022-12-27 17:55:12 -07:00
John Safranek 99bab74d78
Release Cleanup
1. Update the release date in the ChangeLog.
2. Move some compiler guards around to hush warnings depending on the
   build options.
3. Fix a string name for ECDSA P521 algo.
4. Fix a stray static function definition.
5. For FIPSv5 builds, add CAST tests to the API test and testsuite.
6. Add the wolfSSH_Init() and wolfSSH_Cleanup() to the unit test.
2022-12-27 16:19:21 -08:00
JacobBarthelmeh 9fc41086b1
Merge pull request #482 from ejohnstown/type-fix
Type Fix
2022-12-22 15:43:41 -07:00
John Safranek 5267f6cc4b
Type Fix
When building wolfSSH with g++, it was complaining about type issues
with respect to the type enum wc_HashType. It was getting turned into a
byte and then back to an enum wc_HashType implicitly. It should never
have been a byte in the middle.
2022-12-22 14:30:36 -08:00
JacobBarthelmeh 1a3652bbad
Merge pull request #480 from ejohnstown/sftp-big-file
SFTP Large File Fix
2022-12-22 13:54:02 -07:00
John Safranek bef7f758cc
SFTP Large File Fix
1. There were a couple spots during a large file transfer where the
   client rekeying the session would interrupt the transfer and/or
   reset the amount of file data transfered. Fixed that with a check
   for WS_CHAN_RXD.
2. Added a build option to interrupt a file transfer after 2 minutes.
   Large files will take longer.
2022-12-22 09:52:18 -08:00
JacobBarthelmeh b211634680
Merge pull request #479 from ejohnstown/release
Updates for new release v1.4.12
2022-12-21 12:06:52 -07:00
John Safranek 124a6cc32d Updates for new release. 2022-12-20 14:33:53 -08:00
John Safranek c40f77914f
Merge pull request #477 from JacobBarthelmeh/sftp 2022-12-19 15:50:36 -08:00
JacobBarthelmeh 3e64f13b36 fix for x509 connections 2022-12-19 16:37:40 -07:00
JacobBarthelmeh 055f52ca5a add cert use to sftp client 2022-12-19 16:37:40 -07:00
JacobBarthelmeh 29d59ac1f9 add debug print out for checking IP address of peer 2022-12-19 16:37:40 -07:00
JacobBarthelmeh e47dca36f3 add HAVE_PTHRED define for including correct WOLFSSL_THREAD 2022-12-19 16:37:25 -07:00
JacobBarthelmeh bdf171306c
Merge pull request #476 from ejohnstown/ecdsa-sign
ECDSA Signing Guards
2022-11-23 15:59:01 -07:00
John Safranek 786257d0b9
ECDSA Signing Guards
1. Add guards around uses of algorithm names strings that shouldn't be
   included if the algo is disabled.
2. Add a little more context to the error strings in the cert versions
   of the signing functions.
2022-11-21 12:03:27 -08:00
JacobBarthelmeh b856afdace
Merge pull request #475 from ejohnstown/no-mp
Remove Public Math
2022-11-18 16:38:40 -07:00
John Safranek 36760ba0ee
Remove Public Math
1. Refactoring to remove the need for mp_int types and any of the math
   functions from wolfCrypt. wolfCrypt provides APIs for generating and
   verifying signatures and for checking keys, use them.
2. Add const to the pointers to the buffer in the Get functions used to
   parse the data stream.
3. Named the parameters for the Get functions when adding const to the
   prototypes in the header.
2022-11-17 08:31:03 -08:00
John Safranek c9b2a21214
Merge pull request #468 from JacobBarthelmeh/sftp 2022-11-15 16:05:07 -08:00
JacobBarthelmeh 77acddc7a6
Merge pull request #474 from ejohnstown/thread-test
Test Threading
2022-11-15 13:29:07 -07:00
John Safranek be8c52d2fa
Change name of guard around WABORT() 2022-11-04 13:53:03 -07:00
Hayden Roche 8c4c561dfb
Merge pull request #473 from ejohnstown/sftp-size 2022-11-03 14:07:58 -07:00
John Safranek 621bd3418e
Update Test Case
The test for wolfSSH_SFTP_SendReadPacket() expects to receive the
requested amount of data in response. The only guarantee is that up to
the requested amount of data is returned. Change the test so it checks
the return code is greater than 0, and less-than-equal-to the requested
amount.
2022-11-03 13:52:17 -07:00
John Safranek e038a482ef
wolfSFTP Size Check
1. Add some comments describing the constants WOLFSSH_MAX_SFTP_RW and
   WOLFSSH_MAX_SFTP_RECV.
2. When the server processor receives a request for file data during a
   file transfer, limit the amount of data sent to the client by the
   value WOLFSSH_MAX_SFTP_RW.
2022-11-02 17:06:08 -07:00
John Safranek f75a60909a
Echoserver Driver
1. More tweaks for the threading guards.
2. Move a local declaration whose scope changed.
2022-11-01 15:26:22 -07:00
John Safranek e5a1c38d86
Echoserver Driver
1. Leave out the setup of the tcp_ready record when not using threading.
2. Don't change the echoserver directory when building for Integrity.
3. Change WEXIT to be a return(0) when building for Integrity.
4. The echoserver shouldn't call exit directly, it should save the
   return_code server args and then return to the caller.
5. When using forwarding, don't exit if the address is IPv6, return an
   error.
6. When exiting, close the listen file descriptor.
7. Reset myoptind to 0 before processing the options list.
2022-10-31 14:44:57 -07:00
John Safranek f0270d8920
Echoserver Driver
1. For Integrity builds, err_sys should only printf.
2. For Integrity builds, WEXIT should be a return.
3. In the echoserver, add explicit WEXITs for the err_sys statements.
2022-10-28 10:42:43 -07:00
John Safranek f25e5465e1
Echoserver Driver
1. Moved the contents of main to a new function, wolfSSH_Echoserver().
2. main just calls the wolfSSH_Echoserver().
2022-10-27 11:26:04 -07:00
John Safranek a3ab8fb7ef
Single Threaded Tests
1. Regroup some of the test code inside the guards to disable it.
2. Remove the SFTP testing if single threaded is enabled.
3. Disable the testsuite if single threded is enabled.
2022-10-25 18:00:23 -07:00
John Safranek d0c295c924
Assert Consistency
1. Make whitespace in asserts consistent.
2. Make asserts consistent with wolfSSL's.
3. Added the pointer asserts.
4. Wrapper around abort() to disable it.
2022-10-25 17:12:07 -07:00
John Safranek c4b2af1a79
Test Threading
1. Whitespace.
2. Rename the Threading case for "else" to "elif
   defined(USE_WINDOWS_API)" and added a new else case.
2022-10-25 17:12:03 -07:00
Hayden Roche 15c0fd5d18
Merge pull request #472 from ejohnstown/test-tools 2022-10-25 10:15:42 -07:00
John Safranek 6ce7e14cda
Test Tools
1. Remove the flag NO_MAIN_FUNCTION from the test tools.
2. For unit and api tests, follow the patter for the testsuite with its
   NO_TESTSUITE_MAIN_DRIVER check.
2022-10-25 09:03:19 -07:00
Hayden Roche c88fa45d3d
Merge pull request #471 from ejohnstown/thread-dedup 2022-10-24 15:04:10 -07:00
John Safranek c580b2c3ba
Module Static Global
1. Move ConvertHexToBin() and Base16_Decode() into test.h.
2. Add a description for the options in test.h.
3. Add a static to the hexDecode const array for Base16_Decode().
4. Add the check for options.h/user_settings.h to api and unit tests.
2022-10-24 11:32:40 -07:00
John Safranek f88c3d6d3a
Dead Code Removal
1. In the echoserver's user authentication function, the summary check was
   refactored and the old code wasn't removed. A more strict compiler
   noticed the code was never executed.
2. Moved the ret check variable to the section of the function where it
   is used.
2022-10-21 15:54:34 -07:00
John Safranek 1fa4134304
Threading Deduplication
1. Move the test threading types and macros to the conditional threading
   section of test.h and make them conditional on wolfSSL v5.5.1.
2. Alias WOLFSSL_THREAD as WOLFSSH_THREAD.
3. Update the THREAD_FUNC typdef to look more like a function pointer.
4. Add the user_settings.h/options.h include that is missing from
   examples.
2022-10-21 15:17:19 -07:00
John Safranek d8e3288dd6
Merge pull request #465 from JacobBarthelmeh/Certs
renew cert script, add check for user name in UPN and host IP in alt. names
2022-10-21 09:43:58 -07:00
Hayden Roche d45cf49fc3
Merge pull request #470 from ejohnstown/integ-rename 2022-10-20 15:10:47 -07:00
John Safranek 2cbbdfb798
Fixing name conflicts with the RTOS Integrity
1. Rename the type struct Buffer as struct WOLFSSH_BUFFER.
2. Rename the function Receive() as ReceiveData().
3. Fix unused variable value.
4. Rename the I/O callback functions LastError() as wsErrno() and
   TranslateReturnCode() as wsReturnCode(). LastError was conflicting
   with something, and TRC was just long.
5. The logFunction callback pointer isn't used in non-debug builds, and
   the compiler reported as such. Reference the variable to hush the
   warning.
2022-10-20 14:53:01 -07:00
Hayden Roche fd15c2d1c5
Merge pull request #469 from ejohnstown/am-ref 2022-10-20 14:23:43 -07:00
John Safranek 1bfb5c394b
Automake Refactor
1. Rename TestsuiteTest() with wolfSSH prefix.
2. Add wolfSSH_TestsuiteTest to the testsuite.h header file.
3. Add check so main function to the testsuite can be left out of the build
   with the flag NO_MAIN_FUNCTION.
2022-10-20 12:20:08 -07:00
John Safranek df4576558f
Automake Refactor
1. Rename test_SFTP() with wolfSSH prefix.
2. Add header file for the sftp.c file.
2022-10-20 12:19:34 -07:00