-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug of parsing new format keys #1565
Comments
generate dsa ecdsa ed25519 rsa private keys for t in dsa ecdsa ed25519 rsa; do ssh-keygen -t $t -f id_$t -q -N "" && rm *.pub; done parse.py import sys
from paramiko import DSSKey, ECDSAKey, Ed25519Key, RSAKey
filenames = sys.argv[1:]
keyclasses = [DSSKey, ECDSAKey, Ed25519Key, RSAKey]
for filename in filenames:
print('Parsing {}'.format(filename))
print('='*20)
for keycls in keyclasses:
try:
print(keycls.__name__, end=' ')
key = keycls(filename=filename)
except Exception as e:
print('x')
else:
print('√')
print('-'*20)
print() |
The bug with new-format ECDSAKey was mentioned here: #1343 (comment) (and was not addressed in that pull-request, but I think the maintainer was under the impression that it was addressed) |
Notice the bug of parsing |
From the screenshot above, you see parsing dsa ed25519 keys succeeded, parsing rsa ecdsa keys failed.
The interesting part is parsing rsa key, paramiko recognize it as both rsa and dss type key.
The text was updated successfully, but these errors were encountered: