<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/nitrocli/src, branch master</title>
<subtitle>A command line tool for interacting with Nitrokey devices (GitHub mirror)
</subtitle>
<id>https://git.ireas.org/mirrors/nitrocli/atom?h=master</id>
<link rel='self' href='https://git.ireas.org/mirrors/nitrocli/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/'/>
<updated>2020-09-30T03:31:50Z</updated>
<entry>
<title>Shorten some error handling paths</title>
<updated>2020-09-30T03:31:50Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-09-30T03:31:50Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=1af85ad50523427384234313fe00aa8bfa89135f'/>
<id>urn:sha1:1af85ad50523427384234313fe00aa8bfa89135f</id>
<content type='text'>
When we originally switched over to using anyhow for error handling, we
evidently missed to take advantage of its context support in a couple of
error paths. The result was that we ended up with rather long winded
  &gt; result.ok_or_else(|| anyhow::anyhow!(...))
constructs.
This change shortens them, making use of the anyhow::Context trait.
</content>
</entry>
<entry>
<title>Rename device path to USB path in list output</title>
<updated>2021-01-11T01:37:57Z</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/mirrors/nitrocli/commit/?id=b39663bf381cbc1079fed08fbd3d0fe665151e90'/>
<id>urn:sha1:b39663bf381cbc1079fed08fbd3d0fe665151e90</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>2021-01-11T01:37:57Z</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/mirrors/nitrocli/commit/?id=9593dfd03a6ca085d649ca090b6ec5e5f0104e78'/>
<id>urn:sha1:9593dfd03a6ca085d649ca090b6ec5e5f0104e78</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>2021-01-11T01:37: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/mirrors/nitrocli/commit/?id=9975f8810399d5e535f2e2fd62b4dc56b313f955'/>
<id>urn:sha1:9975f8810399d5e535f2e2fd62b4dc56b313f955</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>Add --serial-number option</title>
<updated>2021-01-11T01:37:56Z</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/mirrors/nitrocli/commit/?id=6ce6dc4f3db67c3f6b6148b1fb03644e91900291'/>
<id>urn:sha1:6ce6dc4f3db67c3f6b6148b1fb03644e91900291</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>Fail if multiple matching devices are attached</title>
<updated>2021-01-11T01:37:55Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-09-06T21:44:18Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=6f029e744abc0f6d4cfe756d7e6b771be1be3999'/>
<id>urn:sha1:6f029e744abc0f6d4cfe756d7e6b771be1be3999</id>
<content type='text'>
Previously, we just applied our filter (if any) to all attached Nitrokey
devices and selected the first match when connection to a Nitrokey
device.  This may lead to unexpected behavior if multiple devices are
attached.  This patch changes the find_device function to return an
error if multiple matching devices are found.
</content>
</entry>
<entry>
<title>Refactor connection handling</title>
<updated>2021-01-11T01:37:55Z</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/mirrors/nitrocli/commit/?id=0f163477f63d533f90b61c1f39423712567bf7ea'/>
<id>urn:sha1:0f163477f63d533f90b61c1f39423712567bf7ea</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/mirrors/nitrocli/commit/?id=0cc4371d138d5e98cd22813f10689cb089eef378'/>
<id>urn:sha1:0cc4371d138d5e98cd22813f10689cb089eef378</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>
<entry>
<title>Remove Nitrocli::model method</title>
<updated>2020-09-05T13:14:38Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-09-05T13:14:38Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=24250081fe899b2f4ddfcf1fffc812e8c5e7b83e'/>
<id>urn:sha1:24250081fe899b2f4ddfcf1fffc812e8c5e7b83e</id>
<content type='text'>
While the Nitrocli::model() method was well intentioned, we do not
actually need it because we create a Nitrocli instance from the model
passed to the individual test. We can just reuse this model instead.
With this patch we do exactly that, allowing us to get rid of
Nitrocli::model() all together.
</content>
</entry>
<entry>
<title>Adjust copyright &amp; license specification to comply with REUSE 3.0</title>
<updated>2020-09-03T04:40:32Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-09-03T04:40:32Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=79346022d01a73a8987298d82a2f0b749b63ac50'/>
<id>urn:sha1:79346022d01a73a8987298d82a2f0b749b63ac50</id>
<content type='text'>
With this change we switch to using a REUSE compliant way of specifying
the copyright &amp; license of the program. To be fully in conformance we
also add additional license specifications for the remaining files in
the project. Lastly, a new CI pipeline rule takes care of verifying
compliance on an ongoing basis.
</content>
</entry>
</feed>
