Commit Graph

107 Commits (a2a78da28a0c8b2bc8d87e96f16c3f05cc591cb0)

Author SHA1 Message Date
Yosuke Shimizu 673b2d25e7 Report allocated port in tcpip-forward reply
- Reply to a port-0 (dynamic) tcpip-forward with the bound port.
- Add WS_FWD_PORT_CHECK (1024) as the status/port boundary in WS_FwdCbError.
- Callback returns a WS_FwdCbError status below it, the port at or above it.
- DoGlobalRequestFwd reports the port and rejects a port-0 setup with none.
- Map a callback rejection to WS_RESOURCE_E so a no-reply request keeps the link.
- Update the echoserver reference callbacks (examples and Espressif) to
  recover the OS-chosen port with getsockname() and return it under the new
  convention.
- Add regress coverage for the allocated-port and rejection paths.

Issue: F-5573

Co-authored-by: John Safranek <john@wolfssl.com>
2026-06-25 13:27:00 -07:00
JacobBarthelmeh dc4df8dfdf keep a list of file handles open per session
- Track open SFTP file handles per session in a fileList, returning
  opaque session-scoped handle IDs instead of raw file descriptors.
- Resolve and validate client-supplied handle IDs via FindFileHandle.
- Free the handle list and close handles on error paths, including the
  Windows code paths.
- Drop the old raw-fd SFTP_ValidateFileHandle/STOREHANDLE handle table
  and its tests, superseded by the per-session ID lookup.
2026-06-22 20:11:36 -07:00
John Safranek e8793bb268 UTF-8 -> 7-bit ASCII cleanup
1. replace section symbol with 'sec'
2. replace right arrow with '->'
3. replace m-dash with '--'
4. replace less-than-equatal-to with '<='
2026-05-18 14:35:58 -07:00
John Safranek b610dd75c4 sftp Client Windows Version
The project file for the wolfSFTP example client is specifying a
too-specific Windows target platform version. It is the only project
file specifying the version to four places. Removed it and using the
default Windows version for the version of the build tools.
2026-04-27 13:42:06 -07:00
John Safranek 8951bd9209 Release v1.4.22
1. Update copyright date to 2026.
2025-12-29 16:53:33 -08:00
John Safranek f1b5b78a98
Merge pull request #847 from miyazakh/sftpclient_RX72N
sftp client example for Renesas RX72N
2025-12-18 09:44:09 -08:00
Eric Blankenhorn 4c7ca0e9eb
Merge pull request #851 from lealem47/vs_fips
Add FIPS configurations to Visual Studio project
2025-12-15 16:35:53 -06:00
Lealem Amedie 1adcdebc1e Documentation feedback 2025-12-15 14:59:32 -07:00
Lealem Amedie 7ed7cd6a7f Add some documentation for the FIPS configs 2025-12-12 10:25:39 -07:00
Hideki Miyazaki 63ed4eb072 Addressed code review comments
- enable TSIP
 - clean up user_settings.h
2025-12-10 04:51:19 +09:00
Hideki Miyazaki 344bba5e51 Addressed review comments
- renamed wolfstp_util.c to wolfsftp_util.c
 - removed unnecessary if condition
2025-12-10 04:51:19 +09:00
Hideki Miyazaki 23cc902466 update README 2025-12-10 04:51:19 +09:00
Hideki Miyazaki 9c9d1b0ee1 sftp client example for Renesas RX72N 2025-12-10 04:51:19 +09:00
Lealem Amedie dc9321b714 Add FIPS configurations to Visual Studio project 2025-12-05 16:45:11 -07:00
hanshenrik 44dc148dbd replace sys/errno.h with errno.h
Historically, some systems have used <sys/errno.h> in place of <errno.h>, but the C standard,
 all the way back to C89/Ansi C, specifies that the correct name is `errno.h` -
and most modern compilers create a sys/errno.h compatibility shim sys/errno.h -
but musl-gcc does not have this compatibility shim,
 reasoning that sys/errno.h is non-standard, and fails to compile:
```
$ CC=musl-gcc ./configure --enable-static --disable-shared --enable-scp --enable-sftp --enable-shell --with-wolfssl=wolfssl/install-musl
(...)
$ make
make -j17  all-am
make[1]: Entering directory '/home/hans/projects/wolfssh'
  CC       examples/client/common.o
  CC       examples/client/client.o
  CC       src/libwolfssh_la-ssh.lo
  CC       src/libwolfssh_la-internal.lo
  CC       src/libwolfssh_la-log.lo
  CC       src/libwolfssh_la-port.lo
  CC       src/libwolfssh_la-io.lo
  CC       src/libwolfssh_la-wolfscp.lo
  CC       src/libwolfssh_la-wolfsftp.lo
  CC       examples/echoserver/echoserver.o
  CC       src/libwolfssh_la-wolfterm.lo
  CC       examples/sftpclient/sftpclient.o
  CC       examples/scpclient/scpclient.o
In file included from examples/echoserver/echoserver.c:91:
/usr/include/x86_64-linux-musl/sys/errno.h:1:2: error: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Werror=cpp]
    1 | #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
      |  ^~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:1452: examples/echoserver/echoserver.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/hans/projects/wolfssh'
make: *** [Makefile:1020: all] Error 2
```

so, unless we need to support pre-C89 (35+ year old C) compilers,
we can just replace sys/errno.h with errno.h.
2025-11-22 17:40:20 +01:00
gojimmypi dccc62bafd
Rename wolfssh test certs 2025-09-03 11:10:53 -07:00
JacobBarthelmeh 333cf30d60 fix for make dist 2025-08-21 11:07:50 -06:00
JacobBarthelmeh abc4e27e3c refactor internal handle list and set filesystem override priority 2025-06-13 16:32:06 -06:00
gojimmypi 89013e73cf
Update Espressif README with getting started info. 2025-06-12 11:36:35 -07:00
gojimmypi b9658bc801
Update Espressif Examples 2025-06-11 15:37:14 -07:00
David Garske d3bd96f210
Merge pull request #790 from JacobBarthelmeh/pic32
microchip example and filesystem port
2025-04-04 10:04:16 -07:00
JacobBarthelmeh ae5fa76f74 update include.am for correct mplabx files 2025-04-04 10:15:30 -06:00
JacobBarthelmeh 79d32d0f80 create library build exmaple 2025-04-02 17:17:40 -06:00
JacobBarthelmeh 5fb496b9aa add chmod support, update readme and example app 2025-03-19 14:32:18 +07:00
JacobBarthelmeh 4f9e6b5732 remove some trailing white space and initialize get current drive buffer 2025-03-18 15:13:48 +07:00
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
Andrew Hutchings a37591f3f5 Remove FATFS and link to it instead 2025-03-06 10:33:40 +00: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
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 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
gojimmypi fa23bf58df
Adjust Espressif wolfssl_echoserver example timehelper 2024-07-22 20:57:03 -07:00
gojimmypi 45a857b960 Update Espressif examples for Managed Component publish 2024-05-22 16:10:44 -07:00
Lealem Amedie a87fe3fce5 Updates to STM32Cube Pack 2024-05-02 16:33:43 -06:00
John Safranek 1736a4cabf
Update Copyright Date
1. Bring all copyright dates up to 2024.
2. Fix a few files with incorrect licensing.
2024-03-22 12:17:09 -07:00
gojimmypi 10e7cd8d72 Espressif examples: template and echoserver 2024-01-11 16:37:13 -08:00
JacobBarthelmeh 39983a2c6c revert header on sln 2023-09-14 14:54:11 -06:00
JacobBarthelmeh e397f9983f remove DDL typo and update wolfSSHd for DLL Release 2023-09-14 14:49:47 -06:00
JacobBarthelmeh 61fdf5cb0b fix DLL VS build configurations for wolfsshd and wolfsftp-client projects 2023-09-13 16:33:36 -06:00
JacobBarthelmeh 034ed7fe9f fix ups for format, spelling, includes, and string compare 2023-08-30 13:32:17 -07:00
JacobBarthelmeh 9993a26add parse command line arguments for Windows service 2023-08-30 09:08:25 -07:00
JacobBarthelmeh da32306628 fix for rekey with wolfsshd, improve wolfsshd vs project 2023-08-30 09:08:25 -07:00
JacobBarthelmeh ab742ca766 wolfSSHd port to Windows
handling of terminal size adjustments

stub case for ECH virtual terminal command
2023-08-30 09:08:25 -07:00
Lealem Amedie 66e19b74d4 Document Cube Pack dependencies 2023-05-03 14:56:52 -06:00
JacobBarthelmeh 5971e8a4fa warning fixes and windows build 2023-04-04 14:59:46 -07:00