<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nitrocli/src/tests, branch status</title>
<subtitle>Robin Krahl's fork of nitrocli</subtitle>
<id>https://git.ireas.org/nitrocli/atom?h=status</id>
<link rel='self' href='https://git.ireas.org/nitrocli/atom?h=status'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/'/>
<updated>2020-09-11T16:47:52Z</updated>
<entry>
<title>fixup! List all matching devices in status commmand</title>
<updated>2020-09-11T16:47:52Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-09-11T16:47:52Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/commit/?id=3004a859d652049bc721960103efe574b567f2e2'/>
<id>urn:sha1:3004a859d652049bc721960103efe574b567f2e2</id>
<content type='text'>
cargo fmt
</content>
</entry>
<entry>
<title>List all matching devices in status commmand</title>
<updated>2020-09-11T09:03:32Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-09-09T19:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/commit/?id=ef7b6b03355b82621d16f4f02a5a1a4558ae64cc'/>
<id>urn:sha1:ef7b6b03355b82621d16f4f02a5a1a4558ae64cc</id>
<content type='text'>
Previously, the status command would fail if more than one Nitrokey
device is connected.  With this patch, we list all attached devices that
match the specified filter (model, serial number, USB path).

This also casues some changes in the test cases:  Previously, we assumed
that status fails for multiple attached devices.  We now use the lock
command to produce this behavior.
</content>
</entry>
<entry>
<title>Rename device path to USB path in list output</title>
<updated>2020-09-09T15:58:47Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-09-09T11:03:44Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/commit/?id=663f24b2e41c90709750337e47f2f43b3100422f'/>
<id>urn:sha1:663f24b2e41c90709750337e47f2f43b3100422f</id>
<content type='text'>
For consistency with the --usb-path option, this path renames the device
path column in the output of the list command to USB path.
</content>
</entry>
<entry>
<title>Add --usb-path option to select device</title>
<updated>2020-09-09T15:55:50Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-09-08T16:23:30Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/commit/?id=4a8c01adb5100fd0397aad239edc5e80d13aca13'/>
<id>urn:sha1:4a8c01adb5100fd0397aad239edc5e80d13aca13</id>
<content type='text'>
This patch adds the --usb-path option as an additional way to filter the
Nitrokey device to connect to.  While the serial number is a better
identifier in theory, the Nitrokey Storage devices do not send their
serial number in the USB device descriptor.  Having the --usb-path
options allows users to select one of multiple Nitrokey Storage devices.

While we could directly call the nitrokey::Manager::connect_path
function with the specified path, we integrate the --usb-path option
into the existing find_device function for consistent error messages and
to avoid having to duplicate the --model and --serial-number checks.
</content>
</entry>
<entry>
<title>Add test cases for new connection logic</title>
<updated>2020-09-07T23:42:56Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-09-07T18:47:41Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/commit/?id=16f6b3ba0c3535efd1b9288ea1980cdd281b6565'/>
<id>urn:sha1:16f6b3ba0c3535efd1b9288ea1980cdd281b6565</id>
<content type='text'>
This patch adds test cases for the new connection logic:
- connect_multiple checks that nitrocli aborts if more than one Nitrokey
  device is connected and no filter is set.
- connect_serial_number checks that we can use the --serial-number
  option to connect to all supported Nitrokey devices.
- connect_wrong_serial_number checks that nitrocli aborts if it can’t
  find a device with the requested serial number.
- connect_model checks that we can use the --model option to select the
  Nitrokey device to connect to, and that nitrocli aborts if it finds no
  matching device or multiple matching devices.
</content>
</entry>
<entry>
<title>fixup! Refactor connection handling</title>
<updated>2020-09-07T22:52:07Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-09-07T22:49:29Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/commit/?id=a4dc74f23ed1ac45a5db497499c2ac334ab295ce'/>
<id>urn:sha1:a4dc74f23ed1ac45a5db497499c2ac334ab295ce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fixup! Add --serial-number option</title>
<updated>2020-09-07T22:52:07Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-09-07T22:49:40Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/commit/?id=5de1cc408bbce296801969f563c5ba10fe504b02'/>
<id>urn:sha1:5de1cc408bbce296801969f563c5ba10fe504b02</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add --serial-number option</title>
<updated>2020-09-07T17:14:21Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-25T19:33:57Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/commit/?id=6917be7ab3c5a9d47866a45855c836a9cc6f86ff'/>
<id>urn:sha1:6917be7ab3c5a9d47866a45855c836a9cc6f86ff</id>
<content type='text'>
This patch adds the --serial-number option that allows the user to
filter the attached Nitrokey devices by serial number.  As the Nitrokey
Storage does not include its serial number in the USB device descriptor
and as we don't want to connect to it just to query the serial number,
this option only works for Nitrokey Storage devices.
</content>
</entry>
<entry>
<title>Refactor connection handling</title>
<updated>2020-09-07T17:05:11Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-25T20:07:07Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/commit/?id=1f8e482cfebb13b64002d65e61e29932770388be'/>
<id>urn:sha1:1f8e482cfebb13b64002d65e61e29932770388be</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Introduce builder-inspired way for configuring Nitrocli instance</title>
<updated>2020-08-25T01:04:20Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-08-25T01:04:20Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrocli/commit/?id=03d04439323f60bc2f4371585ae21404dbcb7eeb'/>
<id>urn:sha1:03d04439323f60bc2f4371585ae21404dbcb7eeb</id>
<content type='text'>
In the future we would like to provide more ways for tests to create a
Nitrocli instance. In order to prevent explosion of with_XXX methods for
each possible combination of arguments, this change allows for an easier
configuration of an existing object with builder-pattern-inspired
modifier methods.
</content>
</entry>
</feed>
