feat: v0.2.2, auto find PIV slot id
This commit is contained in:
@@ -72,6 +72,10 @@ impl TinyEncryptConfig {
|
||||
Ok(config)
|
||||
}
|
||||
|
||||
pub fn find_by_kid(&self, kid: &str) -> Option<&TinyEncryptConfigEnvelop> {
|
||||
self.envelops.iter().find(|e| e.kid == kid)
|
||||
}
|
||||
|
||||
pub fn find_envelops(&self, profile: &Option<String>) -> XResult<Vec<&TinyEncryptConfigEnvelop>> {
|
||||
let profile = profile.as_ref().map(String::as_str).unwrap_or("default");
|
||||
debugging!("Profile: {}", profile);
|
||||
|
||||
Reference in New Issue
Block a user