Skip to content
This repository was archived by the owner on Jun 9, 2022. It is now read-only.

Commit 3f0e7f7

Browse files
committed
Merge pull request #24
2 parents bdeac17 + eabff1e commit 3f0e7f7

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

u2flib_host/authenticate.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def parse_args():
103103
def main():
104104
args = parse_args()
105105

106-
facet = text_type(args.facet, sys.stdin.encoding or sys.getdefaultencoding())
106+
facet = text_type(args.facet)
107107
if args.infile:
108108
with open(args.infile, 'r') as f:
109109
data = f.read()
@@ -112,8 +112,7 @@ def main():
112112
sys.stderr.write('Enter AuthenticateRequest JSON data...\n')
113113
data = sys.stdin.read()
114114

115-
params = json.loads(data, object_hook=u2str)
116-
115+
params = json.loads(data)
117116
if args.soft:
118117
from u2flib_host.soft import SoftU2FDevice
119118
devices = [SoftU2FDevice(args.soft)]

u2flib_host/device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def get_supported_versions(self):
7272
"""
7373
if not hasattr(self, '_versions'):
7474
try:
75-
self._versions = [self.send_apdu(INS_GET_VERSION)]
75+
self._versions = [self.send_apdu(INS_GET_VERSION).decode()]
7676
except exc.APDUError as e:
7777
# v0 didn't support the instruction.
7878
self._versions = ['v0'] if e.code == 0x6d00 else []

u2flib_host/register.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ def parse_args():
9595
def main():
9696
args = parse_args()
9797

98-
facet = text_type(args.facet, sys.stdin.encoding or sys.getdefaultencoding())
98+
facet = text_type(args.facet)
9999
if args.infile:
100100
with open(args.infile, 'r') as f:
101101
data = f.read()
102102
else:
103103
if sys.stdin.isatty():
104104
sys.stderr.write('Enter RegistrationRequest JSON data...\n')
105105
data = sys.stdin.read()
106-
params = json.loads(data, object_hook=u2str)
106+
params = json.loads(data)
107107

108108
if args.soft:
109109
from u2flib_host.soft import SoftU2FDevice

0 commit comments

Comments
 (0)