From 39b7e606dfcded84848990c62df37cdb9e3c62cb Mon Sep 17 00:00:00 2001 From: James Cameron Date: Tue, 1 Jan 2019 16:04:54 +1100 Subject: [PATCH] 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 --- src/sugar3/profile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sugar3/profile.py b/src/sugar3/profile.py index 1a20aa1e..f5b6185c 100644 --- a/src/sugar3/profile.py +++ b/src/sugar3/profile.py @@ -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