Commit Graph

24 Commits (c71202ffdb92202cc53bd520ee45f438d2edded4)

Author SHA1 Message Date
John Safranek 26ccac3cdd examples, tests: terminate the ES_ERROR messages with a newline
ES_ERROR() passes its arguments straight to fprintf(stderr, ...), so a
message with no trailing newline runs into whatever the shell or the
test harness prints next.

- 7 sites in the echoserver, 6 in tests/auth.c, 8 in the Espressif copy
  of the echoserver, which carries the same macro and takes this kind of
  cross-cutting fix (e91ff50d, ab8058d7)
- the two wrapped format strings already ended with a newline
2026-08-28 18:22:34 -05:00
John Safranek 5fb7be429b fix: validate keyboard-interactive prompts
RFC 4256 section 3.3 forbids an empty prompt, and RFC 4251 section 5
allows only 0 or 1 in a boolean field. Validation runs before the
payload is sized, so the sizing and building passes agree.

- reject a zero-length prompt or one with a NULL buffer
- reject a prompt count with the arrays unset
- reject a prompt over WOLFSSH_MAX_PROMPT_SZ, which the sizing pass
  would otherwise sum into a wrapped payload size
- normalize the outgoing echo byte to 0 or 1
- cover the rejections in tests/api.c, the echo byte in tests/auth.c

Issue: F-10583, F-10584
2026-08-28 17:45:20 -05:00
Ruby Martin ab8058d7cd check return value of WFTELL() 2026-08-10 10:19:45 -07:00
Ruby Martin 2a30f48772 Update WFSEEK call sites that may misinterpret return value in Harmony/Nucleus builds 2026-08-10 10:19:45 -07:00
John Safranek c61c7a04dd client: fix keyboard-interactive responses
- zero the response arrays and stop filling after the first
  failed read, tracking only the slots populated
- release the previous round's responses on each INFO_REQUEST
- add auth.test coverage for EOF stdin and a second round

Issue: F-7515, F-7516
2026-08-10 10:31:07 -06:00
Emma Stensland 47ddc70b40 added check for private and public keys decoded 2026-07-31 16:14:52 -07:00
Yosuke Shimizu 5acbeaeaee Run threaded api-test SFTP/SCP tests on Windows 2026-07-22 17:29:27 -05:00
Emma Stensland 1f674b0ec7 SSHD/Echoserver: Fix memory leaks and public-key lookup 2026-07-17 20:01:44 -05:00
Yosuke Shimizu 4ae8eee109 Add tests for DoUserAuthRequestRsa and DoUserAuthRequestRsaCert 2026-05-27 14:44:10 -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
Yosuke Shimizu a5eb03c01b Add integration test for wrong ECC signature scenario 2026-05-11 16:25:21 -07:00
John Safranek bfbf0edbb9 7-bit Clean ASCII
Clean up the main set of files to be 7-bit clean ASCII. There were many
single and double-quotes and n-dashes.
2026-04-22 10:27:06 -07:00
Yosuke Shimizu 19d34a8df7 Add auth tests to verify cases of invalid/unknowen return value 2026-04-22 08:32:24 -07:00
Yosuke Shimizu 9e3eee1276 Fix existing tests 2026-04-15 11:04:09 +09:00
Yosuke Shimizu 22f9ef8ddb Add an integration test where a client authenticates using public key 2026-04-14 09:16:21 +09:00
aidan garske 09144d0c7a Add more wolfSSH CI workflows 2026-03-03 21:22:39 -08:00
John Safranek 8951bd9209 Release v1.4.22
1. Update copyright date to 2026.
2025-12-29 16:53:33 -08:00
gojimmypi dccc62bafd
Rename wolfssh test certs 2025-09-03 11:10:53 -07:00
JacobBarthelmeh b60c599c36 auth test case account for no null terminator with strings when comparing values 2025-07-25 11:32:02 -06:00
JacobBarthelmeh 1bee0c19ab adjustment to client side keyboard auth behavior and auth test case 2025-07-25 11:32:01 -06:00
John Safranek 538ae15310 Coverity: Resource leak
1. Fix some resource leaks during error conditions where a socket or a
   file descriptor doesn't get closed in all error cases.
2. In wolfSSH_SFTP_RecvOpen(), initialize the file descriptor.
3. For 572902, the error case resource leaks are fixed. There's still an
   issue to resolve for storing the FD for use later.

Fixes CIDs:
  572856 572902* 573012 573019 573021 573076
2025-07-11 14:06:46 -07: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
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
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