summaryrefslogtreecommitdiff
path: root/rust-src/src/key.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust-src/src/key.rs')
-rw-r--r--rust-src/src/key.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/rust-src/src/key.rs b/rust-src/src/key.rs
index 07292e8c..9319351e 100644
--- a/rust-src/src/key.rs
+++ b/rust-src/src/key.rs
@@ -41,10 +41,11 @@ fn check_for_key(key_name: &std::ffi::CStr) -> anyhow::Result<bool> {
if key_id > 0 {
info!("Key has became available");
Ok(true)
- } else if errno::errno().0 != libc::ENOKEY {
- Err(crate::ErrnoError(errno::errno()).into())
} else {
- Ok(false)
+ match errno::errno().0 {
+ libc::ENOKEY | libc::EKEYREVOKED => Ok(false),
+ _ => Err(crate::ErrnoError(errno::errno()).into()),
+ }
}
}