1. When filtering out the unknown names from name lists, the one that
will be the client's guess KEX type can get removed if unknown. Let
the first item in the client's list be added if unknown.
1. Moved the options checking to internal.h so other sources can use it.
2. Added some additional option checks and groups.
3. Added some guard checksto the key exchange.
Added some additional bounds checking to some of the parameters in the
public key user auth messages. There was a chance that an out of bounds
buffer read could happen.
1. Add P-384 and P-521 sample user public and private keys.
2. Add DER format versions of the sample user private keys.
3. Add the sample user public keys for P-256 and RSA-2048.
4. Fix a bug where the user authentication signing would fail if using an ECDSA curve other than P-256.
1. If RSA is disabled in the wolfCrypt build, the RSA related code
in wolfSSH shall be disabled.
2. Examples will force themselves to use ECC if RSA is disabled.
1. A couple places weren't passing the correct heap pointer to free.
Normally this was ignored in the build because the WMALLOC macro left
them out. Found using wolfCrypt memory logging.
2. Replaced the call to strdup() with wstrdup() that takes a heap and
type parameter so sit may allocate a buffer with WMALLOC() and be
freed correctly by WFREE().
3. Tweaked the client to use a preallocated buffer for the private key
rather than letting ReadKey allocate one. (Another WFREE() heap/type
issue.)
When changing the functions SendChannelData() and
SendChannelAdjustWindow() to use the self channel ID instead of the peer
channel ID, forgot to update a couple instances. The test case at the
time had matching ID numbers for self and peer and happened to work.
wolfSSL v4.5.0 introduced a new function, `wc_ecc_set_rng()`, which is
present when ECC_TIMING_RESISTANCE is enabled. Added a check to the
configure script for that function, and disable calls to the function
if it isn't present. This allows wolfSSH to build against older
versions of wolfSSL.