mathstuf / rust-keyutils

Rust interface to the Linux keyring
BSD 3-Clause "New" or "Revised" License
17 stars 9 forks source link

Allow specifying a special target for searches #58

Closed Nemo157 closed 1 year ago

Nemo157 commented 3 years ago

For example for reading a UserSession key you need to link it into the Process keyring, this makes that code much simpler as you don't need to have a Keyring instance for the Process keyring:

let key = session_keyring.search_for_key::<User, _, _>(AUTH_TOKEN_KEY, SpecialKeyring::Process)?;
let auth_token = key.read()?;