Commit Graph

1100 Commits (c0c6da75a6fb474740a6fb99f207f44945ccf909)

Author SHA1 Message Date
JacobBarthelmeh c0c6da75a6 adjustment to client side keyboard auth behavior and auth test case 2025-06-13 10:38:13 -06:00
JacobBarthelmeh 7c7d315121 remove keyboard auth callback and use generic auth callback 2025-06-13 10:38:13 -06:00
gojimmypi 429cf16566
DoAsn1Key now fails when WOLFSSH_NO_RSA is defined 2025-06-11 14:24:30 -07:00
Sean Parkinson 5cd826c5eb
Merge pull request #795 from JacobBarthelmeh/decrypt
adjust highwater check location to avoid masking return value
2025-05-22 08:45:02 +10:00
Andrew Hutchings e515ea9dc8 Fix double-free on `wolfSSH_SFTPNAME_readdir`
The filename of the `WS_SFTPNAME` could be freed in this function upon
an error, but it is not set to `NULL`, so when
`wolfSSH_SFTPNAME_free` is called, a double-free occurs.

Found when working on ZD 16290.
2025-05-21 15:51:26 +01:00
JacobBarthelmeh 1cc4418bdf adjust highwater check location to avoid masking return value 2025-05-20 15:17:37 -06:00
Andrew Hutchings e0a1bdd9c4
Merge pull request #804 from ejohnstown/vvv
Soft Disable AES-CBC
2025-05-17 15:53:55 +01:00
John Safranek 0f650789de Soft Disable AES-CBC
1. By default, soft disable AES-CBC. It isn't offered as a default
   encrypt algorithm, but may be set at runtime.
2. Add guard where AES-CBC can be added back as a default.
3. Add option to example client to run it with a custom encrypt
   algorithm list.
4. In the client, add macro to add items to the arg lists while checking
   the number of items in the list.
2025-05-16 11:41:52 -05:00
Andrew Hutchings 3e4d9c0b95 Keyboard Interactive bug fixes
* `keyboardAuthCb` was not initalized correctly, meaning we could
  enable the mode without callback.
* `SendUserAuthKeyboardRequest` didn't check `keyboardAuthCb` for
  `NULL`.
* `DoUserAuthInfoResponse` left `authData` partially uninitialized.
* `DoUserAuthInfoResponse` new checks that KB auth is in progress.
2025-05-06 10:06:22 +01:00
John Safranek 56189a3775 KeyboardInteractive Fix
1. Snip out some extraneous states from the server handshake tracking
   for accept.
2. Change sending the keyboard interactive info response to a reaction
   to a request.
2025-05-05 14:12:21 -07:00
John Safranek 24b7629d78
Merge pull request #800 from LinuxJedi/kbi-fixes
Make Keyboard Interactive a compile time option
2025-05-05 14:02:16 -07:00
Anthony Hu 12d37328ac Customer reported possible unitialized usage 2025-04-28 16:13:42 -04: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
Fabio 6af7d1daa3
Fixed typo
Fixed small typo: Attirbutes -> Attributes
2025-04-09 12:23:43 +02: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 6e8ea49c38 remove extra debug log message and commented out stat items 2025-04-03 16:01:18 -06: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 85bc7ba413
Merge pull request #791 from ejohnstown/sftp-symlink
Fix SFTP Symlink Indication
2025-03-20 10:53:29 -07:00
John Safranek 3386b636cf Fix SFTP Symlinks
1. When making a longname, mask the permission file type bits and check
   it being a link.
2. Mask the permission bits the same way for checking the item being a
   directory.
2025-03-20 09:02:39 -07: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
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
Andrew Hutchings d8ad0c307b Move (void) to below variable declaration 2025-03-07 06:42:51 +00: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
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 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 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
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
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
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
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
Daniel Pouzzner e7be0cd812
Merge pull request #751 from JacobBarthelmeh/scp
SCP hang with interop fix
2025-01-30 16:25:48 -06:00
JacobBarthelmeh 38725f6b1a add back in nistp384 and nistp521 as defaults 2025-01-30 14:58:18 -07:00
JacobBarthelmeh db6d21e9d9 update wolfSSL version listed in comment 2025-01-28 16:25:06 -07:00
Lealem Amedie fd45a864fb Fix SFTP build with WOLFSSH_FATFS 2024-12-13 15:08:40 -07:00
JacobBarthelmeh 3f1e96eed8 set return error with scp failure 2024-11-13 14:53:25 -07:00
Daniel Pouzzner 563e6c4353
Merge pull request #750 from JacobBarthelmeh/scp_example
Scp example free memory on failure
2024-11-09 00:26:26 -06:00
JacobBarthelmeh d288a0deb2 try to close file on socket send failure 2024-11-08 11:18:41 -07:00
JacobBarthelmeh 8ec3bcaa25 pass heap hint to init rng call 2024-11-07 16:47:29 -07:00
Daniel Pouzzner d3a8ec6dc0
Merge pull request #743 from JacobBarthelmeh/sftp
keep trailing delimiter with SFTP open
2024-11-01 14:24:23 -05:00
JacobBarthelmeh 6037d0bba8 error out when buffer is too small for null terminator 2024-10-30 09:43:13 -06:00
Daniel Pouzzner fe25b4ef99
Merge pull request #746 from JacobBarthelmeh/testing
add CI test against master and last two wolfSSL releases
2024-10-15 12:49:25 -05:00