From 7277a49047c7ad2be2e501ef6a026e157a46b576 Mon Sep 17 00:00:00 2001 From: Andrew Kozlik Date: Mon, 19 Jul 2021 15:03:45 +0200 Subject: [PATCH] fix(common): Add new rpId to Binance's FIDO definition. --- common/defs/fido/binance.json | 2 +- core/.changelog.d/1705.fixed | 1 + core/src/apps/webauthn/knownapps.py | 8 ++++++++ legacy/firmware/.changelog.d/1705.fixed | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 core/.changelog.d/1705.fixed create mode 100644 legacy/firmware/.changelog.d/1705.fixed diff --git a/common/defs/fido/binance.json b/common/defs/fido/binance.json index f3297d359..7add4578f 100644 --- a/common/defs/fido/binance.json +++ b/common/defs/fido/binance.json @@ -1,6 +1,6 @@ { "name": "Binance", - "webauthn": ["www.binance.com"], + "webauthn": ["www.binance.com", "binance.com"], "use_sign_count": false, "use_self_attestation": true } diff --git a/core/.changelog.d/1705.fixed b/core/.changelog.d/1705.fixed new file mode 100644 index 000000000..8439102e5 --- /dev/null +++ b/core/.changelog.d/1705.fixed @@ -0,0 +1 @@ +Add new rpId to Binance's FIDO definition. diff --git a/core/src/apps/webauthn/knownapps.py b/core/src/apps/webauthn/knownapps.py index e00241e69..4394cd6ef 100644 --- a/core/src/apps/webauthn/knownapps.py +++ b/core/src/apps/webauthn/knownapps.py @@ -37,6 +37,14 @@ def by_rp_id_hash(rp_id_hash: bytes) -> FIDOApp | None: use_sign_count=False, use_self_attestation=True, ) + elif rp_id_hash == b"\x20\xf6\x61\xb1\x94\x0c\x34\x70\xac\x54\xfa\x2e\xb4\x99\x90\xfd\x33\xb5\x6d\xe8\xde\x60\x18\x70\xff\x02\xa8\x06\x0f\x3b\x7c\x58": + # WebAuthn key for Binance + return FIDOApp( + label="binance.com", + icon="apps/webauthn/res/icon_binance.toif", + use_sign_count=False, + use_self_attestation=True, + ) elif rp_id_hash == b"\x12\x74\x3b\x92\x12\x97\xb7\x7f\x11\x35\xe4\x1f\xde\xdd\x4a\x84\x6a\xfe\x82\xe1\xf3\x69\x32\xa9\x91\x2f\x3b\x0d\x8d\xfb\x7d\x0e": # U2F key for Bitbucket return FIDOApp( diff --git a/legacy/firmware/.changelog.d/1705.fixed b/legacy/firmware/.changelog.d/1705.fixed new file mode 100644 index 000000000..8439102e5 --- /dev/null +++ b/legacy/firmware/.changelog.d/1705.fixed @@ -0,0 +1 @@ +Add new rpId to Binance's FIDO definition.