| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
We have never been fully satisfied with the name arg_defs. Now that we
have gotten rid of the formerly used args module, this change renames
arg_defs to args.
|
|
|
|
|
|
| |
This change removes the args module by moving all remaining
functionality in it into main.rs. The result is arguably a nice
consolidation of all context related definitions in a single module.
|
|
|
|
|
|
| |
As a next step moving us closer towards removing the args module, this
change merges the config_set function into the existing function of the
same name in the commands module.
|
|
|
|
|
|
|
|
|
| |
Now that we have isolated and separated out structopt specific
definitions into a new module, arg_defs, args.rs is actually so small
that we do not want to keep it around any longer.
This change marks a first step moving us closer towards removing it.
Specifically, it merges the otp_set function from args.rs into the
function of the same name in commands.rs.
|
|
|
|
|
|
|
|
| |
The PinType struct, despite being intended for the pinentry module, is
ultimately part of the argument handling definitions. Because our goal
is to consolidate all of those in a single file, this change moves the
definition of this type from the pinentry module into the newly
introduced arg_defs.
|
|
|
|
|
|
|
|
| |
This change marks the first step in a restructuring of the argument
handling code, the ultimate goal of which is a separation of the type
definitions as used by structopt from the logic associated with it. This
change in particular introduces a new module, arg_defs, that contains
all those type definitions that previously resided in the args module.
|
|
|
|
|
|
| |
nitrokey 0.6.0 introduced the SerialNumber struct (instead of
representing serial numbers as strings). We no longer have to manually
format the serial number as SerialNumber implements Display.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the list command that lists all attached Nitrokey
devices. Currently the Nitrokey Storage does not report its serial
number during HID enumeration, see [0]. So if we detect a Nitrokey
Storage device, we connect to it and use the get_serial_number function
to query its serial number. This can be disabled using the --no-connect
option.
Note that even the get_serial_number function reports a wrong serial
number for the Nitrokey Storage, see [1].
[0] https://github.com/Nitrokey/nitrokey-storage-firmware/issues/88
[1] https://github.com/Nitrokey/nitrokey-storage-firmware/issues/76
|
|
|
|
|
| |
This patch adds the basic scaffolding for the list command which will
list all attached Nitrokey devices.
|
|
|
|
|
|
| |
This change updates the version of the nitrokey crate that we use to
0.5.1. As part of that, it replaces occurrences of Storage::get_status
with Storage::get_storage_status as the method has been renamed.
|
|
Now that all vendored dependencies have been removed, this change moves
the program's source code from the nitrocli/ directory into the root of
the repository.
|