tests: Cover PubkeyAcceptedTypes configuration option
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
37864b6575
Коммит
5d53f519bc
@ -24,6 +24,7 @@ extern LIBSSH_THREAD int ssh_log_level;
|
||||
#define ID_FILE "/etc/xxx"
|
||||
#define KEXALGORITHMS "ecdh-sha2-nistp521,diffie-hellman-group14-sha1"
|
||||
#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 USER_KNOWN_HOSTS "%d/my_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\nKexAlgorithms "KEXALGORITHMS"\n"
|
||||
"\n\nHostKeyAlgorithms "HOSTKEYALGORITHMS"\n"
|
||||
"\n\nPubkeyAcceptedTypes "PUBKEYACCEPTEDTYPES"\n"
|
||||
"\n\nMACs "MACS"\n");
|
||||
|
||||
/* 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.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_S_C], MACS);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user