<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/nitrocli, branch v0.2.2</title>
<subtitle>A command line tool for interacting with Nitrokey devices (GitHub mirror)
</subtitle>
<id>https://git.ireas.org/mirrors/nitrocli/atom?h=v0.2.2</id>
<link rel='self' href='https://git.ireas.org/mirrors/nitrocli/atom?h=v0.2.2'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/'/>
<updated>2019-01-14T03:25:50Z</updated>
<entry>
<title>Bump version to 0.2.2</title>
<updated>2019-01-14T03:25:50Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-14T03:25:50Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=790e84091e10d52d2dd33aab7400b5d6345200a7'/>
<id>urn:sha1:790e84091e10d52d2dd33aab7400b5d6345200a7</id>
<content type='text'>
This change bumps the version of the crate to 0.2.2. The following
notable changes have been made since 0.2.1:
- Added the -v/--verbose option to control libnitrokey log level
- Added the -m/--model option to restrict connections to a device
  model
- Added the -f/--format option for the otp set subcommand to
  choose the secret format
  - Deprecated the --ascii option
- Honor NITROCLI_ADMIN_PIN and NITROCLI_USER_PIN as well as
  NITROCLI_NEW_ADMIN_PIN and NITROCLI_NEW_USER_PIN environment
  variables for non-interactive PIN supply
- Format nitrokey reported errors in more user-friendly format
- Bumped nitrokey dependency to 0.3.1
</content>
</entry>
<entry>
<title>Remove inconsistent spacing for PIN documentation</title>
<updated>2019-01-11T00:05:26Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-11T00:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=304eb1b4954a9fcee1b2b8a06e3dd25e46ca3787'/>
<id>urn:sha1:304eb1b4954a9fcee1b2b8a06e3dd25e46ca3787</id>
<content type='text'>
The command detailed in the PIN section in the man page exhibit a larger
line spacing than all the other commands documented. The reason is that
we have an addition newline between each of the individual subcommands
in this section.
This patch removes this additional newline to achieve a more consistent
appearance.
</content>
</entry>
<entry>
<title>Report command errors properly</title>
<updated>2019-01-09T19:16:03Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-09T19:16:03Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=3a99e7417e4c4eb30df9e711077c89b75764c029'/>
<id>urn:sha1:3a99e7417e4c4eb30df9e711077c89b75764c029</id>
<content type='text'>
So far we have taken all nitrokey::CommandError objects and put them in
formatted form into the Error::Error variant. What we really should do,
though, is to preserve the original error, with the additional context
provided by the caller, and report that up the stack directly. Doing so
has at least the benefit that we are able to check for expected errors
without hard coding the textual representation as maintained by the
nitrokey create.
This change refactors the code accordingly and adds two tests for such
expected error codes.
</content>
</entry>
<entry>
<title>Add tests for pin set and pin unblock commands</title>
<updated>2019-01-10T23:22:13Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-10T23:22:13Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=6e0efd98e9ee07a01241e2187b4c820770c3c478'/>
<id>urn:sha1:6e0efd98e9ee07a01241e2187b4c820770c3c478</id>
<content type='text'>
Now that we have the infrastructure for non-interactive PIN supply in
place, we can add tests for commands that require the entry of a PIN.
To that end, this change adds tests for the pin set as well as pin
unblock commands.
</content>
</entry>
<entry>
<title>Honor context provided Admin &amp; User PIN in pin commands</title>
<updated>2019-01-10T00:31:31Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-10T00:31:31Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=eea4f7357d7a3e3b365d887671ba78fd386a6d2d'/>
<id>urn:sha1:eea4f7357d7a3e3b365d887671ba78fd386a6d2d</id>
<content type='text'>
The second source of interactivity comes from the pin set and pin
unblock commands, which also inquire with the pinentry module to ask the
user for a PIN.
This change adjusts the two commands to honor the PINs as available in
the command execution context. It also updates the documentation
to reflect the availability of the newly introduced and honored
environment variables NITROCLI_ADMIN_PIN &amp; NITROCLI_USER_PIN as well as
NITROCLI_NEW_ADMIN_PIN &amp; NITROCLI_NEW_USER_PIN.
</content>
</entry>
<entry>
<title>Make try_with_pin_and_data logic honor execution context PINs</title>
<updated>2019-01-10T00:35:33Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-10T00:35:33Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=ae939694c598ae23690f6a56f977c66ae7c0f020'/>
<id>urn:sha1:ae939694c598ae23690f6a56f977c66ae7c0f020</id>
<content type='text'>
The try_with_pin_and_data function is used by many commands to ask the
user for a PIN in an interactive manner. Because we do not want to have
any interactivity in our tests, we should honor the command execution's
admin &amp; user PIN fields from this function, if set.
This change adjusts the function to honor the command execution
context's admin &amp; user PIN, if set. In order to do so it also adjusts
the callers to hand through the context to begin with.
</content>
</entry>
<entry>
<title>Introduce Admin and User PIN fields to execution context</title>
<updated>2019-01-09T21:41:53Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-09T21:41:53Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=4842ac86c0a805c5c4a679644594252ca5ea388b'/>
<id>urn:sha1:4842ac86c0a805c5c4a679644594252ca5ea388b</id>
<content type='text'>
In order to run tests fully non-interactively we need to avoid the need
for using the GPG agent's PIN entry and caching mechanism. To accomplish
that, we first need an alternate way to supply the PINs to use to the
program.
This change offers such a way by extending the execution context with
two fields representing the PINs that are populated by corresponding
environment variables, NITROCLI_ADMIN_PIN &amp; NITROCLI_USER_PIN, if set.
While only two PINs are required right now, because the program allows
for the changing of each of the PINs, we also add two fields
representing new PINs. These latter two fields are populated by the
NITROCLI_NEW_ADMIN_PIN and NITROCLI_NEW_USER_PIN environment variables.
</content>
</entry>
<entry>
<title>Refactor integration test code internals for program invocation</title>
<updated>2019-01-10T21:49:48Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-10T21:49:48Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=749a5c78c2075c5d37b01ec4fd23704aa5cfdf09'/>
<id>urn:sha1:749a5c78c2075c5d37b01ec4fd23704aa5cfdf09</id>
<content type='text'>
In the future we will need to perform a sequence of invocations of the
program for testing purposes, with each having a slightly different
execution context. Such a scheme does not map very well to the existing
design where we essentially just have a function invocation to run the
program. We would either have functions that produce a different
execution context or pass in the data to modify.
Neither of these approaches is appealing and so this change reworks the
code slightly. With it, we now can create a Nitrocli object, which
contains the data that diverges from the default execution context. This
data will eventually be modifiable by callers.
</content>
</entry>
<entry>
<title>Simplify try_with_pin_and_data function</title>
<updated>2019-01-09T23:15:55Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-09T23:15:55Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=886788a95a3c79a7664cbcd0bfffa1e500461adf'/>
<id>urn:sha1:886788a95a3c79a7664cbcd0bfffa1e500461adf</id>
<content type='text'>
The try_with_pin_and_data function is a fairly complex beast. Part of
that complexity stems from the returned Result value, whose error part
not only contains the error but also the previously passed in data. As
it turns out, though, this data as returned is never actually consumed
by any client.
Hence, this change simplifies the logic slightly by removing all the
additional complexity that this tuple return entailed.
</content>
</entry>
<entry>
<title>Make pinentry::inquire_pin return String directly</title>
<updated>2019-01-10T00:34:53Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-10T00:34:53Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=ac7025cbe1bc46d25dd978138c6b397d77853232'/>
<id>urn:sha1:ac7025cbe1bc46d25dd978138c6b397d77853232</id>
<content type='text'>
The inquire_pin function of the pinentry module used to return a vector
of bytes, as that is what is ultimately read from the gpg-agent process.
All clients of this function, however, work with a string and, hence,
convert this vector into a string.
As it turns out, for better or worse, the pinentry::parse_pinentry_pin
function (which produces the result of inquire_pin) internally already
works with a string but then converts it back. That is both not useful
and a waste of resources.
This change adjusts both functions of interest to simply return a String
object instead, removing the need for conversions at the clients. While
at it, the patch also removes the need for a bunch of unnecessary
allocations caused by sub-par parameter type choice.
</content>
</entry>
</feed>
