This library provides a credential store for use with the keyring crate that uses the Linux key-management facility (keyctl).
To use linux-kernel-keystore
, first add this to your Cargo.toml
:
[dependencies]
linux-kernel-keystore = "0.1"
To make this keystore the default for creation of keyring entries, construct a builder and use set_default_credential_builder
:
use linux_kernel_keystore::KeyutilsCredentialBuilder;
fn main() {
// Set keyutils backend as the default store
keyring::set_default_credential_builder(KeyutilsCredentialBuilder::new());
}
For more information please view the full documentation. There is also a small example program in the examples directory.
Licensed under either of the following at your discretion:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.