Commit Graph

2227 Commits (dccc62bafd5c8edebe74ad323a3bbaa881328e95)

Author SHA1 Message Date
gojimmypi dccc62bafd
Rename wolfssh test certs 2025-09-03 11:10:53 -07:00
John Safranek 7fdcf2400b
Merge pull request #830 from kareem-wolfssl/zd20435
Rename struct Buffer to WOLFSSH_BUFFER in wolfSSH_ShowSizes to match previous rename.
2025-08-26 10:48:53 -07:00
JacobBarthelmeh 89e25c8071
Merge pull request #828 from ejohnstown/index-shadow
Fix Shadowed Index
2025-08-25 15:12:01 -06:00
Kareem dac3db8a83 Rename struct Buffer to WOLFSSH_BUFFER in wolfSSH_ShowSizes to match previous rename. 2025-08-25 11:30:18 -07:00
John Safranek cb695c91ed Fix Shadowed Index
1. For the Query name by index functions, rename `index` as `idx`. Some
   versions of the C library have a global named `index` that can get
   shadowed.
2. Fix some whitespace.
2025-08-25 09:59:37 -07:00
John Safranek 41d656222c
Merge pull request #827 from JacobBarthelmeh/test
fix for make dist
2025-08-25 09:54:33 -07: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
JacobBarthelmeh 333cf30d60 fix for make dist 2025-08-21 11:07:50 -06:00
John Safranek cd9ed14467
Merge pull request #825 from tjko/pubkeyauth_fix
Fix "rejected" authentication in DoUserAuthRequestPublicKey()
2025-08-21 08:21:57 -07:00
Timo Kokkonen 5abc8d623e Fix formating (untabify). 2025-08-12 22:27:15 -07:00
Timo Kokkonen a6dd9f1657 Fix to WOLFSSH_USERAUTH_REJECTED result from user authentication callback
getting ignored for public key authentication.
This changes behavior to be similar to other authentication methods.
2025-08-03 21:16:19 -07:00
JacobBarthelmeh 04165fc24b
Merge pull request #823 from tjko/ed25519_keygen
Add ED25519 key generation support.
2025-08-01 10:42:47 -06:00
John Safranek 447024fcc7
Merge pull request #819 from JacobBarthelmeh/ext_info
only send ext info once after SSH_MSG_NEWKEYS
2025-07-31 13:30:47 -07:00
Timo Kokkonen d557c244f2 Add ED25519 key generation support. 2025-07-30 23:45:19 -07:00
JacobBarthelmeh 201029797b only send ext info once after SSH_MSG_NEWKEYS 2025-07-30 11:40:49 -06:00
John Safranek 69b2feebdd
Merge pull request #807 from JacobBarthelmeh/keyboardauth
remove keyboard auth callback and use generic auth callback
2025-07-25 12:23:09 -07:00
JacobBarthelmeh 8a8ee954d3 in want write case with example echoserver do not wait on select for data 2025-07-25 11:32:02 -06:00
JacobBarthelmeh c998efc85f add check in shutdown case for WS_CHAN_RXD 2025-07-25 11:32:02 -06:00
JacobBarthelmeh a6e523886f fix for clang scan-build warning of variable not used 2025-07-25 11:32:02 -06:00
JacobBarthelmeh 559de0bb3d better handling of rekeying with SFTP 2025-07-25 11:32:02 -06:00
JacobBarthelmeh 73cf79e2ce clang scan-build warning fix 2025-07-25 11:32:02 -06:00
JacobBarthelmeh 01dd6ec3dc fixes for SFTP want read/write cases 2025-07-25 11:32:02 -06: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
JacobBarthelmeh 88d4eae96a remove keyboard auth callback and use generic auth callback 2025-07-25 11:31:02 -06:00
John Safranek 93ddf8fede
Merge pull request #822 from rlm2002/zd20212
Zendesk Coverity changes
2025-07-23 11:16:17 -07:00
Ruby Martin 4796e346ad add ret checks for WS_SUCCESS to prevent dereference after null check
NULL check before dereferencing authData

additional checks

formatting changes

adjust return values
2025-07-22 16:04:19 -06:00
David Garske 86f3edc0a9
Merge pull request #816 from JacobBarthelmeh/test
fix inet_addr accounting for '.' character
2025-07-22 09:51:06 -07:00
JacobBarthelmeh 989d34f214
Merge pull request #821 from ejohnstown/autoconf
Autoconf and Automake Updates
2025-07-21 16:03:39 -06:00
JacobBarthelmeh 3a87c57ec7
Merge pull request #820 from ejohnstown/cov
Fixing a batch of issues reported by Coverity
2025-07-21 14:44:00 -06:00
John Safranek 6aa0dd26cd Automake Update
1. Remove redundant empty variable initializations.
2. Regroup some value appends into a single assignment.
2025-07-21 11:48:25 -07:00
John Safranek e238eabbc0 Autoconf Update
1. Update the version requirements of libtool, automake, and autoconf to
   version contemporary to the first release of wolfSSH.
2. Group all checks of `ENABLED_TPM` into one `AS_IF`.
3. Group all checks of `ENABLED_SSHD` into one `AS_IF`.
4. Replace `if` and `case` with `AS_IF` and `AS_CASE`.
2025-07-21 11:47:26 -07:00
Ruby Martin 13a1c4a046 check ssh->ctx before dereferencing 2025-07-21 10:44:12 -06:00
John Safranek 903bbc7fb2 Coverity: Argument cannot be negative
1. Due to not checking the result of fseek(), it is possible to try to
   malloc() -1 bytes of storage. Checking the return from fseek() and
   erring if negative.
2. Changing the check between the result of fseek() and fread() to match
   signedness. Adding some casting, as at that point the fseek() result
   is always positive.

Fixes CIDs:
  573009 572928 572868
2025-07-21 09:36:35 -07:00
John Safranek c641294fc3 Coverity: Buffer not null terminated
1. When copying the shell, leave a byte free in the dest buffer. Fill it
   with a null.

Fixes CID: 572891
2025-07-21 09:17:21 -07:00
John Safranek 4700799fcc Coverity: Dereference before null check
1. After getting the user's pw info, don't check that the shell value is
   null. We've already use it at that point.

Fixes CID: 572919
2025-07-21 09:17:21 -07:00
John Safranek f24c3c262c Coverity: Dereference before null check
1. When cleaning the path, check that the path pointer is not null
   before using it.
2. Move the strlen of path.
3. Remove the second check of path, and just loop over it.

Fixed CID: 572847
2025-07-21 09:17:21 -07:00
John Safranek cc83fc3543 Coverity: String not null terminated
1. Swap out strdup() for a malloc() and memcpy(). Then nul terminate the
   string before tokenizing.

Fixes CID: 572834
2025-07-21 09:17:21 -07:00
Ruby Martin a76e80f03e AlgoListSz returns 0 if algoList is NULL 2025-07-21 09:17:54 -06:00
JacobBarthelmeh 8c0c7fd240
Merge pull request #818 from ejohnstown/debug-flags
Simplify Test Build Flags
2025-07-17 17:04:57 -06:00
John Safranek c855d9c16e Simplify Test Build Flags
1. Modify all the test executable `CPPFLAGS` to only have
   `-DNO_MAIN_LOOP` and `AM_CPPFLAGS`. This removes a lot of duplicate
   setup of flags for each of the tests.
2. Delete the echoserver's `CFLAGS`. It is just setting the `CFLAGS` for
   its compile to `AM_CFLAGS` and `AM_CPPFLAGS` which are included by
   default.
3. Add the macro WS_MAYBE_UNUSED that may be the unused attribute.
4. If INLINE isn't set to some form of inline, set it to
   WS_MAYBE_UNUSED.
5. Remove redundant ThreadStartNoJoin() macros from the testing header.
2025-07-17 15:30:24 -07:00
Daniel Pouzzner 0b451e5634
Merge pull request #817 from ejohnstown/cov
Fixing a batch of issues reported by Coverity
2025-07-14 11:18:36 -05:00
John Safranek 441f975ed6 Coverity: 'Constant' variable guards dead code
1. Remove the default password from the wolfSSH client app main
   function. It isn't set to anything. (It was originally an example
   client option.)
2. Remove handling the default password from the wolfSSH client app's
   user authentication callback.
3. Set the password size directly.
4. Changed a void typecast to WOLFSSH_UNUSED.

Fixes CID: 572898
2025-07-11 14:50:22 -07: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
John Safranek 92cfb2e052 Coverity: Side effect in assertion
1. Modify AssertNotNull() to use the same pattern as AssertNull(). The
   macro assigns the pointer to a local variable and that is checked.

Fixes CIDs:
  537020 573008 573010 573011 573013 573014 573015
  573016 573017 573018 573022 573023 573024
2025-07-11 14:06:43 -07:00
JacobBarthelmeh 702291b16d fix inet_addr accounting for '.' character 2025-07-10 17:35:57 -06:00
JacobBarthelmeh dd377d6d53
Merge pull request #815 from ejohnstown/fallthrough
Change switch fallthrough
2025-07-10 15:15:39 -06:00
John Safranek b7289f1944 Change switch fallthrough
1. Remove the macro definition and checks for the value "NO_BREAK".
2. Use the wolfCrypt defined macro FALL_THROUGH instead of NO_BREAK.
2025-07-10 11:30:43 -07:00
John Safranek 1828eeaf8e
Merge pull request #814 from sebastian-carpenter/GH-issue-813
rearranged evaluation of unsigned condition
2025-07-08 14:30:26 -07:00
Sebastian Carpenter ad07df0fa6 rearranged evaluation of unsigned condition
these two expressions were in danger of an underflow event
2025-07-07 09:35:51 -06:00