aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Add the Librem Key model to the unit testsRobin Krahl2020-09-23
|
* Add verify-bindings make targetRobin Krahl2020-09-23
| | | | | | This patch adds the verify-bindings make target that re-generates the bindings using bindgen and verifies that they do not differ from the pre-generated bindings in the Git repository.
* Add feature to generate bindings during buildRobin Krahl2020-09-22
| | | | | | | This patch adds the bindgen feature to the crate that allows users to re-generate the bindings, including layout tests, during the build instead of using the pre-generated bindings. Per default, this feature is disabled.
* Do not include layout tests in generated bindingsRobin Krahl2020-09-22
| | | | | | | | | | | | We are generating the Rust bindings in src/ffi.rs using bindgen once for all platforms on an amd64 machine. These bindings previously included layout tests. But these tests fail on some 32-bit architecture. See this discussion for more information: https://lists.sr.ht/~ireas/nitrokey-rs-dev/%3C20200919182408.GA1513%40ireas.org%3E With this patch, we remove the layout tests from the generated bindings. Instead, we will add the option to re-generate the bindings, including the layout tests, during the build in the next patch.
* Automatically refresh patchesRobin Krahl2020-09-20
| | | | | This patch adds the --refresh option to the quilt push invocation in the Makefile to automatically update the patches if the context changed.
* Update to libnitrokey v3.6Robin Krahl2020-09-20
| | | | | | | | | | | | | | | | | | | This patch updates libnitrokey from version 3.5 to version 3.6, causing these changes: - New constants: - `NK_device_model_NK_LIBREM` (`NK_device_model` enum) - New structures: - `NK_config` - New functions: - `NK_device_serial_number_as_u32` - `NK_write_config_struct` - `NK_free_config` - `NK_read_config_struct` - `NK_free_password_safe_slot_status` - Deprecated functions: - `NK_set_unencrypted_read_only` - `NK_set_unencrypted_read_write`
* Implement Display for Version in build.rsRobin Krahl2020-09-20
| | | | | | | | Previously, we implemented the std::string::ToString trait for the Version enum in build.rs for converting the libnitrokey version number to a string. This patch replaces this implementation with an implementation of the std::fmt::Display trait, which automatically generates a ToString implementation and is more idiomatic.
* Derive Default for libnitrokey structsRobin Krahl2020-09-20
| | | | | | | | This patch adds the --with-derive-default option to the bindgen invocation so that it derives Default implementations for all libnitrokey structs. This allows us to simplify code in nitrokey-rs, for example the initialization of structs that are used in nitrokey-sys functions with output parameters.
* Re-generate bindings in src/ffi.rsRobin Krahl2020-09-20
| | | | | | | | Older versions of bindgen rendered C++ doc comments as Rust doc comments using the /// syntax. Newer versions use the doc attribute instead. This patch re-generates the src/ffi.rs file with bindgen 0.55.1 so that it uses the new format. This makes it easier to perform changes in the future.
* Remove unnecessary __uint*_t typedefsRobin Krahl2020-09-20
| | | | | | | | While bindgen is able to replace the C uint types with the correct Rust types, it still generates typedefs for __uint{8,16,32,64}_t [0]. We don’t need these typedefs, so we add a patch to remove them. [0] https://github.com/rust-lang/rust-bindgen/issues/1663
* Use quilt to manage modifications in src/ffi.rsRobin Krahl2020-09-20
| | | | | | Previously, we manually modified the src/ffi.rs file to add deprecation attributes. With this patch, we use quilt to automatically apply patches with the changes.
* Add Makefile for generating src/ffi.rsRobin Krahl2020-09-20
| | | | | | | This patch adds a Makefile to make it easier to generate the src/ffi.rs file using bindgen. As we can use whitelists instead of manually removing the unnecessary type definitions, we also re-generate the file with the new settings.
* Release v3.5.0HEADv3.5.0masterRobin Krahl2019-07-04
|
* Mark deprecated functions using the deprecated attributeRobin Krahl2019-07-04
| | | | | | nitrokey-sys currently contains two deprecated functions: `NK_status` and `NK_totp_get_time`. This patch adds Rust’s `deprecated` attribute to the functions.
* Update to libnitrokey v3.5Robin Krahl2019-07-04
| | | | | This patch updates libnitrokey from version 3.4.1 to version 3.5 and lists all API changes in the changelog.
* Release v3.4.3v3.4.3Robin Krahl2019-01-12
|
* Check the USE_SYSTEM_LIBNITROKEY environment variableRobin Krahl2019-01-12
| | | | | | | This patch introduces the USE_SYSTEM_LIBNITROKEY environment variable. If it is set when compiling, the nitrokey-sys crate will not try to build libnitrokey from source but instead uses the system libnitrokey version.
* Release v3.4.2v3.4.2Robin Krahl2019-01-01
|
* Manually set the libnitrokey versionRobin Krahl2019-01-01
| | | | | | | As the nitrokey-sys crate’s version is no longer directly mapped to the libnitrokey version, this patch updates the build script. Instead of assuming that the nitrokey-sys version is also the libnitrokey version, we specify the libnitrokey version manually.
* Update README to reflect versioning changesRobin Krahl2019-01-01
| | | | | | To be able to ship crate updates without a new libnitrokey version, the patch version is decoupled from libnitrokey. This patch updates the README to describe this policy.
* Link to hidapi on non-Linux systemsRobin Krahl2018-12-31
| | | | | | | | | | | | According to the hidapi README [0], only Linux provides two different hidapi backends. Therefore this patch changes the build script to default to linking to hidapi on non-Linux systems. This patch fixes the macOS build issue reported by Philippe Normand and is based on the patch proposed by Philippe Normand at [1]. [0] https://github.com/signal11/hidapi/blob/master/README.txt [1] https://github.com/d-e-s-o/nitrocli/pull/42
* Use -std=c++14 flag when compiling libnitrokeyRobin Krahl2018-12-31
| | | | | | Based on the patch proposed by Philippe Normand at [0]. [0] https://github.com/d-e-s-o/nitrocli/pull/42
* Update to Rust edition 2018Robin Krahl2018-12-16
| | | | | This patch updates the crate to use Rust edition 2018. It also changes the use statement for the ffi module to the new crate:: syntax.
* Update login_auto test caseRobin Krahl2018-12-16
| | | | | | | | | Currently, the login_auto test case calls NK_logout before NK_login_auto due to the behavior described in libnitrokey pull request #115 [0]. This behavior has been fixed in version 3.4.1. Therefore this patch removes the NK_logout call. [0] https://github.com/Nitrokey/libnitrokey/pull/115
* Update to libnitrokey v3.4.1v3.4.1Robin Krahl2018-12-10
| | | | In libinitrokey v3.4.1, there are no changes affecting this crate.
* Update to libnitrokey v3.4v3.4.0Robin Krahl2018-12-10
| | | | | | Besides the changes listed in the changelog, this patch also changes the build system to be able to generate the version.cc file containing the library version.
* Extract libnitrokey version from crate versionRobin Krahl2018-07-05
| | | | | | | | | | | | | | | | | This patch uses the nitrokey-sys-rs crate version to extract the version of the contained libnitrokey and to deduce the name of the libnitrokey directory. The implementation uses these assumptions: 1. The crate major and minor version match the libnitrokey major and minor version. 2. If the crate has a pre-release version, it is assumed that this version has the format pre.<d>, where <d> is the output of `git describe` with all dashes replaced by dots. 3. The name of the libnitrokey directory is libnitrokey-<tag>, where <tag> is the corresponding Git version tag. 4. libnitrokey uses version tags of the format v<maj>.<min>, where <maj> the major version and <min> is the minor version.
* Use Git tag in libnitrokey directory nameRobin Krahl2018-07-05
| | | | | | To make automated construction of the library path easier, this patch changes the name of the libnitrokey source directory to match the Git version tag (-v3.3 instead of -3.3).
* Fix release date for v0.1.0 in changelogRobin Krahl2018-05-21
|
* Release v3.3.0v3.3.0Robin Krahl2018-05-21
|
* Update readme for libnitrokey compilationRobin Krahl2018-05-21
|
* Build libnitrokey from sourceRobin Krahl2018-05-21
| | | | | | This patch changes the build script to compile and link libnitrokey from the included source. Also, we have to link against hidapi-libusb as a libnitrokey requirement.
* Add .gitignoreRobin Krahl2018-05-20
|
* Replace generated with static codeRobin Krahl2018-05-20
| | | | | | | Use bindgen to generate the bindings statically instead of during build. Code generation is not necessary as NK_C_API.h does not contain any system-dependent definitions. Removing bindgen as a build dependency also drastically speeds up compilation.
* Update bindgen dependency to v0.37.0Robin Krahl2018-05-20
| | | | | The main reason for this update is the build time improvement due to the syntex replacement in version 0.31.0.
* Use included header for bindgenRobin Krahl2018-05-20
| | | | | Instead of relying on the libnitrokey headers installed on the system (via wrapper.h), use the included NK_C_API.h directly.
* Add source code for libnitrokey-3.3Robin Krahl2018-05-20
| | | | | | To make the build process easier, we can include the source code for libnitrokey-3.3. Now bindgen can access the header file directly. We might even want to compile our own libnitrokey.
* Add readmeRobin Krahl2018-05-20
|
* Change license from MIT to LGPL-3.0Robin Krahl2018-05-20
| | | | | | The crate is going to include the libnitrokey sources, which are licensed under LGLP-3.0. To make licensing easier, the license for the complete crate is changed from MIT to LGPG-3.0.
* Update repository and description in Cargo.tomlRobin Krahl2018-05-20
|
* Initial commit after move from nitrokey-rsv0.1.0Robin Krahl2018-05-20
Previously, this crate has been part of the nitrokey-rs repository at https://git.ireas.org/nitrokey-rs.