diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2020-01-25 21:07:07 +0100 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2021-01-10 17:37:55 -0800 |
commit | 0f163477f63d533f90b61c1f39423712567bf7ea (patch) | |
tree | f8bac7008f382e9b0dd425ed75422e9a9af7938f /src/tests/pws.rs | |
parent | 0cc4371d138d5e98cd22813f10689cb089eef378 (diff) | |
download | nitrocli-0f163477f63d533f90b61c1f39423712567bf7ea.tar.gz nitrocli-0f163477f63d533f90b61c1f39423712567bf7ea.tar.bz2 |
Refactor connection handling
This patch introduces two new functions, find_device and connect, to
connect to a Nitrokey device. find_device queries the attached Nitrokey
devices, applies the filters (currently only the --model option) and
returns the first match. connect calls find_device and connects to the
returned device.
This refactoring allows us to add more device filters, for example a
--serial-number option, without code duplication.
Diffstat (limited to 'src/tests/pws.rs')
0 files changed, 0 insertions, 0 deletions