Skip to content

Commit 9c8b156

Browse files
committed
fix(core): disable unused THP pairing methods
[no changelog]
1 parent b3cd2f8 commit 9c8b156

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

core/src/trezor/wire/thp/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,8 @@ def get_pong_header(cls, length: int) -> Self:
174174

175175

176176
_DEFAULT_ENABLED_PAIRING_METHODS = [
177-
ThpPairingMethod.CodeEntry,
178-
ThpPairingMethod.QrCode,
179-
ThpPairingMethod.NFC,
177+
# TODO: Add pairing methods https://github.com/trezor/trezor-firmware/issues/6036
178+
ThpPairingMethod.CodeEntry
180179
]
181180

182181

@@ -190,6 +189,13 @@ def get_enabled_pairing_methods(
190189
methods = _DEFAULT_ENABLED_PAIRING_METHODS.copy()
191190
if __debug__:
192191
methods.append(ThpPairingMethod.SkipPairing)
192+
methods.append( # Used only in tests, TODO: https://github.com/trezor/trezor-firmware/issues/6037
193+
ThpPairingMethod.NFC
194+
)
195+
methods.append( # Used only in tests, TODO: https://github.com/trezor/trezor-firmware/issues/6038
196+
ThpPairingMethod.QrCode
197+
)
198+
193199
return methods
194200

195201

tests/ui_tests/fixtures.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30968,8 +30968,8 @@
3096830968
"T3W1_cs_thp-test_pairing.py::test_credential_request_in_encrypted_transport_phase": "7b97a23531342775f0318a74d41becacd269e51a543b12656923763269a2f22f",
3096930969
"T3W1_cs_thp-test_pairing.py::test_pairing_cancel_1": "1483b32f7c93c627e805fdfa620ff95018d1f99c0d141e670077ceb240b1243d",
3097030970
"T3W1_cs_thp-test_pairing.py::test_pairing_cancel_2": "a5cac060747b4be07468c92002563e15b0f6dbb6b65ea3d741a3321c12a4460d",
30971-
"T3W1_cs_thp-test_pairing.py::test_pairing_code_entry": "85c882aef035c3ae41b12b912ea3f4e0330d8ecb39e0298dd7debb1e21f0697d",
30972-
"T3W1_cs_thp-test_pairing.py::test_pairing_code_entry_cancel": "85c882aef035c3ae41b12b912ea3f4e0330d8ecb39e0298dd7debb1e21f0697d",
30971+
"T3W1_cs_thp-test_pairing.py::test_pairing_code_entry": "e9d810e2811aa18fbc87cb4f3d4f99812b4c8cc68838a008e3564b4a11adccef",
30972+
"T3W1_cs_thp-test_pairing.py::test_pairing_code_entry_cancel": "e9d810e2811aa18fbc87cb4f3d4f99812b4c8cc68838a008e3564b4a11adccef",
3097330973
"T3W1_cs_thp-test_pairing.py::test_pairing_nfc": "613bcea2556dddf79d2394f5c5609235f7bde128fd21f6409613043f1a7d4657",
3097430974
"T3W1_cs_thp-test_pairing.py::test_pairing_qr_code": "c24521e569c08e3605b164212c876f8ac57c5eef6cca6f2ca53a635a883ebc4b",
3097530975
"T3W1_cs_webauthn-test_msg_webauthn.py::test_add_remove": "41e0ff0345000141e896ac5e1b7efccba213037de18b5eb8c0882be670034b18",
@@ -32469,8 +32469,8 @@
3246932469
"T3W1_de_thp-test_pairing.py::test_credential_request_in_encrypted_transport_phase": "7833feed00c2236903c9eb2e66788c2a28199e3f090ab6c6308be8ad8b7fa14c",
3247032470
"T3W1_de_thp-test_pairing.py::test_pairing_cancel_1": "2f7a8459b66ad064e3c2954c9e4454c83ee51176d6fb4344897ed7c244306ce4",
3247132471
"T3W1_de_thp-test_pairing.py::test_pairing_cancel_2": "fe6296e82b0d14758c9c855ba5de4ff222c738f951e26d04fee14a5a48814cdc",
32472-
"T3W1_de_thp-test_pairing.py::test_pairing_code_entry": "5b5722bafd65b8382c93f73f774f3394f80b05e7755a347fd82b55f3918d0bac",
32473-
"T3W1_de_thp-test_pairing.py::test_pairing_code_entry_cancel": "5b5722bafd65b8382c93f73f774f3394f80b05e7755a347fd82b55f3918d0bac",
32472+
"T3W1_de_thp-test_pairing.py::test_pairing_code_entry": "3f25efb7675ca9631913c36e12b4a8455968b5cc0d9324625030097b773af95d",
32473+
"T3W1_de_thp-test_pairing.py::test_pairing_code_entry_cancel": "3f25efb7675ca9631913c36e12b4a8455968b5cc0d9324625030097b773af95d",
3247432474
"T3W1_de_thp-test_pairing.py::test_pairing_nfc": "f0ad4b3d776c076dab666cc0e6ef7ac8261d98eba206c5089eb1bcd5f5aa0afc",
3247532475
"T3W1_de_thp-test_pairing.py::test_pairing_qr_code": "98735f888f827501b25c78c6a737c1983a800c620f709c65b1d95f6c8c9a2b90",
3247632476
"T3W1_de_webauthn-test_msg_webauthn.py::test_add_remove": "615265e559145574c93bf984fedbfffebea4f9b257d381f6f2c59afc6de60f26",
@@ -33970,8 +33970,8 @@
3397033970
"T3W1_en_thp-test_pairing.py::test_credential_request_in_encrypted_transport_phase": "d9d06c263ad3d67de0662b7d07c91a9ef4ab7b21c25f8f7c5a9eef233276ff81",
3397133971
"T3W1_en_thp-test_pairing.py::test_pairing_cancel_1": "cd8b89c41f1fa45320970832327c3626a281f2f9c37f8d043e48878d63f7553a",
3397233972
"T3W1_en_thp-test_pairing.py::test_pairing_cancel_2": "554f7a5c9236a8ec9f1cebbaa0e56e057c862f1e37b3b796879c54b5f4f60db9",
33973-
"T3W1_en_thp-test_pairing.py::test_pairing_code_entry": "cb3668ad56109ff1d881b04ede0f72ee79ee4490ab2bc29d80c35d35227112c0",
33974-
"T3W1_en_thp-test_pairing.py::test_pairing_code_entry_cancel": "cb3668ad56109ff1d881b04ede0f72ee79ee4490ab2bc29d80c35d35227112c0",
33973+
"T3W1_en_thp-test_pairing.py::test_pairing_code_entry": "18a7e6a2e73fb8fc6e0e26368c1e26ff8c32d50766dce87da64fe9c8a5fefa0c",
33974+
"T3W1_en_thp-test_pairing.py::test_pairing_code_entry_cancel": "18a7e6a2e73fb8fc6e0e26368c1e26ff8c32d50766dce87da64fe9c8a5fefa0c",
3397533975
"T3W1_en_thp-test_pairing.py::test_pairing_nfc": "a35f27a25123e935371966b194c0221d93139450f612a63518f5f5a5865d30d1",
3397633976
"T3W1_en_thp-test_pairing.py::test_pairing_qr_code": "931d9afceb0ba1e4faae891775819277242d889644d5c0c5863fc8c9fcf859b1",
3397733977
"T3W1_en_webauthn-test_msg_webauthn.py::test_add_remove": "222e1dc521b9a3ccfb91530fd9246664a62a102f1595b78b7207ec9348036017",
@@ -35471,8 +35471,8 @@
3547135471
"T3W1_es_thp-test_pairing.py::test_credential_request_in_encrypted_transport_phase": "f88136b7237c5f8fc5344d82573a6dfa1bd3409eafaf1afe77bbc9dbc2a3cf60",
3547235472
"T3W1_es_thp-test_pairing.py::test_pairing_cancel_1": "028d63c695abceafd5b94d8918d3fdcc47739fc52d23e335468be473a60dba01",
3547335473
"T3W1_es_thp-test_pairing.py::test_pairing_cancel_2": "f726e1f2cc1799a63bb83373fb9f34fb72474751e57134da0c1702c582f84fd0",
35474-
"T3W1_es_thp-test_pairing.py::test_pairing_code_entry": "1f1871263cc8aa25d5f63c2bfee8b573bba3b08edbc0ed81973783742efb8bc5",
35475-
"T3W1_es_thp-test_pairing.py::test_pairing_code_entry_cancel": "1f1871263cc8aa25d5f63c2bfee8b573bba3b08edbc0ed81973783742efb8bc5",
35474+
"T3W1_es_thp-test_pairing.py::test_pairing_code_entry": "541384aaeaddf4d94a411082aac3b5e272abed8be2c008870a16b0cec0c95c2b",
35475+
"T3W1_es_thp-test_pairing.py::test_pairing_code_entry_cancel": "541384aaeaddf4d94a411082aac3b5e272abed8be2c008870a16b0cec0c95c2b",
3547635476
"T3W1_es_thp-test_pairing.py::test_pairing_nfc": "f6ec6f54fd638746b170fbed5f0ac16a1c134e2bbd5711c794e5a37507c5c3c1",
3547735477
"T3W1_es_thp-test_pairing.py::test_pairing_qr_code": "56536ae9cd7c4ff8022def4ec3350031d3614064d961f53a2850f2be425af201",
3547835478
"T3W1_es_webauthn-test_msg_webauthn.py::test_add_remove": "85d81bed1998bbca18bbe3069c7fa7a419ea29de0d2b8f9feed5e965c2c6d5cb",
@@ -36972,8 +36972,8 @@
3697236972
"T3W1_fr_thp-test_pairing.py::test_credential_request_in_encrypted_transport_phase": "b986b27033b991f2c259d1024b5bcf9a38b0f4d126474e887f5c7b65c099fe63",
3697336973
"T3W1_fr_thp-test_pairing.py::test_pairing_cancel_1": "12004ca1108ea84b42936d997a4be243bcd8459a35a3618f9aaa59c7b9682e83",
3697436974
"T3W1_fr_thp-test_pairing.py::test_pairing_cancel_2": "b9fd29996cf8fcd33cac4a3c8577454109b49a831c485ffa6c2adbb0bad928bb",
36975-
"T3W1_fr_thp-test_pairing.py::test_pairing_code_entry": "7d58025ea79f53675e7c6848d204fcb0aeec7aae5856949fc66af9860c38f034",
36976-
"T3W1_fr_thp-test_pairing.py::test_pairing_code_entry_cancel": "7d58025ea79f53675e7c6848d204fcb0aeec7aae5856949fc66af9860c38f034",
36975+
"T3W1_fr_thp-test_pairing.py::test_pairing_code_entry": "9004655e1d08c3c440cac348a4bd7ce52c6ec777ae94fbf2a26993813b27f5de",
36976+
"T3W1_fr_thp-test_pairing.py::test_pairing_code_entry_cancel": "9004655e1d08c3c440cac348a4bd7ce52c6ec777ae94fbf2a26993813b27f5de",
3697736977
"T3W1_fr_thp-test_pairing.py::test_pairing_nfc": "96956944ecf8db96ac7fb4a5eeffbafc27f181c49321a5eb67980680acff28f8",
3697836978
"T3W1_fr_thp-test_pairing.py::test_pairing_qr_code": "e8156cf4eda1d29060f05b4a18d50032b0b344230609b7de7cababfe0a86b20b",
3697936979
"T3W1_fr_webauthn-test_msg_webauthn.py::test_add_remove": "5346304ff4c3d817f5804c64a656a3bd9e4c353575bb1fcbab46796003f61f64",
@@ -38478,8 +38478,8 @@
3847838478
"T3W1_pt_thp-test_pairing.py::test_credential_request_in_encrypted_transport_phase": "2732c7eb73f1c271674b61120ef23acb2172eda23308d34acfbab6362e4216fd",
3847938479
"T3W1_pt_thp-test_pairing.py::test_pairing_cancel_1": "df151c844f9ad2500231de9b092621802026184f6e2bde831f65ec2512d46e1d",
3848038480
"T3W1_pt_thp-test_pairing.py::test_pairing_cancel_2": "a16fdba151a20b4ccb73e6c5b2413a2ccb7653a78a7cec8750b5d1c5cea926f4",
38481-
"T3W1_pt_thp-test_pairing.py::test_pairing_code_entry": "19bf9c428fda4e4d065aba8f0bc159af03fd8319bec8aa1c340c731ee26af527",
38482-
"T3W1_pt_thp-test_pairing.py::test_pairing_code_entry_cancel": "19bf9c428fda4e4d065aba8f0bc159af03fd8319bec8aa1c340c731ee26af527",
38481+
"T3W1_pt_thp-test_pairing.py::test_pairing_code_entry": "8883f93499df5a5d6c81bfce0d676ddc51140ea4a346b8f2f87be27e94742dc2",
38482+
"T3W1_pt_thp-test_pairing.py::test_pairing_code_entry_cancel": "8883f93499df5a5d6c81bfce0d676ddc51140ea4a346b8f2f87be27e94742dc2",
3848338483
"T3W1_pt_thp-test_pairing.py::test_pairing_nfc": "8ab7b02cbad200e055dd8930deedf3835a9fc92f130c595df7cb8b2fd5f2bd19",
3848438484
"T3W1_pt_thp-test_pairing.py::test_pairing_qr_code": "1c74667c078e25e7e0d37c7b2aa35f7c8ab02cd88e74695ecb355c82a293b0cc",
3848538485
"T3W1_pt_webauthn-test_msg_webauthn.py::test_add_remove": "56cb3438720d4a6f161cafc263d23d8ea2ce40df0af04e9d211c9921a493b19e",

0 commit comments

Comments
 (0)