Skip to content

Commit 32e1c93

Browse files
committed
Allow RSA with SHA-2 signatures to be used on Windows
This commit removes a guard which prevented RSA with SHA-2 signatures from being used on Windows, since older versions of both OpenSSH's ssh-agent and the Pageant agent didn't support this when AsyncSSH first added this support. Now that SHA-2 support has eben around in Windows SSH for several years and many implementations disable SHA-1 by default, this guard is doing more harm than good. Thanks go to GitHub user Netzvamp for reporting this!
1 parent d43295a commit 32e1c93

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

asyncssh/agent.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ def __init__(self, agent: 'SSHAgentClient', algorithm: bytes,
121121
else:
122122
sig_algorithm = algorithm
123123

124-
# Neither Pageant nor the Win10 OpenSSH agent seems to support the
125-
# ssh-agent protocol flags used to request RSA SHA2 signatures yet
126-
if sig_algorithm == b'ssh-rsa' and sys.platform != 'win32':
124+
if sig_algorithm == b'ssh-rsa':
127125
sig_algorithms: Sequence[bytes] = \
128126
(b'rsa-sha2-256', b'rsa-sha2-512', b'ssh-rsa')
129127
else:

0 commit comments

Comments
 (0)