wolfssh
                                
                                 wolfssh copied to clipboard
                                
                                    wolfssh copied to clipboard
                            
                            
                            
                        Callback on keying completion, plus wolfSSH_GetText.
A callback is optionally invoked on keying completion. From within this callback it's possible to invoke wolfSSH_GetText() to get a textual representation of a few internal variables, identified by the WS_Text enum.
Can one of the admins verify this patch?
ok to test
Might be dependent on another PR? This is the report from Jenkins:
  CC       src/libwolfssh_la-io.lo
src/ssh.c:2212:13: error: 14 enumeration values not handled in switch: 'WC_HASH_TYPE_NONE', 'WC_HASH_TYPE_MD2', 'WC_HASH_TYPE_MD4'... [-Werror,-Wswitch]
    switch (HashForId(id)) {
            ^~~~~~~~~~~~~
src/ssh.c:2212:13: note: add missing switch cases
    switch (HashForId(id)) {
            ^
src/ssh.c:2242:14: error: use of undeclared identifier 'ECC_X25519'; did you mean 'CTC_ED25519'?
        case ECC_X25519:
             ^~~~~~~~~~
             CTC_ED25519
/usr/local/include/wolfssl/wolfcrypt/asn_public.h:214:5: note: 'CTC_ED25519' declared here
    CTC_ED25519      = 256,
    ^
2 errors generated.
Might be dependent on another PR? This is the report from Jenkins:
CC src/libwolfssh_la-io.lo src/ssh.c:2212:13: error: 14 enumeration values not handled in switch: 'WC_HASH_TYPE_NONE', 'WC_HASH_TYPE_MD2', 'WC_HASH_TYPE_MD4'... [-Werror,-Wswitch] switch (HashForId(id)) { ^~~~~~~~~~~~~ src/ssh.c:2212:13: note: add missing switch cases switch (HashForId(id)) { ^
The patch only cares about a subset of the wc_HashType enum, how do you suggest we deal with that?
src/ssh.c:2242:14: error: use of undeclared identifier 'ECC_X25519'; did you mean 'CTC_ED25519'? case ECC_X25519: ^~~~~~~~~~
This has been fixed with the proper #ifdef.
If not handling all cases for the hash enums in the switch statement, then either
- not using a switch statement triggering the error of missing enums and matching the small subset of enums with if statements
- making a public getter function for the hash type string in wolfSSL wolfcrypt/src/hash.c similar to the GetHashTypeStr function in wolfcrypt/src/cryptocb.c
@JacobBarthelmeh please, have a look at it now.
Superseded by PR #694.