Skip to content

Commit

Permalink
make Trezor FIDO2 UDP port configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Nov 13, 2019
1 parent f414dd2 commit e1e44d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/vendor/trezor/udp_backend.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import socket
import sys

Expand All @@ -23,6 +24,7 @@ def format_pkg(d, p):
class HidOverUDP(fido2._pyu2f.base.HidDevice):
@staticmethod
def Enumerate():
TREZOR_FIDO2_UDP_PORT = os.getenv("TREZOR_FIDO2_UDP_PORT", default="21326")
a = [
{
"vendor_id": 0x1209,
Expand All @@ -31,7 +33,7 @@ def Enumerate():
"serial_number": "12345678",
"usage": 0x01,
"usage_page": 0xF1D0,
"path": "127.0.0.1:21328",
"path": "127.0.0.1:%s" % TREZOR_FIDO2_UDP_PORT,
}
]
return a
Expand Down

0 comments on commit e1e44d4

Please sign in to comment.