get_profile() - handle new OpenSSH DSA key format
OpenSSH changed the format of the DSA key, and this broke Sugar connection to Jabber. Fixes https://github.com/sugarlabs/sugar/issues/814 Fixes http://bugs.sugarlabs.org/ticket/4992
This commit is contained in:
parent
87fcfb62e4
commit
39b7e606df
@ -115,10 +115,12 @@ class Profile(object):
|
||||
end_found = False
|
||||
for l in lines:
|
||||
l = l.strip()
|
||||
if l.startswith('-----BEGIN DSA PRIVATE KEY-----'):
|
||||
if l.startswith(['-----BEGIN DSA PRIVATE KEY-----',
|
||||
'-----BEGIN OPENSSH PRIVATE KEY-----']):
|
||||
begin_found = True
|
||||
continue
|
||||
if l.startswith('-----END DSA PRIVATE KEY-----'):
|
||||
if l.startswith(['-----END DSA PRIVATE KEY-----',
|
||||
'-----END OPENSSH PRIVATE KEY-----']):
|
||||
end_found = True
|
||||
continue
|
||||
key += l
|
||||
|
Loading…
Reference in New Issue
Block a user