mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 21:00:33 +09:00
kex: Make existing convenience features available
Signed-off-by: David Wedderwille <davidwe@posteo.de> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Jakub Jelen
parent
0b91ba779c
commit
84d02e7440
19
src/kex.c
19
src/kex.c
@@ -310,6 +310,25 @@ const char *ssh_kex_get_fips_methods(enum ssh_kex_types_e type)
|
||||
return fips_methods[type];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get a list of supported algorithms of a given type. This respects the
|
||||
* FIPS mode status.
|
||||
*
|
||||
* @param[in] type The type of the algorithm to query (SSH_KEX, SSH_MAC_C_S,
|
||||
* ...).
|
||||
*
|
||||
* @return The list of supported methods as comma-separated string, or NULL for
|
||||
* unknown type.
|
||||
*/
|
||||
const char *ssh_get_supported_methods(enum ssh_kex_types_e type)
|
||||
{
|
||||
if (ssh_fips_mode()) {
|
||||
return ssh_kex_get_fips_methods(type);
|
||||
} else {
|
||||
return ssh_kex_get_supported_method(type);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @brief returns whether the first client key exchange algorithm or
|
||||
|
||||
Reference in New Issue
Block a user