Ticket #3391 (closed regression: fixed)
transition twisted.conch.ssh.keys.Key to using a real ASN.1 parser
| Reported by: | bash | Owned by: | therve |
|---|---|---|---|
| Priority: | highest | Milestone: | Twisted-9.0 |
| Component: | conch | Keywords: | |
| Cc: | exarkun, therve | Branch: | branches/dsa-key-failure-3391-2 |
| Author: | z3p | Launchpad Bug: |
Description (last modified by exarkun) (diff)
I am getting ValueError exceptions when reading some private DSA keys when reading them with Key.fromString. This is a new problem since upgrading Twisted-8.1.0 (core). Twisted-2.5.0 (core) does not exhibit the same problem. Attaching sample DSA private key.
Python 2.5.2 (r252:60911, Jul 11 2008, 11:11:29)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from twisted.conch.ssh.keys import Key
>>> Key.fromString(file("/tmp/id_dsa").read())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Intelerad/3rd_Party/python-2.5/lib/python2.5/site-packages/Twisted-8.1.0_r24580-py2.5-linux-i686.egg/twisted/conch/ssh/keys.py", line 88, in fromString
return method(data, passphrase)
File "/usr/local/Intelerad/3rd_Party/python-2.5/lib/python2.5/site-packages/Twisted-8.1.0_r24580-py2.5-linux-i686.egg/twisted/conch/ssh/keys.py", line 231, in _fromString_PRIVATE_OPENSSH
p, q, g, y, x = decodedKey[1: 6]
ValueError: need more than 1 value to unpack
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

