Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci #169

Merged
merged 4 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions src/service/attest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,23 +473,6 @@ impl Encodable for Name<'_> {
}
}

#[derive(Clone, Copy, Eq, PartialEq)]
/// Currently unconstructable.
pub enum Extension {}

#[derive(Clone, Copy, Eq, PartialEq)]
/// Only empty slices possible currently.
pub struct Extensions<'l>(&'l [Extension]);

impl Encodable for Extensions<'_> {
fn encoded_length(&self) -> BerResult<BerLength> {
Ok(0u8.into())
}
fn encode(&self, _encoder: &mut Encoder<'_>) -> BerResult<()> {
Ok(())
}
}

pub struct ParsedDatetime {
year: u16,
month: u8,
Expand Down
5 changes: 1 addition & 4 deletions src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//! The guiding example for client apps is `fido-authenticator`, which stores:
//! - it basic state and config, and
//! - the metadata for its resident keys as a serialized struct
//!
//! Both include references to cryptographic keys (via their handle)
//!
//! Currently, the backend (internal/external/volatile) is determined via an
Expand Down Expand Up @@ -76,8 +77,6 @@ use littlefs2::{driver::Storage, fs::Filesystem};
use crate::error::Error;
use crate::types::{Bytes, Location, PathBuf};
#[allow(unused_imports)]
#[cfg(feature = "semihosting")]
use cortex_m_semihosting::hprintln;
use littlefs2::{
fs::{DirEntry, Metadata},
path::Path,
Expand Down Expand Up @@ -495,15 +494,13 @@ macro_rules! store {

// TODO: replace this with "fs.create_dir_all(path.parent())"
pub fn create_directories(fs: &dyn DynFilesystem, path: &Path) -> Result<(), Error> {
// hprintln!("preparing {:?}", core::str::from_utf8(path).unwrap()).ok();
let path_bytes = path.as_ref().as_bytes();

for i in 0..path_bytes.len() {
if path_bytes[i] == b'/' {
let dir_bytes = &path_bytes[..i];
let dir = PathBuf::from(dir_bytes);
// let dir_str = core::str::from_utf8(dir).unwrap();
// hprintln!("create dir {:?}", dir_str).ok();
// fs.create_dir(dir).map_err(|_| Error::FilesystemWriteFailure)?;
match fs.create_dir(&dir) {
Err(littlefs2::io::Error::EntryAlreadyExisted) => {}
Expand Down
28 changes: 0 additions & 28 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,34 +495,6 @@ pub enum ObjectType {
Key(Secrecy),
}

#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub struct PublicKeyAttributes {
// never return naked private key
sensitive: bool,
// always_sensitive: bool,

// do not even return wrapped private key
extractable: bool,
// never_extractable: bool,

// do not save to disk
persistent: bool,
}

#[derive(Copy, Clone, Eq, PartialEq, Debug)]
pub struct PrivateKeyAttributes {
// never return naked private key
sensitive: bool,
// always_sensitive: bool,

// do not even return wrapped private key
extractable: bool,
// never_extractable: bool,

// do not save to disk
persistent: bool,
}

#[derive(Copy, Clone, Eq, PartialEq, Debug, Serialize, Deserialize)]
pub enum Location {
Volatile,
Expand Down
Loading