summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2025-09-21 23:38:51 +0300
committerGitHub <noreply@github.com>2025-09-21 23:38:51 +0300
commitc2a1c90156eb647a132705f208b7e4937e65a1dc (patch)
tree3221162c9199c5be0144d9fc6dd926cd07725aca /src
parentae531cd932fe5c1662908a366766382dbc5550f7 (diff)
parent7aa35eff59611cb90f2409831650ac39506163aa (diff)
downloadvyos-1x-c2a1c90156eb647a132705f208b7e4937e65a1dc.tar.gz
vyos-1x-c2a1c90156eb647a132705f208b7e4937e65a1dc.zip
Merge pull request #4736 from c-po/ssh-hostkey-algo
ssh: T7839: fix warning on deprecated algorithms during commit
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/service_ssh.py6
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