Implement file-backed persistent storage
This allows running ctap2 authenticator application on non-embedded host OS to implement virtual FIDO2 authenticator for QEMU
This commit is contained in:
@@ -34,6 +34,18 @@ pub enum StorageError {
|
||||
|
||||
/// Implementation-specific error.
|
||||
CustomError,
|
||||
|
||||
// I/O error
|
||||
#[cfg(feature = "hostenv")]
|
||||
IOError,
|
||||
}
|
||||
|
||||
#[cfg(feature = "hostenv")]
|
||||
#[allow(unused_variables)]
|
||||
impl From<std::io::Error> for StorageError {
|
||||
fn from(error: std::io::Error) -> Self {
|
||||
Self::IOError
|
||||
}
|
||||
}
|
||||
|
||||
pub type StorageResult<T> = Result<T, StorageError>;
|
||||
|
||||
Reference in New Issue
Block a user