<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/nitrocli/src/tests, branch v0.3.4</title>
<subtitle>A command line tool for interacting with Nitrokey devices (GitHub mirror)
</subtitle>
<id>https://git.ireas.org/mirrors/nitrocli/atom?h=v0.3.4</id>
<link rel='self' href='https://git.ireas.org/mirrors/nitrocli/atom?h=v0.3.4'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/'/>
<updated>2020-09-01T02:25:48Z</updated>
<entry>
<title>Remove application global Result definition</title>
<updated>2020-09-01T02:25:48Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-09-01T02:25:48Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=67ba96eb7d592ac7c09b2221420c6f706ac89a13'/>
<id>urn:sha1:67ba96eb7d592ac7c09b2221420c6f706ac89a13</id>
<content type='text'>
In the past we were using an application global custom Result type
definition. This makes less sense now that we switched over to using
anyhow's Error and Result types. We kept that for the time being, but
with this change we remove the type and use anyhow::Result instead.
</content>
</entry>
<entry>
<title>Use anyhow for error handling</title>
<updated>2020-08-29T01:44:45Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-08-29T01:44:45Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=b605614e5b3dab828e4f33c300836deab421be34'/>
<id>urn:sha1:b605614e5b3dab828e4f33c300836deab421be34</id>
<content type='text'>
This patch changes our error handling approach from the ground up:
instead of having a globally used Error enum that contains variants for
all possible errors, we now use anyhow's Error type. This approach is
more dynamic (and not statically typed), but it allows for more fine
grained error messages and overall more user-friendly error reporting.
Overall it also is a net simplification. While we have one dynamic cast
now, in order to be able to handle erroneous password/PIN entries
correctly, that is considered a reasonable compromise.
</content>
</entry>
<entry>
<title>Remove UnwrapError test trait</title>
<updated>2020-07-10T02:01:52Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-07-10T02:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=756dc2ed9d16a3edbfdc4778feb11f0b0c84d897'/>
<id>urn:sha1:756dc2ed9d16a3edbfdc4778feb11f0b0c84d897</id>
<content type='text'>
This change wraps up the removal of the UnwrapError test trait. This
step prepares us for the subsequent removal of the application's global
Error enum type, in favor of the usage of anyhow's Error type.
</content>
</entry>
<entry>
<title>Remove unwrap_lib_err method from UnwrapError test trait</title>
<updated>2020-07-10T01:57:18Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-07-10T01:57:18Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=c461a506f6bf3bf73374df289298879ba9d2d125'/>
<id>urn:sha1:c461a506f6bf3bf73374df289298879ba9d2d125</id>
<content type='text'>
This change marks the next step in getting rid of the UnwrapError test
trait. Specifically, it removes its unwrap_lib_err method.
</content>
</entry>
<entry>
<title>Remove unwrap_str_err method from UnwrapError test trait</title>
<updated>2020-07-08T16:16:56Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-07-08T16:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=efb6fbffdb96c6acd197b8a7c4fe0ed9855a151e'/>
<id>urn:sha1:efb6fbffdb96c6acd197b8a7c4fe0ed9855a151e</id>
<content type='text'>
With upcoming changes we intend to move towards a model where we do not
distinguish the individual error variants the program deals with in a
global enum.
In preparation of such a change, this patch marks a first step in
removing the UnwrapError test trait, which relies on the existence of
exactly such typed errors. In particular, we remove the unwrap_str_err
method from it, basically falling back to just working with strings.
</content>
</entry>
<entry>
<title>Change default OTP format to base32</title>
<updated>2020-07-08T00:35:50Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-07-08T00:35:50Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=99fde3cac7c9cf278b81876994d3a4f4b795b8ce'/>
<id>urn:sha1:99fde3cac7c9cf278b81876994d3a4f4b795b8ce</id>
<content type='text'>
An arguably unrepresentative survey of services (GitHub, Google
Authenticator, and Bitbucket) seems to suggests that the base32 format
is the de-facto standard format for OTP secrets. Given that it's not
necessarily obvious what format a secret is in and that most services
refrain from mentioning it explicitly, having the correct default format
is fairly important.
With this change we switch the default format from hexadecimal to
base32 to accommodate for this finding.
</content>
</entry>
<entry>
<title>Rename arg_defs.rs to args.rs</title>
<updated>2020-04-11T22:00:06Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-04-11T22:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=f2ace56200f0229a4dcbd1767f48a39e1daa343d'/>
<id>urn:sha1:f2ace56200f0229a4dcbd1767f48a39e1daa343d</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Merge remaining bits of args.rs into main.rs</title>
<updated>2020-04-11T20:23:52Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-04-11T20:23:52Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=fafbf4a1bf635d5eea049cf561fbf8aa293c8e2b'/>
<id>urn:sha1:fafbf4a1bf635d5eea049cf561fbf8aa293c8e2b</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Factor out arg_defs.rs for argument parsing related types</title>
<updated>2020-04-02T05:59:22Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-04-02T05:59:22Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=a3f8ae474d153048c5a9252125099ef49cc6b5f4'/>
<id>urn:sha1:a3f8ae474d153048c5a9252125099ef49cc6b5f4</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Provide correct mutual exclusion between config set -o and -O options</title>
<updated>2020-01-25T04:36:34Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2020-01-25T04:36:34Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/mirrors/nitrocli/commit/?id=61b5aff7be250387ce8510138cae773ed3bd6577'/>
<id>urn:sha1:61b5aff7be250387ce8510138cae773ed3bd6577</id>
<content type='text'>
The -o/--otp-pin and -O/--no-otp-pin options to the config set command
are supposed to be mutually exclusive, with wrong usage detected by
structopt.
That is not the case currently, however, because the argument to
structopt's conflicts_with attribute is supposed to be the resulting
option and not the name of the variable capturing the result.
This change fixes the problem by changing the string accordingly.
</content>
</entry>
</feed>
