diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/service_ssh.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/conf_mode/service_ssh.py b/src/conf_mode/service_ssh.py index ca0e66207..dca021d02 100755 --- a/src/conf_mode/service_ssh.py +++ b/src/conf_mode/service_ssh.py @@ -111,10 +111,8 @@ def verify(ssh): verify_pki_openssh_key(ssh, ssh['trusted_user_ca']) if 'hostkey_algorithm' in ssh: - tmp = any(item in deprecated_algos for item in ssh['hostkey_algorithm']) - if deprecated_algos: - tmp = ', '.join(deprecated_algos) - DeprecationWarning(f'{SSH_DSA_DEPRECATION_WARNING} {tmp}') + tmp = [algo for algo in ssh['hostkey_algorithm'] if algo in deprecated_algos] + if tmp: DeprecationWarning(f'{SSH_DSA_DEPRECATION_WARNING} {", ".join(tmp)}') verify_vrf(ssh) return None |
