Merge branch 'release-v0.8.0'
Release v0.8.0

This minor release updates the nitrokey-sys-rs/libnitrokey dependency to
v3.6.0 and adds support for the Librem model.
Update repository URL in Cargo.toml
Update repository and triggers in build scripts

This patch updates the Git repository in the build scripts to point to
git.sr.ht instead of git.ireas.org.  Also, as we no longer add our own
triggers when submitting the builds from ireas.org, we have to add
triggers to the builds.  Finally, we disable the signature check when
the build is triggered from lists.sr.ht.
Update readme

This patch updates the following points in the readme:
- Change Nitrokey UG to Nitrokey GmbH.
- Add contributing information.
- Change the project mailing list from nitrokey-rs-dev@ireas.org to
Merge branch 'nitrokey-sys-v3.6.0' into next

This patch series updates the nitrokey-sys dependency to version 3.6.0
and makes use of the new features.
Update deprecated functions in readme

With libnitrokey 3.6, two more functions have been deprecated.
Support the Librem Key model

This patch adds support for the Librem Key model, a clone of the
Nitrokey Pro.  Functionally, it is identical to the Nitrokey Pro, but it
has a different USB vendor and product ID.

With this patch, we also change the Display implementation for Model to
return the complete name of the model, i. e. Nitrokey Pro, Nitrokey
Storage or Librem Key.
Add get_struct utility function

This patch adds the internal get_struct utility function that can be
used for querying a struct with a libnitrokey function that uses an
output parameter.  Instead of this:

    let mut out = R::default();
    get_command_result(op(&mut out))?;

We can now write this:

    get_struct(|out| op(out))
Use Default::default for nitrokey-sys structs

Since version 3.6.0, nitrokey-sys derives the Default trait for all
structs.  This allows us to simplify code snippets where we have to
construct an empty struct that is then filled by nitrokey-sys.
Use NK_config struct for configuration handling

Previously, the Nitrokey configuration was represented as an array in
libnitrokey.  libnitrokey 3.6 added the NK_config struct and the
NK_{read,write}_config_struct for type-safe configuration handling.
This patch replaces the old functions with the new versions using the
NK_config struct.  This makes the RawConfig struct obsolete as it is
identical to NK_config.
Correctly free pointer to PWS status

The NK_get_password_safe_slot_status function returns a pointer to an
array that has been allocated using new[].  As we only have access to
libc’s free function, we could not free this pointer properly (using
delete[]).  libnitrokey 3.6 added the NK_free_password_safe_slot_status
function which we now use to properly free the pointer.
Use NK_device_serial_number_as_u32

Previously, we called the NK_device_serial_number function in
Device::get_serial which returned a string that we had to parse into an
unsigned integer to use with the SerialNumber struct.  libnitrokey 3.6
introduced the NK_device_serial_number_as_u32 function that returns the
serial number as an unsigned integer.  This patch replaces the call to
NK_device_serial_number with this new function.
Update nitrokey-sys to v3.6.0

This patch updates the nitrokey-sys dependency to version 3.6.0, which
links to libnitrokey 3.6.
Rename *lock fields of the Config struct

libnitrokey calls the configuration fields that set bindings for the Num
Lock, Caps Lock and Scroll Lock keys numlock, capslock, scrolllock.  Due
to a typo, scrolllock with three l was renamed to scrollock with two l
in nitrokey-rs.

To make the field names easier to read (and type) and consistent with
the typical names for these keys, this patch changes them to num_lock,
caps_lock and scroll_lock.  In the doc comments, we now use the spelling
“Num Lock”, “Caps Lock” and “Scroll Lock”.
Fix dead links in Device documentation
Bump the MSRV to 1.40.0

In a previous commit, we used the non_exhaustive attribute to mark some
enums as non-exhaustive.  This attribute was stabilized in Rust version
1.40.0, so we have to increase our minimum supported Rust version.
Fix serial number check in device tests

The serial numuer check in the device tests are different for Storage
devices because the Nitrokey Storage currently does not report its
serial number in the status.  Our previous implementation matched the
model to determine how to check the serial number.  This no longer works
as we marked the model as non-exhaustive and was unnecessary.  This
patch changes the test logic to perform the serial number test for all
devices except the Nitrokey Storage.
Fix link in User doc comment
Make *Error, Model, DeviceWrapper non-exhaustive

Previously, all enums defined by the nitrokey crate were exhaustive.
This means that adding new variants to these enums is a breaking change.
To make it possible to add new features to nitrokey-rs without breaking
compatibility, this patch marks the Error, CommandError,
CommunicationError, LibraryError, Model and DeviceWrapper enums as
3046af52 — Daniel Mueller 2 months ago
Fix link to nitrocli repository

For a while now nitrocli now longer had the nitrocli/ subdirectory
present, as it used to when it was vendoring all its dependencies. With
this change we adjust the link to the project to reflect this change.