- Add test_DoChannelWindowAdjust_overflow via new
wolfSSH_TestDoChannelWindowAdjust wrapper.
- Seed non-zero peer window, feed bytesToAdd = UINT32_MAX,
assert WS_OVERFLOW_E with window unchanged.
- Feed a fitting value, assert window advances.
- Covers the guard so flipping or deleting it now fails.
Issue: F-2874
- fail userauth when the request sets the password-change flag
- do not invoke the userauth callback with the current password
- parse the new-password field so the message is fully consumed
- add negative unit test asserting USERAUTH_FAILURE and no callback
Per RFC 4252 section 8, an expired password MUST NOT be used to
authenticate; password changes remain unsupported.
Issue: #1047 (6)
- enforce RFC 4253 section 6 minimum of 4 padding bytes on receive
- return WS_BUFFER_E when padding_length is below MIN_PAD_LENGTH
- add negative unit test driving DoReceive with a short-padded packet
Issue: #1047 (5)
- remove redundant useCurve25519MlKem HandshakeInfo flag
- merge the duplicate Curve25519 keygen branch in SendKexDhInit
- order the client KeyAgree dispatch to match the combined flags
- rename the surviving flags for clarity: useEcc->useEcdh and
useEccMlKem->useMlKem
- make the flag set orthogonal: each ML-KEM hybrid now sets its
classical-component flag (useEcdh or useCurve25519) alongside useMlKem,
so the four bits independently describe every KEX family
- apply the same flag handling to the server SendKexDhReply path
- ECDH and ECC+ML-KEM hybrid: validate the peer point through a shared
EccCheckPeerKey helper (import + wc_ecc_check_key) on client and server,
so the plain and hybrid paths cannot diverge
- add wolfSSH_TestKeyAgreeEcdh_server/client and wolfSSH_TestSetDhKexKey
test hooks
- add negative unit tests rejecting bad DH and off-curve ECDH peer keys on
client and server; the hybrid paths share the same helper and are
exercised by kex.test
Issues: F-5690, #1047 (1)
Run the DoUserAuthRequestRsa vectors through the X.509 path to pin
that a raw signature with a high leading bit is accepted via the
RFC 6187 branch. keys/ has no RSA certificate, so the test embeds a
self-signed cert made from keys/hansel-key-rsa.pem (valid until
May 2048).
- Validate blob algorithm name against handshake pubKeyId
- Derive curve from negotiated algo, not the key blob
- Check curve name instead of skipping it
- Add a ParseECCPubKey test checking the key blob algorithm and
curve names are validated against the negotiated host key
algorithm.
Issue: #1012
- GetMpint now rejects values with the sign bit set as
non-canonical (RFC 4251 Section 5) and is rewritten in
terms of GetStringRef.
- Parse RSA signature blobs with GetStringRef; they are
strings of raw signature bytes (RFC 4253 Section 6.6),
not mpints, and often have the high bit set.
- Add unit test covering GetMpint parsing and rejection.
- Add a DoUserAuthRequestRsa test pinning the string parse of
the signature blob with a fixed signature whose leading byte
has the high bit set; an mpint parse would reject it as
negative.
Issue: #1013
- Add CertManIntermediateIsCA: require isCA and, for non-self-signed
intermediates that carry a KeyUsage extension, the keyCertSign bit
before promoting a cert.
- Only promote a verified intermediate into the trust store when it is
actually a CA; otherwise fail with WS_CERT_NO_SIGNER_E.
- Prevents a peer-supplied end-entity cert at an intermediate position
from being trusted to issue certs for arbitrary SSH principals.
- Gate keyCertSign on ALLOW_INVALID_CERTSIGN and on the KeyUsage
extension being present, matching wolfSSL's AddCA loader.
- Add regression tests: non-CA intermediate is not promoted, and a
valid CA intermediate (with and without KeyUsage) still is.
Issue: F-5851
- Per RFC 4253 4.2 use WSTRNCMP instead of WSTRNCASECMP for
prefix and full-ID comparisons.
- Update client tests; add server test vectors expecting
rejection of lowercase/mixed case.
Issue: F-2865
- Add retain-on-free and size-tracking capture allocators to inspect
freed buffers post-free.
- Verify SshResourceFree zeroes ssh->k, ssh->keys, and ssh->peerKeys
before wolfSSH_free releases the struct.
- Verify KeyAgreeDh_client wipes ssh->handshake->x even when wc_DhAgree
fails (ForceZero is unconditional).
- Verify KeyAgreeDh_server zeroes the MAX_KEX_KEY_SZ y_ptr allocation
under WOLFSSH_SMALL_STACK via 0xCC poisoning.
- Expose KeyAgreeDh_client / KeyAgreeDh_server via wolfSSH_Test* hooks
under WOLFSSH_TEST_INTERNAL.
Issues: F-2488, F-2492, F-2493, F-2875
- Map ed25519 verify_msg_final errors to WS_CRYPTO_FAILED
and status==0 to WS_ED25519_E (no longer overwritten)
- Expose DoUserAuthRequestEd25519 via test shim
- Add unit test covering valid and tampered signatures
Issue: F-3445
- Track txMsgCount/rxMsgCount per key epoch and reset on NEW_KEYS;
seq/peerSeq still wrap freely per RFC 4253 Sec 6.4.
- Extend HighwaterCheck to fire highwaterCb when packet count crosses
msgHighwaterMark (default 2^31, RFC 4344 Sec 3.1).
- Add wolfSSH_CTX_SetMsgHighwater / SetMsgHighwater / GetMsgHighwater.
- Consolidate receive-path HighwaterCheck into DoPacket so byte- and
packet-count thresholds share a single canonical fire site.
Issue: F-246
1. Client skips non-SSH lines (RFC 4253 4.2); server rejects them
2. 255-byte per-line cap and 10-line cap (WOLFSSH_MAX_BANNER_LINES)
3. 28 test vectors plus scripted-IO mock for WANT_READ resumption
Issue: F-606
The client wasn't validating the DH group parameters in the KEX DH GEX
Group message. This adds a function to perform the validation of the
prime `p` to verify it is safe. (Prime and that ((p - 1) / 2) is
prime.) Also adds a test to a known unsafe prime and known safe prime
to verify the validate function.
Affected function: DoKexDhGexGroup.
Issue: F-1688
1. Update the release date in the ChangeLog.
2. Move some compiler guards around to hush warnings depending on the
build options.
3. Fix a string name for ECDSA P521 algo.
4. Fix a stray static function definition.
5. For FIPSv5 builds, add CAST tests to the API test and testsuite.
6. Add the wolfSSH_Init() and wolfSSH_Cleanup() to the unit test.
1. Remove the flag NO_MAIN_FUNCTION from the test tools.
2. For unit and api tests, follow the patter for the testsuite with its
NO_TESTSUITE_MAIN_DRIVER check.
1. Move ConvertHexToBin() and Base16_Decode() into test.h.
2. Add a description for the options in test.h.
3. Add a static to the hexDecode const array for Base16_Decode().
4. Add the check for options.h/user_settings.h to api and unit tests.
1. Rename ApiTest() and UnitTest() with wolfSSH prefix.
2. Modify wolfSSH_ApiTest() and wolfSSH_UnitTest() to take argc and argv
parameters.
3. Add main functions to the unit and api tests, that can be left out of
the build with the flag NO_MAIN_FUNCTION.
1. All the sources for the tests and examples did not have an include
for config.h. This fixed some inconsistent builds with an older
version of gcc.
2. Moved config.h from the src directory to the top level of the repo
directory.