diff --git a/src/apps/fido_u2f/__init__.py b/src/apps/fido_u2f/__init__.py index 4338ac70..e21b046e 100644 --- a/src/apps/fido_u2f/__init__.py +++ b/src/apps/fido_u2f/__init__.py @@ -413,10 +413,13 @@ class ConfirmContent(ui.Widget): icon = ui.ICON_RESET # TODO: warning icon elif app_id in knownapps.knownapps: name = knownapps.knownapps[app_id] - icon = res.load('apps/fido_u2f/res/u2f_%s.toif' % name.lower().replace(' ', '_')) + try: + icon = res.load('apps/fido_u2f/res/u2f_%s.toif' % name.lower().replace(' ', '_')) + except: + icon = res.load('apps/fido_u2f/res/u2f_generic.toif') else: name = '%s...%s' % (ubinascii.hexlify(app_id[:4]), ubinascii.hexlify(app_id[-4:])) - icon = res.load('apps/fido_u2f/res/u2f_unknown.toif') + icon = res.load('apps/fido_u2f/res/u2f_generic.toif') self.app_name = name self.app_icon = icon diff --git a/src/apps/fido_u2f/knownapps.py b/src/apps/fido_u2f/knownapps.py index 4a9918fc..aeb08f30 100644 --- a/src/apps/fido_u2f/knownapps.py +++ b/src/apps/fido_u2f/knownapps.py @@ -10,6 +10,7 @@ knownapps = { hashlib.sha256(b'https://gitlab.com').digest(): 'GitLab', hashlib.sha256(b'https://keepersecurity.com').digest(): 'Keeper', hashlib.sha256(b'https://slushpool.com/static/security/u2f.json').digest(): 'Slush Pool', + hashlib.sha256(b'https://u2f.bin.coffee').digest(): 'u2f.bin.coffee checker', hashlib.sha256(b'https://vault.bitwarden.com/app-id.json').digest(): 'bitwarden', hashlib.sha256(b'https://www.bitfinex.com').digest(): 'Bitfinex', hashlib.sha256(b'https://www.dropbox.com/u2f-app-id.json').digest(): 'Dropbox', diff --git a/src/apps/fido_u2f/res/u2f_generic.toif b/src/apps/fido_u2f/res/u2f_generic.toif new file mode 100644 index 00000000..ccd0130f Binary files /dev/null and b/src/apps/fido_u2f/res/u2f_generic.toif differ diff --git a/src/apps/fido_u2f/res/u2f_unknown.toif b/src/apps/fido_u2f/res/u2f_unknown.toif deleted file mode 100644 index 8f7d1a18..00000000 Binary files a/src/apps/fido_u2f/res/u2f_unknown.toif and /dev/null differ