Commit Graph

1712 Commits (82323db6f87ad896b886bf2c4e2ef366ca78bc4b)

Author SHA1 Message Date
JacobBarthelmeh 82323db6f8 cancel alarm timer after connected 2023-11-28 08:01:05 -07:00
JacobBarthelmeh 0c6d34fc67
Merge pull request #620 from ejohnstown/known-hosts
Known Hosts
2023-11-27 13:36:39 -07:00
John Safranek 8bcb466f92
Known Hosts: PR Review
1. Fix a few stdC function calls to use the porting wrappers.
2. Missing some error checking, added it.
3. Add some bounds checking to the sz usage when checking for the
   server's key in the known hosts file.
4. Move the temp buffers from the stack to the heap.
5. Make sure to nul terminate the read known_hosts file.
2023-11-22 16:46:53 -08:00
John Safranek 0074ead857
Known Hosts
1. Add porting layer wrapper macros for strcat, strcpy, and strsep.
2. Use port layer macros for the known hosts additions.
2023-11-21 16:47:21 -08:00
John Safranek efd7ed01da
Known Hosts
1. Update the logic for checking the key name and key against the known
   hosts file.
2. Key fingerprinting for user confirmation.
3. Add user confirmation of host key additions.
4. Remove old debugging for known hosts.
2023-11-21 16:34:24 -08:00
John Safranek 51f4f48901 Known Hosts
1. Comment out the original known hosts check for another method.
2. Implement new key checking method.
2023-11-21 16:33:00 -08:00
John Safranek e16c247a4b Known Hosts
1. Added support to the wolfSSH client for a known hosts file.
2. In the client's common.c file, moved the functions ato32() and
   load_der_file() around so the known hosts callback can uses them.
2023-11-20 13:24:14 -08:00
John Safranek ec5a9560a4
Merge pull request #619 from JacobBarthelmeh/qnx
add include of select.h
2023-11-20 13:22:25 -08:00
JacobBarthelmeh 19a60a06c6 add include of select.h 2023-11-20 10:43:34 -08:00
JacobBarthelmeh b7aaabc898
Merge pull request #604 from ejohnstown/wolfssh-client-2
wolfSSH Client with OpenSSH-format Keys
2023-11-17 10:08:20 -07:00
John Safranek 3bc4fa956e
Merge pull request #618 from JacobBarthelmeh/files
when getting failure status packets return failure error code
2023-11-16 16:45:31 -08:00
John Safranek ec1964dd1c
PR Review
1. Rename and move CleanupUserAuthRequestPublicKey() as
   wolfSSH_KEY_clean().
2. Restrict the number of keys allowed in an OpenSSH key package to 1.
3. Initialize the Rsa and Ecc keys right before getting them.
4. New error code for an OpenSSH key format error when decoding.
2023-11-16 16:35:37 -08:00
JacobBarthelmeh 68cf698321 when getting failure status packets return failure error code 2023-11-14 15:52:44 -08:00
John Safranek de5b6a3f47
Merge pull request #617 from JacobBarthelmeh/files
do not require locking file with SFTP on Windows
2023-11-14 14:23:30 -08:00
JacobBarthelmeh 2d3956e0cb do not require locking file with SFTP on Windows 2023-11-13 15:59:55 -08:00
John Safranek dba9a6c36c
PR Review
1. Add test keys.
2. Add API test for wolfSSH_ReadKey_buffer().
3. Fix allocation issue found using the API test.
2023-11-06 15:16:39 -08:00
John Safranek 707104ee3a PR Review: Remove unused struct members from WS_KeySignature. 2023-11-06 14:07:21 -08:00
John Safranek 23a9bb82a0 PR Review
1. Change the block size in the key decoding to a named constant rather
   than a bare number.
2. Change the comparison from a difference of two unsigned values
   against zero to comparing them directly.
2023-11-06 14:07:21 -08:00
John Safranek 3b443c01fc PR Review
1. Add better error checking to the OpenSSH key code.
2. Add a couple heaps that were missing.
2023-11-06 14:07:21 -08:00
John Safranek 8049606f2e PR review: Fix potential memory leak when failing to parse a key of any type. 2023-11-06 14:07:21 -08:00
John Safranek 9bbfcf1a96 PR review: Update some std-C functions with the proper porting wrappers. 2023-11-06 14:07:21 -08:00
John Safranek 732aba4bc6 wolfSSH Client with OpenSSH-format Keys
1. Add two error codes for the new key format decoding.
2. Add in some better error and bound checking.
3. Fix ordering on a WOLFSSH_UNUSED and variable declaration.
4. Remove redundant ; from WOLFSSH_UNUSED function-like macro.
2023-11-06 14:07:21 -08:00
John Safranek 70aa287d78 wolfSSH Client with OpenSSH-format Keys
1. Move the KeySignature struct around in internal.c so it can be used
   for a couple tasks.
2. Add decoder for the OpenSSH-format keys.
3. Add an identification function for the new key.
4. Update ReadKey to handle the new format.
2023-11-06 14:07:21 -08:00
John Safranek 4d201d7b59
Merge pull request #609 from JacobBarthelmeh/command
make channel name size overridable and increase default to 4096
2023-11-04 21:01:38 -07:00
John Safranek f9aebbcd40
Merge pull request #611 from JacobBarthelmeh/sshd
truncate vsnprintf
2023-11-04 20:57:04 -07:00
John Safranek 2deee5103c
Merge pull request #613 from TakayukiMatsuo/zd16867
Fix index of signature part in case of RSA
2023-11-04 20:55:07 -07:00
JacobBarthelmeh 218a2fd898
Merge pull request #612 from ejohnstown/select-timeout
Echoserver Select Timeouts
2023-11-03 15:43:58 -06:00
TakayukiMatsuo 13c86631ee Fix index of signature part in case of RSA 2023-11-01 17:09:40 +09:00
John Safranek 66dc60853c
Echoserver Select Timeouts
A couple changes to keep the echoserver from spin-locking.

1. The SFTP worker should wait for data if the channel window is full.
   If the client isn't sending a window adjust, it might be because of a
   human time scale issue. New timeout is 60 seconds.
2. When the echoserver is waiting for something from the user and the
   select times out, wait a second instead.
2023-10-31 10:21:44 -07:00
JacobBarthelmeh fad4d71fa3 truncate vsnprintf 2023-10-31 07:14:02 -06:00
John Safranek 2685dc983b
Merge pull request #606 from falemagn/pull-reqs/fix-for-issue-605 2023-10-25 09:32:00 -07:00
David Garske a387aaf50e
Merge pull request #610 from ejohnstown/type-sizes
Configure Type Checking
2023-10-24 16:13:43 -07:00
John Safranek 3b50a89b2f
Configure Type Checking
Add checks to configure.ac for the types __uint128_t, size_t, uint8_t,
and uintptr_t.
2023-10-24 15:23:01 -07:00
JacobBarthelmeh ecae1d1519 make channel name size overridable and increase default to 4096 2023-10-23 09:47:52 -07:00
JacobBarthelmeh 173dfd9361
Merge pull request #608 from ejohnstown/thread-fix
Threading Fix
2023-10-23 10:35:38 -06:00
John Safranek 92669d0f1a
Threading Fix
1. The wolfSSL version number to check for the old threading code was
   v5.5.2, not v5.5.1.
2. A new wrapper was introduced around return for threading in what will
   be wolfSSL v5.6.4. Added that wrapper if it didn't exist.
3. Some other types for threading are added in v5.6.4, wolfSSH needs to
   use the old threading model if using wolfSSL v5.6.3.
2023-10-23 09:12:07 -07:00
Fabio b4858be16b Fix for #605: check for WS_WANT_READ too. 2023-10-20 14:06:39 +02:00
John Safranek 74cf1d4014
Merge pull request #603 from JacobBarthelmeh/sshd 2023-10-17 09:04:15 -07:00
JacobBarthelmeh e3637574dd remove unused ret value 2023-10-16 09:16:34 -06:00
JacobBarthelmeh 46d2017d76 fix reference to struct 2023-10-16 07:57:50 -06:00
JacobBarthelmeh f8de131e81 fix for shared socket ID between connections 2023-10-13 16:56:17 -06:00
John Safranek 7d816716b6
Merge pull request #593 from julek-wolfssl/ssh-zephyr 2023-10-02 14:14:04 -07:00
Juliusz Sosinowicz 37412ff50f Init zephyr support
- SSH
- SFTP
- SCP
2023-10-02 20:38:21 +02:00
John Safranek e5f4b692fb
Merge pull request #595 from wolfSSL/Espressif-test-update 2023-09-29 20:35:29 -07:00
John Safranek 37cb96c11b
Merge pull request #596 from JacobBarthelmeh/sshd 2023-09-29 20:34:44 -07:00
John Safranek a84df106f1
Merge pull request #597 from JacobBarthelmeh/sftp 2023-09-29 20:23:05 -07:00
JacobBarthelmeh 5780570880 limit additional nonblocking test 2023-09-29 16:12:21 -07:00
JacobBarthelmeh cb6088e339 check if rekeying in test 2023-09-29 15:14:27 -07:00
JacobBarthelmeh bbc9f9e157 add more test debug prints and better rekeying handling 2023-09-29 15:05:39 -07:00
JacobBarthelmeh 6ce5724ba9 fix speed of SFTP with SSHd when handling 'get' command 2023-09-29 13:34:16 -07:00