mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
refactor: remove extra else if branch for disable_hostkeys
Signed-off-by: Gauravsingh Sisodia <xaerru@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Jakub Jelen
parent
213556ce01
commit
5a99cf9c7f
@@ -1008,35 +1008,15 @@ torture_setup_create_sshd_config(void **state, bool pam, bool second_sshd)
|
||||
usepam,
|
||||
additional_config,
|
||||
second_sshd ? s->srv1_pidfile : s->srv_pidfile);
|
||||
} else if (s->disable_hostkeys) {
|
||||
snprintf(sshd_config,
|
||||
sizeof(sshd_config),
|
||||
config_string,
|
||||
second_sshd ? TORTURE_SSHD_SRV1_IPV4 : TORTURE_SSHD_SRV_IPV4,
|
||||
second_sshd ? TORTURE_SSHD_SRV1_IPV6 : TORTURE_SSHD_SRV_IPV6,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
trusted_ca_pubkey,
|
||||
sftp_server,
|
||||
usepam,
|
||||
additional_config,
|
||||
second_sshd ? s->srv1_pidfile : s->srv_pidfile);
|
||||
} else {
|
||||
snprintf(sshd_config,
|
||||
sizeof(sshd_config),
|
||||
config_string,
|
||||
second_sshd ? TORTURE_SSHD_SRV1_IPV4 : TORTURE_SSHD_SRV_IPV4,
|
||||
second_sshd ? TORTURE_SSHD_SRV1_IPV6 : TORTURE_SSHD_SRV_IPV6,
|
||||
"HostKey",
|
||||
ed25519_hostkey,
|
||||
"HostKey",
|
||||
rsa_hostkey,
|
||||
"HostKey",
|
||||
ecdsa_hostkey,
|
||||
s->disable_hostkeys ? "" : "HostKey", s->disable_hostkeys ? "" : ed25519_hostkey,
|
||||
s->disable_hostkeys ? "" : "HostKey", s->disable_hostkeys ? "" : rsa_hostkey,
|
||||
s->disable_hostkeys ? "" : "HostKey", s->disable_hostkeys ? "" : ecdsa_hostkey,
|
||||
trusted_ca_pubkey,
|
||||
sftp_server,
|
||||
usepam,
|
||||
|
||||
Reference in New Issue
Block a user