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
- Reject SSH_MSG_NEWKEYS when len != 0 per RFC 4253 7.3.
- Update wolfSSH_TestDoNewKeys to take buf/len/idx instead
of assuming NULL/0, and add a non-zero len test case.
Issue: F-2079
- Without the guard, inner loops short-circuit and WS_SUCCESS
is returned without any verification.
- Add test case covering the new and existing bad-arg paths.
Issue: F-409
- 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
When a server sends first_kex_packet_follows=TRUE with an incorrect KEX
algorithm guess, the client now silently discards the server's speculative
KEXDH_REPLY message by checking ignoreNextKexMsg at the top of DoKexDhReply,
matching the existing server-side handling in DoKexDhInit. Add regression
test covering the client-side skip path.
Affected functions: DoKexDhReply.
Issue: F-2863
1. Collect all the test function wrappers in internal.c to one location
at the end of the file.
2. Update API test to check other algos if RSA or ECDSA are disabled.
3. Added guarded tests TestClientBuffersIdempotent() for WOLFSSH_NO_RSA
and WOLFSSH_NO_ECDSA_SHA2_NISTP256. If both are set, the test is
skipped.
Replace rewind() with fseek(f, 0, SEEK_SET) in the test helper
function. rewind() internally clears errno, which scan-build flags
as overwriting a previously unchecked errno value. fseek() to
offset 0 is functionally equivalent without the implicit errno
reset.
Static analysis indicated the potential to double-free a pointer in the
`wolfSSH_CTX_UseCert_buffer()` test. Loading the second cert after
freeing the first cert could fail and the test cleanup would free the
pointer again. Just set pointer to null after freeing.