mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-06-03 14:42:01 +03:00
tests: Cover PubkeyAcceptedTypes configuration option
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
37864b6575
commit
5d53f519bc
@ -24,6 +24,7 @@ extern LIBSSH_THREAD int ssh_log_level;
|
|||||||
#define ID_FILE "/etc/xxx"
|
#define ID_FILE "/etc/xxx"
|
||||||
#define KEXALGORITHMS "ecdh-sha2-nistp521,diffie-hellman-group14-sha1"
|
#define KEXALGORITHMS "ecdh-sha2-nistp521,diffie-hellman-group14-sha1"
|
||||||
#define HOSTKEYALGORITHMS "ssh-ed25519,ecdsa-sha2-nistp521,ssh-rsa"
|
#define HOSTKEYALGORITHMS "ssh-ed25519,ecdsa-sha2-nistp521,ssh-rsa"
|
||||||
|
#define PUBKEYACCEPTEDTYPES "rsa-sha2-512,ssh-rsa,ecdsa-sha2-nistp521"
|
||||||
#define MACS "hmac-sha1,hmac-sha2-256"
|
#define MACS "hmac-sha1,hmac-sha2-256"
|
||||||
#define USER_KNOWN_HOSTS "%d/my_known_hosts"
|
#define USER_KNOWN_HOSTS "%d/my_known_hosts"
|
||||||
#define GLOBAL_KNOWN_HOSTS "/etc/ssh/my_ssh_known_hosts"
|
#define GLOBAL_KNOWN_HOSTS "/etc/ssh/my_ssh_known_hosts"
|
||||||
@ -51,6 +52,7 @@ static int setup_config_files(void **state)
|
|||||||
"\n\nIdentityFile "ID_FILE"\n"
|
"\n\nIdentityFile "ID_FILE"\n"
|
||||||
"\n\nKexAlgorithms "KEXALGORITHMS"\n"
|
"\n\nKexAlgorithms "KEXALGORITHMS"\n"
|
||||||
"\n\nHostKeyAlgorithms "HOSTKEYALGORITHMS"\n"
|
"\n\nHostKeyAlgorithms "HOSTKEYALGORITHMS"\n"
|
||||||
|
"\n\nPubkeyAcceptedTypes "PUBKEYACCEPTEDTYPES"\n"
|
||||||
"\n\nMACs "MACS"\n");
|
"\n\nMACs "MACS"\n");
|
||||||
|
|
||||||
/* Multiple Port settings -> parsing returns early. */
|
/* Multiple Port settings -> parsing returns early. */
|
||||||
@ -161,6 +163,8 @@ static void torture_config_from_file(void **state) {
|
|||||||
|
|
||||||
assert_string_equal(session->opts.wanted_methods[SSH_HOSTKEYS], HOSTKEYALGORITHMS);
|
assert_string_equal(session->opts.wanted_methods[SSH_HOSTKEYS], HOSTKEYALGORITHMS);
|
||||||
|
|
||||||
|
assert_string_equal(session->opts.pubkey_accepted_types, PUBKEYACCEPTEDTYPES);
|
||||||
|
|
||||||
assert_string_equal(session->opts.wanted_methods[SSH_MAC_C_S], MACS);
|
assert_string_equal(session->opts.wanted_methods[SSH_MAC_C_S], MACS);
|
||||||
assert_string_equal(session->opts.wanted_methods[SSH_MAC_S_C], MACS);
|
assert_string_equal(session->opts.wanted_methods[SSH_MAC_S_C], MACS);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user