mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-25 08:58:14 +00:00
feat(common): Add Apple to known FIDO services.
This commit is contained in:
parent
be920d7cec
commit
9528e2f9eb
5
common/defs/fido/apple.json
Normal file
5
common/defs/fido/apple.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Apple",
|
||||
"webauthn": ["apple.com"],
|
||||
"use_self_attestation": false
|
||||
}
|
BIN
common/defs/fido/apple.png
Normal file
BIN
common/defs/fido/apple.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
@ -3,6 +3,7 @@
|
||||
//! do not edit manually!
|
||||
|
||||
|
||||
const ICON_APPLE: &[u8] = include_res!("model_tt/res/fido/icon_apple.toif");
|
||||
const ICON_AWS: &[u8] = include_res!("model_tt/res/fido/icon_aws.toif");
|
||||
const ICON_BINANCE: &[u8] = include_res!("model_tt/res/fido/icon_binance.toif");
|
||||
const ICON_BITBUCKET: &[u8] = include_res!("model_tt/res/fido/icon_bitbucket.toif");
|
||||
@ -41,6 +42,7 @@ const ICON_WEBAUTHN: &[u8] = include_res!("model_tt/res/fido/icon_webauthn.toif"
|
||||
pub fn get_fido_icon_data<T: AsRef<str>>(icon_name: Option<T>) -> &'static [u8] {
|
||||
if let Some(icon_name) = icon_name {
|
||||
match icon_name.as_ref() {
|
||||
"apple" => ICON_APPLE,
|
||||
"aws" => ICON_AWS,
|
||||
"binance" => ICON_BINANCE,
|
||||
"bitbucket" => ICON_BITBUCKET,
|
||||
|
BIN
core/embed/rust/src/ui/model_tt/res/fido/icon_apple.toif
Normal file
BIN
core/embed/rust/src/ui/model_tt/res/fido/icon_apple.toif
Normal file
Binary file not shown.
@ -21,6 +21,14 @@ class FIDOApp:
|
||||
|
||||
# fmt: off
|
||||
def by_rp_id_hash(rp_id_hash: bytes) -> FIDOApp | None:
|
||||
if rp_id_hash == b"\x22\x65\xcb\xcc\x3e\xf2\x41\x06\xc9\xe0\xed\xdb\xd0\x4f\x3c\xca\x0d\x03\x22\x5d\xa3\xfc\xca\x8e\x2d\x86\xf7\xa3\x94\xaf\x92\x83":
|
||||
# WebAuthn key for Apple
|
||||
return FIDOApp(
|
||||
"apple.com", # label
|
||||
"apple", # icon_name
|
||||
None, # use_sign_count
|
||||
False, # use_self_attestation
|
||||
)
|
||||
if rp_id_hash == b"\x96\x89\x78\xa2\x99\x53\xde\x52\xd3\xef\x0f\x0c\x71\xb7\xb7\xb6\xb1\xaf\x9f\x08\xe2\x57\x89\x6a\x8d\x81\x26\x91\x85\x30\x29\x3b":
|
||||
# U2F key for Amazon Web Services
|
||||
return FIDOApp(
|
||||
|
Loading…
Reference in New Issue
Block a user