mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-03 21:32:33 +00:00
core: enable debuglink+webauth together in the emulator firmware
This commit is contained in:
parent
d9e9fa6ceb
commit
898c421752
@ -47,8 +47,8 @@ def _boot_default() -> None:
|
|||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
import apps.debug
|
import apps.debug
|
||||||
else:
|
|
||||||
if not utils.BITCOIN_ONLY:
|
if not utils.BITCOIN_ONLY:
|
||||||
|
if not __debug__ or utils.EMULATOR:
|
||||||
import apps.webauthn
|
import apps.webauthn
|
||||||
|
|
||||||
# boot applications
|
# boot applications
|
||||||
@ -68,8 +68,8 @@ def _boot_default() -> None:
|
|||||||
apps.binance.boot()
|
apps.binance.boot()
|
||||||
if __debug__:
|
if __debug__:
|
||||||
apps.debug.boot()
|
apps.debug.boot()
|
||||||
else:
|
|
||||||
if not utils.BITCOIN_ONLY:
|
if not utils.BITCOIN_ONLY:
|
||||||
|
if not __debug__ or utils.EMULATOR:
|
||||||
apps.webauthn.boot(usb.iface_webauthn)
|
apps.webauthn.boot(usb.iface_webauthn)
|
||||||
|
|
||||||
# run main event loop and specify which screen is the default
|
# run main event loop and specify which screen is the default
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from trezor import io
|
from trezor import io, utils
|
||||||
|
|
||||||
from apps.common.storage.device import get_device_id
|
from apps.common.storage.device import get_device_id
|
||||||
|
|
||||||
@ -28,12 +28,13 @@ if __debug__:
|
|||||||
ep_out=0x03,
|
ep_out=0x03,
|
||||||
ep_cmd=0x84,
|
ep_cmd=0x84,
|
||||||
)
|
)
|
||||||
else:
|
if not utils.BITCOIN_ONLY:
|
||||||
|
if not __debug__ or utils.EMULATOR:
|
||||||
# interface used for FIDO/U2F and FIDO2/WebAuthn HID transport
|
# interface used for FIDO/U2F and FIDO2/WebAuthn HID transport
|
||||||
iface_webauthn = io.HID(
|
iface_webauthn = io.HID(
|
||||||
iface_num=1,
|
iface_num=4 if __debug__ else 1,
|
||||||
ep_in=0x82,
|
ep_in=0x85 if __debug__ else 0x82,
|
||||||
ep_out=0x02,
|
ep_out=0x04 if __debug__ else 0x02,
|
||||||
report_desc=bytes([
|
report_desc=bytes([
|
||||||
0x06, 0xd0, 0xf1, # USAGE_PAGE (FIDO Alliance)
|
0x06, 0xd0, 0xf1, # USAGE_PAGE (FIDO Alliance)
|
||||||
0x09, 0x01, # USAGE (U2F HID Authenticator Device)
|
0x09, 0x01, # USAGE (U2F HID Authenticator Device)
|
||||||
@ -67,5 +68,6 @@ bus.add(iface_wire)
|
|||||||
if __debug__:
|
if __debug__:
|
||||||
bus.add(iface_debug)
|
bus.add(iface_debug)
|
||||||
bus.add(iface_vcp)
|
bus.add(iface_vcp)
|
||||||
else:
|
if not utils.BITCOIN_ONLY:
|
||||||
|
if not __debug__ or utils.EMULATOR:
|
||||||
bus.add(iface_webauthn)
|
bus.add(iface_webauthn)
|
||||||
|
Loading…
Reference in New Issue
Block a user