ssh: fix unicode identity handling for Python 2

This commit is contained in:
Roman Zeyde
2017-09-22 14:11:21 +03:00
parent ac8898a434
commit 7e95179128
5 changed files with 18 additions and 10 deletions

View File

@@ -184,7 +184,7 @@ def export_public_key(vk, label):
key_type, blob = serialize_verifying_key(vk)
log.debug('fingerprint: %s', fingerprint(blob))
b64 = base64.b64encode(blob).decode('ascii')
return '{} {} {}\n'.format(key_type.decode('ascii'), b64, label)
return u'{} {} {}\n'.format(key_type.decode('ascii'), b64, label)
def import_public_key(line):