From 9528e2f9eb8fde87fdb0236f6e6cd9c983031824 Mon Sep 17 00:00:00 2001 From: Andrew Kozlik Date: Thu, 2 Feb 2023 11:41:03 +0100 Subject: [PATCH] feat(common): Add Apple to known FIDO services. --- common/defs/fido/apple.json | 5 +++++ common/defs/fido/apple.png | Bin 0 -> 2383 bytes .../rust/src/ui/model_tt/component/fido_icons.rs | 2 ++ .../src/ui/model_tt/res/fido/icon_apple.toif | Bin 0 -> 697 bytes core/src/apps/webauthn/knownapps.py | 8 ++++++++ 5 files changed, 15 insertions(+) create mode 100644 common/defs/fido/apple.json create mode 100644 common/defs/fido/apple.png create mode 100644 core/embed/rust/src/ui/model_tt/res/fido/icon_apple.toif diff --git a/common/defs/fido/apple.json b/common/defs/fido/apple.json new file mode 100644 index 0000000000..26c3e1f02f --- /dev/null +++ b/common/defs/fido/apple.json @@ -0,0 +1,5 @@ +{ + "name": "Apple", + "webauthn": ["apple.com"], + "use_self_attestation": false +} diff --git a/common/defs/fido/apple.png b/common/defs/fido/apple.png new file mode 100644 index 0000000000000000000000000000000000000000..8145a493d57be9af4f4789c2907665e1715eddfd GIT binary patch literal 2383 zcmV-V39$BwP)2#v+`grcFaZ0$o8oHl2_fFavEfUFafhC9Zdt%PiIz zO~Y0=pCnu(bSa3AK#BO_3c)~0BOntbXo>uip-DUsJpFOcrepkgxc8oW&;5QsukHKa z_j~TW=l%YE&X0S}=QLpCigT_9FdVoX_$2UAV49?-V!Yo|OtM@=?*@zmCIBOV#v{IR zPOSHC2FNCSKj2%yB;btWe6_b3ptgkX4BQQT2lz-kesa(ZP&?v(8JG_AIf)2o>2S|z{(8bw*eb00#sA{%l$vUbB1Cz zNZM@?pnBpD1r}u#A7Dky&uIoYy7>KpXHPJ;Z!gc70jec_C*W!FnY`HvEHwjEi~E5~ zaw=<%q!u$kwc7nDITd#Z_<8KlYzFv1{6;TWUUf20(q=P2b(jcTmQz`+z`a#?XfwbE z|NiggSY)%LO=f`Va6NE-PG$WYxTh))ZU#uWEv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7UoE-`0Qik*5CxwgIhD0=11tn~S^Y=B{K5?&sRel4>b`W^fZvu80jwE_ zgQb!-mtp`(Ye-HFG0J0B8S?-i<^j{7G~NN`m2H6ez#FDTDLf+S{Zb7e=@9UcX;C;W zWH>xB@BQerfIX&3p*$gJTNDQH=h;m&O$y@>Ff~g7Au>`t1Z*>H3So|VQzALUU{u&h*)764D0RzbL5((b4Y z;JMSg)yR*(W*PSvY5<@7c#3J38?C@C{tYZuhyajG4%r@pe0WgO%Xt>LJLVvDrpCBGnQB)EeC*!XPl|bxnnM*{r~&-C^$A$A$@a1xm=y8?g{LR?uP$#TS;S}@f5uL+;h z`v6Du2R1b|HFW?!XF4B~J0#5weUUPcfc*isocvhKlr*D=3zcR7KR<9QmT>Aw76P{y zb+J+pf%fCttAI78d(t`rW7BN%OiM!yPwkxR3H*^_^X0z}Y$aJzy_e)1gswn0|2dmt z56D^yjFD96nM@6_Sl>Ccxe@F>tMX={M{8%DAfdmM0T%3|gNcct0SSMvt&m3$g-7jOsAyB$Ai@&ESO zz%xaJQ|DYC;0EAEU~oG+)vdl6nl5Qs4D}qX0gh;kN0FSTa}m(Tcg}W^q(|96@_yk@ zlJ=E&pWT3AzIo^k^Z-sHIcRem@G{8`-l$ec{U2hxXRgKxq-+2H002ovPDHLkV1nG@ BKED6} literal 0 HcmV?d00001 diff --git a/core/embed/rust/src/ui/model_tt/component/fido_icons.rs b/core/embed/rust/src/ui/model_tt/component/fido_icons.rs index 71f55fcadf..df39e17a65 100644 --- a/core/embed/rust/src/ui/model_tt/component/fido_icons.rs +++ b/core/embed/rust/src/ui/model_tt/component/fido_icons.rs @@ -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>(icon_name: Option) -> &'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, diff --git a/core/embed/rust/src/ui/model_tt/res/fido/icon_apple.toif b/core/embed/rust/src/ui/model_tt/res/fido/icon_apple.toif new file mode 100644 index 0000000000000000000000000000000000000000..d6c97f897e8e8eeb119cc65065b6955ad799fc6a GIT binary patch literal 697 zcmV;q0!IB*Pf12V06+k(0ssKT(xI;MFcb&yiiwIVDkoWjUz0!KG;HVR4D| zy?)B>bt)@Ump;Qp-ut^q-|NrryoV zhIRY(ql>g>K>|KbQZ@vh`V1SEZ~Jy-4mxl8_R+;2_O{N@n&8hTyoyS3`(r8tes*U+ z)ZLJgm+|lW(A>^A_Gb89JGiTNt9yxk`~STG+B(18yxvaPtCJX@UG#g!>#4;hUPWIC zm0dTR{WPps{yXE{HD5ba&TUnFpZBd_JMe9l$p;)lZw`?Q(&bMXluqT@?b0h#Wt-l6 zyUGTR6DYkhyY?c@7H!PUfPnp{5u?ORCh?;+jA@oup z#bg}9KgFtk39@}7Pt_+9!auvJKK)}K=KbpPuf^Z)-#&-%_qnP+P9XfS*bp^;7s2>b zrsiW0#;?T$tN23;#t(~Cq~cF7l`uY)zOB;1I)|D7k(Jr)PZ^ZobkIEm!-DghUl@5^ z9h3sHgRofV&!>O*d zdNZf^Q@s`k6Mc~1Iw-|1I=f3}=^WjZ1)R#CZ&e@ZO|aLlP30*ztjB#Fd8KIUm-zk3 fw`-?to!4TYe 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(