Skip to content

v0.5.0

Latest
Compare
Choose a tag to compare
@mheese mheese released this 20 Apr 05:58
· 20 commits to master since this release
v0.5.0
a9935e0

Big thanks to all the contributors! Here is a list of high-level changes:

  • thanks to @hug-dev - adding additional check to CK_ATTRIBUTE getters to prevent wrong usage after get_attribute_value has been called - this changes the method signatures of all getters to return a Result
  • thanks to @woodruffw - adding string accessors which make working with slot info and token info more natural without breaking the C representation
  • moved from Travis CI to GitHub actions
  • added Windows builds to CI pipeline
  • added code coverage with tarpaulin to Codecov and made it part of CI pipeline
  • added RustSec audit check to CI pipeline
  • changed CK_ULONG (and CK_LONG respectively) to u64: it was usize before which might be correct for length values, however, it is also used at other places and simply does not correctly represent PKCS#11 - this will become a Cargo feature in the future to allow choosing between u32 and u64 as well as packed structs (this is currently the default on Windows only, but could potentially be required on any platform)
  • completed integration tests on all PKCS#11 functions - not all functions are implemented in SoftHSM and some tests will start to panic once they become available
  • changed wait_for_slot_event signature to return an Option(CK_SLOT_ID) inside of the Result: when this function is called with CKF_DONT_BLOCK it can return with CKR_NO_EVENT which is not an error, but just denotes no event. To keep it in the spirit of the rest of the implementation: non-zero return values that are not errors will always be handled.
  • removed custom rustfmt.toml and added cargo fmt and cargo clippy checks to CI pipelines to enforce good coding standards
  • removed PKCS#11 docs from the repo and pointed to a repo which contains all PKCS#11 standards as a full collection

NOTE: this release has breaking API changes:

  • CK_ATTRIBUTE getters now return Result (see above for details)
  • CK_LONG and CK_ULONG are now i64 or u64 respectively (see above for details)
  • wait_for_slot_event function returns an Option(CK_SLOT_ID) inside of the Result (see above for details)

NOTE: with the v0.6.0 release this library will switch to Rust 2018.