mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-14 04:18:54 +03:00
server: Send only allowed algorithms in extension
Send only allowed algorithms in server-sig-algs extension if in FIPS mode. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
a3ddc48cb0
commit
1b7146e28f
@@ -210,10 +210,14 @@ static int ssh_server_send_extensions(ssh_session session) {
|
|||||||
|
|
||||||
if (session->opts.pubkey_accepted_types) {
|
if (session->opts.pubkey_accepted_types) {
|
||||||
hostkey_algorithms = session->opts.pubkey_accepted_types;
|
hostkey_algorithms = session->opts.pubkey_accepted_types;
|
||||||
|
} else {
|
||||||
|
if (ssh_fips_mode()) {
|
||||||
|
hostkey_algorithms = ssh_kex_get_fips_methods(SSH_HOSTKEYS);
|
||||||
} else {
|
} else {
|
||||||
/* There are no restrictions to the accepted public keys */
|
/* There are no restrictions to the accepted public keys */
|
||||||
hostkey_algorithms = ssh_kex_get_default_methods(SSH_HOSTKEYS);
|
hostkey_algorithms = ssh_kex_get_default_methods(SSH_HOSTKEYS);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rc = ssh_buffer_pack(session->out_buffer,
|
rc = ssh_buffer_pack(session->out_buffer,
|
||||||
"bdss",
|
"bdss",
|
||||||
|
|||||||
Reference in New Issue
Block a user