Commit Graph

57 Commits (bfbf0edbb979603ce165a65a0f7101467647a3f2)

Author SHA1 Message Date
John Safranek be69a46db0
Merge pull request #882 from JacobBarthelmeh/sftp
More robust SFTP send/read handling
2026-03-06 07:35:58 -08:00
JacobBarthelmeh 045012c163 adjust when the windows-sftp github actions test is triggered 2026-03-05 13:27:08 -07:00
aidan garske 09144d0c7a Add more wolfSSH CI workflows 2026-03-03 21:22:39 -08:00
JacobBarthelmeh 30ea988943 add Windows wolfsshd <-> wolfsftp test with large transfers 2026-02-27 16:23:27 -07:00
JacobBarthelmeh 83a3990d0d add aditional large SFTP transfer test when the SFTP read/write buffer is increased in size 2026-02-27 16:22:55 -07:00
Andrew Hutchings 33203c3aca Add contention testing
Simulate netowrk latency using netem and use it to test the non-blocking
mode of SFTP. This helps find issues which would affect running an SFTP
server on a microcontroller. It helped find the bug fixed in #876.
2026-02-16 06:42:32 +00:00
JacobBarthelmeh e60aafe955
Merge pull request #876 from LinuxJedi/sftp-hang
Fix SFTP server hang on WS_WANT_WRITE with non-blocking sockets
2026-02-12 15:23:42 -07:00
John Safranek 804aef5b00 Update FatFS Test
1. Update caching the download of the FatFS source archive to the
   pattern other tests are using to cache items. It was downloading
   the FatFS source archive every time, despite it being in the cache.
2. Update building wolfSSL to follow the pattern of the other tests.
2026-02-12 13:14:41 -08:00
Andrew Hutchings 67c7b9cce9 Address items in the review 2026-02-12 06:40:29 +00:00
Andrew Hutchings aa1b1676cb Fix SFTP server hang on WS_WANT_WRITE with non-blocking sockets
When wolfSSH_SFTP_buffer_send() called wolfSSH_stream_send(), the data
would be consumed into the SSH output buffer even if the underlying
socket returned EWOULDBLOCK/EAGAIN. SendChannelData() returns the
positive dataSz on WS_WANT_WRITE, causing the SFTP layer to advance
its buffer index as if the data was sent. The SSH output buffer still
had pending data that was never flushed, leading to an indefinite hang.

Fix: At the start of wolfSSH_SFTP_buffer_send(), check if there's
pending data in ssh->outputBuffer from a previous WS_WANT_WRITE. If
so, attempt to flush it first and return WS_WANT_WRITE if the flush
fails. This ensures the caller retries until all pending data is sent.

Also expose WS_SFTP_BUFFER and wolfSSH_SFTP_buffer_send() as
WOLFSSH_LOCAL for unit testing, and add regression test that verifies
the fix catches the bug.

Fixes ZD 21157
2026-02-05 12:06:46 +00:00
John Safranek 89bcf85d50 Coverity Scan Automation
1. Add GitHub action to run a Coverity scan.
2026-01-22 14:34:38 -08:00
David Garske 1b8e0be48a
Merge pull request #869 from wolfSSL/draft-ietf-sshm-mlkem-hybrid-kex
Add mlkem1024nistp384-sha384 and mlkem768x25519-sha256
2026-01-21 12:55:14 -08:00
John Safranek eae1ecd08b GitHub Actions Update
1. Change all actions to run on push only to master, main, or a release.
2. Change all actions to run on workflow_dispatch.
2026-01-20 15:47:45 -08:00
John Safranek aa1ea29c64 Add ML-KEM with Curve25519 and NISTp384
1. Add GitHub action to test wolfSSL against OpenSSH using MLKEM.
2026-01-20 13:16:45 -08:00
JacobBarthelmeh 4f5f75f714 macos-latest updated in aug to be macos-15 and now was seeing kex test failure, revert to macos-14 2025-08-25 10:27:24 -06:00
Andrew Hutchings c368efb8b2 Make Keyboard Interactive a compile time option
Now an off-by-default compile-time option. This saves resources and
confusion if you are not expecting it.

ZD #19704
2025-04-22 13:12:42 +01:00
aidan garske 3775d1843a newline 2025-04-01 22:05:47 -07:00
aidan garske 69e266178f Used port.h macros 2025-04-01 21:58:49 -07:00
aidan garske 77c8db6cc2 Rebase for tpm public key authentication with wolfssh 2025-04-01 16:44:55 -07:00
Anthony Hu 0183905dbe Replace Kyber 512 with ML-KEM 768.
Devin did some work here.
2025-03-21 19:35:02 -04: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 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
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
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
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
JacobBarthelmeh bbe3bac2d5 add regression test and use a better macro name 2025-02-18 10:50:05 -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
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
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
Daniel Pouzzner e7be0cd812
Merge pull request #751 from JacobBarthelmeh/scp
SCP hang with interop fix
2025-01-30 16:25:48 -06:00
JacobBarthelmeh d5d45ca7a8 add comments on test case 2025-01-30 10:28:35 -07:00
Andrew Hutchings 35bf1f8521 Fix GitHub Actions upload artifact
The v3 support was removed on 2025-01-30
2025-01-30 16:42:37 +00:00
JacobBarthelmeh d9e534797d add memory leak check test 2024-11-15 13:52:48 -07:00
JacobBarthelmeh e8f034372b add example scp test case 2024-11-13 15:22:02 -07:00
JacobBarthelmeh b78fad7eef use older ubuntu version with zephyr test 2024-10-14 11:54:11 -06:00
JacobBarthelmeh 9e68977945 test setting different wolfssl version for test 2024-10-11 16:23:20 -06:00
John Safranek 8d1efe9fdf Testing Update
1. Update the sshd test to use the newer actions.
2. Parameterize the test for macos and ubuntu.
3. Parameterize the version of wolfssl used.
4. Parameterize the wolfSSH options used.
5. Update a couple test scripts to output their $0 variable instead of
   the wrong string.
2024-10-04 15:44:15 -06:00
Eric Blankenhorn 0719578e29 Fix testsuite with singlethreaded 2024-07-01 09:12:36 -05:00
John Safranek c004c15232 Update Test
1. Change kyber test to use the cache naming in the other test.
2. Remove moving wolfSSL to another directory. Clears a bunch of
   warnings.
3. Build liboqs to install in the same directory as wolfSSL.
2024-05-17 16:32:50 -07:00
John Safranek ed58ea0755 Update Test
1. Add a new test that checks both macOS and Ubuntu in one test, rather
   than as two separate tests.
2. Remove the old ubuntu and macos tests.
2024-05-17 16:10:48 -07:00
John Safranek 8da722e0ec Kyber Testing
1. Switch to using variables for the versions.
2. Updated cache use per recommondations.
3. Renamed the cached items with "kyber" in the name.
2024-05-16 09:21:34 -07:00
John Safranek 19e39d9491 Kyber Testing
1. Updated to use more standard actions.
2. Cache the outputs of the dependencies.
2024-05-15 18:52:27 -07:00
John Safranek c053303caa Kyber Testing
Add a workflow for a kyber test.
2024-05-15 16:44:07 -07:00
John Safranek 2a139c9ed5
Merge pull request #677 from julek-wolfssl/zephyr-nofs
Add NO_FILESYSTEM to Zephyr port
2024-05-02 12:12:47 -07:00
John Safranek 1254c939c9 macOS Action Update
1. In the brew install step explicitly install autoconf and add libtool.
2. Skip running autogen.sh for wolfSSH, just use autoreconf directly.
3. Use "--enable-wolfssh" when building wolfSSL.
2024-04-26 09:11:48 -07:00
Juliusz Sosinowicz 2b2337055a Add NO_FILESYSTEM to Zephyr port 2024-04-16 16:27:51 +02:00
John Safranek 4193671164
Merge pull request #657 from JacobBarthelmeh/sftp_large
Fix for large file transfers on client side with SFTP
2024-02-15 17:39:56 -08:00
JacobBarthelmeh cd3130fa7e add large sftp file transfer test case 2024-02-15 09:32:58 -07:00