Skip to content

Commit

Permalink
Minor fortinet disabled_algorithms logic change
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed Nov 8, 2024
1 parent 8f30127 commit 8f34d2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion netmiko/fortinet/fortinet_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class FortinetSSH(NoConfig, NoEnable, CiscoSSHConnection):

def __init__(self, *args: Any, **kwargs: Any) -> None:
disabled_algorithms = kwargs.get("disabled_algorithms")
if disabled_algorithms is None:
# Set this as long as no "kex" settings being passed via disabled_algorithms
if disabled_algorithms is None or not disabled_algorithms.get("kex"):
paramiko_transport = getattr(paramiko, "Transport")
paramiko_cur_kex = set(paramiko_transport._preferred_kex)
# Disable any kex not in allowed fortinet set
Expand Down

0 comments on commit 8f34d2f

Please sign in to comment.