mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-01 11:26:52 +03:00
kex: List also the SHA2 extension when ordering hostkey algorithms
By default, the list of already stored known host types is preferred, but this selection so far ignored the SHA2 extension and excluded these keys in the KEXINIT list leading to not using this extension if not explicitly enabled from configuration. This commit extends the default list with the SHA2 signatures algoritms and compares only base types so they can be listed in the KEXINIT list. This adjust the tests to expect the full list of algorithms to pass. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
27fe60954c
commit
531b80a60b
@ -312,8 +312,9 @@ torture_knownhosts_algorithms(void **state)
|
||||
const char *knownhosts_file = *state;
|
||||
char *algo_list = NULL;
|
||||
ssh_session session;
|
||||
const char *expect = "ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521,"
|
||||
"ecdsa-sha2-nistp384,ecdsa-sha2-nistp256"
|
||||
const char *expect = "ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,"
|
||||
"ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,"
|
||||
"ecdsa-sha2-nistp256"
|
||||
#ifdef HAVE_DSA
|
||||
",ssh-dss"
|
||||
#endif
|
||||
@ -341,8 +342,9 @@ torture_knownhosts_algorithms_global(void **state)
|
||||
const char *knownhosts_file = *state;
|
||||
char *algo_list = NULL;
|
||||
ssh_session session;
|
||||
const char *expect = "ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521,"
|
||||
"ecdsa-sha2-nistp384,ecdsa-sha2-nistp256"
|
||||
const char *expect = "ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa,"
|
||||
"ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,"
|
||||
"ecdsa-sha2-nistp256"
|
||||
#ifdef HAVE_DSA
|
||||
",ssh-dss"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user