Allow unicode in identity string for SSH and GPG

This commit is contained in:
Roman Zeyde
2017-06-24 13:45:25 +03:00
parent ca67923fe8
commit f904aac92e
8 changed files with 27 additions and 13 deletions

View File

@@ -188,7 +188,7 @@ def main(device_type):
public_keys = None
if args.identity.startswith('/'):
filename = args.identity
contents = open(filename, 'rb').read().decode('ascii')
contents = open(filename, 'rb').read().decode('utf-8')
# Allow loading previously exported SSH public keys
if filename.endswith('.pub'):
public_keys = list(import_public_keys(contents))