Commit Graph

2171 Commits (master)

Author SHA1 Message Date
JacobBarthelmeh 7067b200b8 clear stat struct before use and treat mount as directory 2025-03-18 13:01:04 +07:00
JacobBarthelmeh 604d1e8422 ls command working 2025-03-14 09:33:42 +07:00
John Safranek 599c4b856e Curve25519 Compat with LibSSH
1. Add curve25519-sha256@libssh.org back to the list of key exchange
   algorithms.
2. Treat curve25519-sha256@libssh.org as an alias for curve25519-sha256.
3. Remove the reference to ID_ECDH_SHA2_ED25519 from the list of algo
   IDs. It isn't actually a thing.
2025-03-10 14:11:45 -07:00
David Garske cea99e5e83
Merge pull request #787 from wolfSSL/devin/1740666408-add-fatfs-test-action
FATFS improvements, test and Linux example
2025-03-07 06:32:22 -08:00
Andrew Hutchings d8ad0c307b Move (void) to below variable declaration 2025-03-07 06:42:51 +00:00
Andrew Hutchings dfc0f72480 Make the FATFS a cache step 2025-03-06 11:15:29 +00:00
Andrew Hutchings a37591f3f5 Remove FATFS and link to it instead 2025-03-06 10:33:40 +00:00
JacobBarthelmeh c1b983a9d4
Merge pull request #788 from wolfSSL/devin/1740739538-github-action-sftp-test
Add GitHub Action for testing wolfSSH server with Paramiko SFTP client
2025-03-05 14:52:29 -07:00
JacobBarthelmeh 3a4c75f651 compiling with port changes, needs work for runtime use 2025-03-02 16:42:04 -07:00
JacobBarthelmeh c4acd86df5 progress on microchip fs port 2025-03-02 15:17:16 -07:00
JacobBarthelmeh f8598217b6 adding inital function mapping 2025-02-28 16:18:00 -07:00
Jacob Barthelmeh 41cef3309f fix numbering in README steps 2025-02-28 16:17:54 -07:00
Jacob Barthelmeh 48fa1e019e add example code for MPLABX use 2025-02-28 16:17:51 -07:00
Devin AI 647508beb8 Add GitHub Action for testing wolfSSH server with Paramiko SFTP client
Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>
2025-02-28 11:44:42 +00:00
Andrew Hutchings 648bee2314 Add copyright header to fatfs_example.c 2025-02-28 07:21:44 +00:00
Devin AI 86a6544c52 Fix C-style comments in fatfs_example.c
Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>
2025-02-27 20:11:14 +00:00
Devin AI d8e94e55f3 Fix C-style comments in diskio.c
Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>
2025-02-27 19:56:02 +00:00
Devin AI da01ceac13 Add GitHub Action to test FATFS support for wolfsftp client
This adds a GitHub Action workflow to test the FATFS support for the wolfsftp client.
The workflow:
- Installs dependencies
- Clones and builds wolfSSL with appropriate flags
- Compiles the FATFS library
- Configures and builds wolfSSH with FATFS support
- Creates a test file
- Sets up an SSH server
- Uses the wolfsftp client to transfer a test file
- Verifies the file in the FATFS image

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>
2025-02-27 15:40:06 +00:00
Andrew Hutchings 08759f1943 Add FATFS Linux example
This allows a file on the Linux filesystem to be used as a FATFS file.

It also fixes a bug in `port.h` when opening file on a FATFS filesystem.
2025-02-27 12:18:05 +00:00
Andrew Hutchings 0fd8b2033b Fix FATFS compiling
FATFS compiling is currently broken due to several reasons. This fixes:

* Bad parameter count for `WRENAME`
* Missing `WFFLUSH` define
* `WOLFSSH_STOREHANDLE` required for `WOLFSSH_FATFS` to work
* Conflict when `NO_FILESYSTEM` is defined for wolfSSL and
  `WOLFSSH_FATFS` is defined by wolfSSH
* Function called that can't be used with `WOLFSSH_FATFS`
* Functions defined but not used with `WOLFSSH_FATFS`
* Function parameters defined but not used
2025-02-27 09:03:02 +00:00
devin-ai-integration[bot] 76e8b9f4ea
Update SFTP status callback to output once per second (#779)
* Update myStatusCb to output once per second

Modified the myStatusCb function in sftpclient.c to only output status
updates once per second by tracking the last output time and comparing
it with the current time. This reduces the frequency of status updates
while maintaining all existing functionality.

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Reset status output timer when starting new file transfer

When starting a new file transfer, reset the lastOutputTime to ensure
the first status update for the new file is shown immediately.

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Fix Zephyr build by guarding lastOutputTime with WOLFSSH_NO_TIMESTAMP

The lastOutputTime variable is only used when timestamps are enabled,
so it should be guarded by the same macro to avoid unused variable
warnings in builds where timestamps are disabled.

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Move elapsedTime declaration to function scope

Per wolfSSL coding standards, declare all variables at function scope.
Added comment explaining that modern compilers optimize variable access
regardless of declaration placement.

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Fix timeout check to use elapsed time instead of current time

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Use elapsed time in timeout error message for consistency

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Move elapsedTime inside WOLFSSH_NO_TIMESTAMP guard

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Move currentTime outside WOLFSSH_NO_TIMESTAMP guard

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: andrew@wolfssl.com <andrew@wolfssl.com>
2025-02-26 16:54:21 -07:00
JacobBarthelmeh a768c0f640
Merge pull request #785 from wolfSSL/devin/1740508226-sftp-state-var
Fix SFTP data truncation by moving sentSzSave to state structure
2025-02-26 16:41:31 -07:00
Devin AI 502b5a60f5 Fix SFTP data truncation issue by moving sentSzSave to state structure
Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>
2025-02-25 19:00:32 +00:00
David Garske da85e49a20
Merge pull request #764 from JacobBarthelmeh/release
prepare for release 1.4.20
2025-02-20 10:57:45 -08:00
JacobBarthelmeh b62b19c7cd prepare for release 1.4.20 2025-02-19 14:18:29 -07:00
David Garske 055d024b2e
Merge pull request #776 from JacobBarthelmeh/wolfsshd
fix for FD_SET call on pipes and handling of channel EOF
2025-02-19 12:35:27 -08:00
JacobBarthelmeh 3859213936 use childFd when not handling a forced command 2025-02-19 12:00:38 -07:00
JacobBarthelmeh 60cd4bca73 redirect stdin with forced command 2025-02-19 10:32:08 -07:00
JacobBarthelmeh b8b72b6dd8
Merge pull request #783 from LinuxJedi/scp-eagain
Fix SCP server side
2025-02-19 10:02:36 -07:00
Andrew Hutchings a9c7ebc36d Fix SCP server side
SCP on the server side would get an EAGAIN around the 128KB mark, which
would trigger an error. That error in-turn would cause two attempts to
close the file, which would segfault.

Also fix inverted error return status on scpclient.
2025-02-19 11:13:42 +00:00
Daniel Pouzzner 7e9f1ae0b3
Merge pull request #777 from JacobBarthelmeh/testing
sanity check and free temporary strings on failure
2025-02-18 18:09:25 -06:00
JacobBarthelmeh bbe3bac2d5 add regression test and use a better macro name 2025-02-18 10:50:05 -07:00
JacobBarthelmeh 97c3faff8f initialize array and free dynamic strings on failure 2025-02-17 17:52:59 -07:00
JacobBarthelmeh 179df42adb add sanity check before write 2025-02-17 17:40:05 -07:00
JacobBarthelmeh ab3622e672 fix for FD_SET call on pipes and handling of channel EOF 2025-02-17 10:07:39 -07:00
JacobBarthelmeh 697f54a7e5
Merge pull request #767 from LinuxJedi/more-kex
Add DH Group 16 and HMAC-SHA2-512
2025-02-12 10:48:20 -08:00
Andrew Hutchings f73a76e064 Add DH Group 16 and HMAC-SHA2-512
This adds the `diffie-hellman-group16-sha512` key exchange and
`hmac-sha2-512` mac support.

Echoserver can now take `-x` for key exchange and `-m` for mac setting,
 and `-c` for cipher so that this can be used in the test suite.
2025-02-12 07:06:51 +00:00
JacobBarthelmeh 60f90dfad2
Merge pull request #763 from LinuxJedi/RFC-4256
RFC-4256 Keyboard-Interactive authentication
2025-02-11 10:43:42 -07:00
Andrew Hutchings a4733ecd95 RFC-4256 Keyboard-Interactive authentication
This implements Keyboard-Interactive authentication.

Adds an additional callback set by `wolfSSH_KeyboarAuthPrompts()` which
will set a callback in the server to ask the application to provide the
prompt details for the client.
2025-02-11 14:19:52 +00:00
JacobBarthelmeh 34c3794396
Merge pull request #768 from LinuxJedi/client-crash
Fix crash when client has no hostname
2025-02-10 16:34:46 -07:00
Daniel Pouzzner 7ae768a223
Merge pull request #769 from LinuxJedi/testing
Add cppcheck test to GitHub actions
2025-02-07 00:32:00 -06:00
Andrew Hutchings d108c69c5d Add cppcheck test to GitHub actions
Found and fixed:

* Fix typos in Renesas demo
* Fix uninitialized variable reads
* Fix redundant condition
* Fix argument checks
* Fix some null ptr dereferences
* Fix ambiguous statement
2025-02-05 19:49:01 +00:00
Andrew Hutchings 669bf92683 Fix crash when client has no hostname
If the client is not provided a hostname, `ClientPublicKeyCheck` would
crash trying to match `targetName`. A hostname is required.
2025-02-04 11:18:51 +00:00
Sean Parkinson 759bcbd36a
Merge pull request #766 from night1rider/AES_BLOCK_SIZE_opensslcoexist
Adding define for wc_aes_block_size
2025-02-03 15:40:40 +10:00
msi-debian bcbddd0bf2 Adding define for wc_aes_block_size 2025-02-01 16:00:05 -07:00
David Garske a2676877fc
Merge pull request #765 from JacobBarthelmeh/scp
use dynamic buffer for SCP base path
2025-01-31 14:56:16 -08:00
JacobBarthelmeh 9c1f289485 use dynamic buffer for SCP base path 2025-01-31 15:20:00 -07:00
David Garske 86499a5094
Merge pull request #762 from JacobBarthelmeh/kex
Add back in P521 and P384 by default when enabled
2025-01-31 09:59:05 -08:00
JacobBarthelmeh c476e8846e refactor sshd test case script 2025-01-30 18:16:55 -07:00
JacobBarthelmeh c2fefec0eb add debug print out with test case 2025-01-30 17:42:44 -07:00