1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

fix(core): exclude get/set U2F counter from BITCOIN_ONLY

This commit is contained in:
matejcik 2021-06-01 15:07:02 +02:00 committed by matejcik
parent c06a93cba5
commit 729414e606
2 changed files with 8 additions and 4 deletions

View File

@ -46,10 +46,6 @@ def find_message_handler_module(msg_type: int) -> str:
return "apps.management.apply_flags"
elif msg_type == MessageType.ChangePin:
return "apps.management.change_pin"
elif msg_type == MessageType.SetU2FCounter:
return "apps.management.set_u2f_counter"
elif msg_type == MessageType.GetNextU2FCounter:
return "apps.management.get_next_u2f_counter"
elif msg_type == MessageType.SdProtect:
return "apps.management.sd_protect"
elif msg_type == MessageType.ChangeWipeCode:
@ -87,6 +83,11 @@ def find_message_handler_module(msg_type: int) -> str:
if False:
raise RuntimeError
elif msg_type == MessageType.SetU2FCounter:
return "apps.management.set_u2f_counter"
elif msg_type == MessageType.GetNextU2FCounter:
return "apps.management.get_next_u2f_counter"
# webauthn
elif msg_type == MessageType.WebAuthnListResidentCredentials:
return "apps.webauthn.list_resident_credentials"

View File

@ -14,9 +14,12 @@
# You should have received a copy of the License along with this library.
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
import pytest
from trezorlib import fido
@pytest.mark.altcoin
def test_u2f_counter(client):
assert fido.get_next_counter(client) == 0
assert fido.get_next_counter(client) == 1