Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
shrapnel
Commits
1cc66841
Commit
1cc66841
authored
Nov 06, 2013
by
Sam Rushing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parse_private_key: use coro.asn1.ber
parent
186299c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
coro/ssh/keys/openssh_key_storage.py
coro/ssh/keys/openssh_key_storage.py
+4
-2
No files found.
coro/ssh/keys/openssh_key_storage.py
View file @
1cc66841
...
...
@@ -34,10 +34,10 @@ import hashlib
import
os
import
re
import
rebuild
import
ber
import
dss
import
rsa
from
coro.asn1.ber
import
decode
as
ber_decode
from
coro.ssh.keys
import
openssh_key_formats
from
coro.ssh.util
import
str_xor
from
coro.ssh.util.password
import
get_password
...
...
@@ -266,7 +266,9 @@ class OpenSSH_Key_Storage(key_storage.SSH_Key_Storage):
passkey
=
(
a
+
b
)[:
24
]
# Only need first 24 characters.
key_data
=
self
.
des_ede3_cbc_decrypt
(
key_data
,
iv
,
passkey
)
key_data
=
ber
.
decode
(
key_data
)[
0
]
key_data
,
_
=
ber_decode
(
key_data
)
# Crypto.RSA requires that all are PyLong
key_data
=
[
long
(
x
)
for
x
in
key_data
]
# key_data[0] is always 0???
if
not
keytype_map
.
has_key
(
key_type
):
return
None
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment