diff --git a/fido-mds-tool/src/main.rs b/fido-mds-tool/src/main.rs index e3cb234b..1a2b474f 100644 --- a/fido-mds-tool/src/main.rs +++ b/fido-mds-tool/src/main.rs @@ -182,8 +182,8 @@ fn main() { let s = match fs::read_to_string(path) { Ok(s) => s, - Err(e) => { - tracing::error!(?e); + Err(err) => { + tracing::error!(?err, "read_to_string"); return; } }; @@ -195,8 +195,8 @@ fn main() { eprintln!("{fd}"); } } - Err(e) => { - tracing::error!(?e); + Err(err) => { + tracing::error!(?err, "mds from str"); } } } @@ -208,8 +208,8 @@ fn main() { let s = match fs::read_to_string(path) { Ok(s) => s, - Err(e) => { - tracing::error!(?e); + Err(err) => { + tracing::error!(?err, "read_to_string"); return; } }; @@ -219,8 +219,8 @@ fn main() { debug!("{} fido metadata avaliable", mds.fido2.len()); mds } - Err(e) => { - tracing::error!(?e); + Err(err) => { + tracing::error!(?err, "mds from str"); return; } }; @@ -245,8 +245,8 @@ fn main() { let s = match fs::read_to_string(path) { Ok(s) => s, - Err(e) => { - tracing::error!(?e); + Err(err) => { + tracing::error!(?err, "read_to_string"); return; } }; @@ -283,8 +283,8 @@ fn main() { None => warn!("No metadata matched query"), } } - Err(e) => { - tracing::error!(?e); + Err(err) => { + tracing::error!(?err, "mds from str"); } } } diff --git a/fido-mds/src/mds.rs b/fido-mds/src/mds.rs index f7bf1cea..4c01eca9 100644 --- a/fido-mds/src/mds.rs +++ b/fido-mds/src/mds.rs @@ -329,6 +329,9 @@ pub enum AuthenticationAlgorithm { /// rsassa_pkcsv15_sha1_raw #[serde(rename = "rsassa_pkcsv15_sha1_raw")] RsassaPkcsv15Sha1Raw, + /// rsassa_pss_sha256_raw + #[serde(rename = "rsassa_pss_sha256_raw")] + RsassaPssSha256Raw, } impl fmt::Display for AuthenticationAlgorithm { @@ -359,6 +362,9 @@ impl fmt::Display for AuthenticationAlgorithm { AuthenticationAlgorithm::RsassaPkcsv15Sha1Raw => { write!(f, "rsassa_pkcsv15_sha1_raw") } + AuthenticationAlgorithm::RsassaPssSha256Raw => { + write!(f, "rsassa_pss_sha256_raw") + } } } } @@ -1101,7 +1107,10 @@ impl FromStr for FidoMds { // that has signed this metadata. let released = verifier.verify(&jws)?; - let metadata: FidoMds = released.from_json().map_err(|_| JwtError::Serde)?; + let metadata: FidoMds = released.from_json().map_err(|serde_err| { + tracing::error!(?serde_err); + JwtError::Serde + })?; // trace!(?metadata);