Skip to content
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jsonwebkey = { version = "0.3.5", features = ["pkcs-convert"] }
tokio = { version = "1.43.0", features = ["full"] }

[dependencies.serde_with]
version = "3.11.0"
version = "3.14.0"
features = ["base64", "chrono"]

[dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ allow = [
"MIT",
"Apache-2.0",
"BSD-3-Clause",
"CDLA-Permissive-2.0",
"ISC",
"OpenSSL",
# Unicode-DFS-2016 is superseded by Unicode-3.0
Expand Down
10 changes: 5 additions & 5 deletions examples/challenge_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ fn my_evidence_builder(
accept: &[String],
token: Vec<u8>,
) -> Result<(Vec<u8>, String), Error> {
println!("server challenge: {:?}", nonce);
println!("acceptable media types: {:#?}", accept);
println!("server challenge: {nonce:?}");
println!("acceptable media types: {accept:#?}");

let mut token = token;
if token.is_empty() {
Expand Down Expand Up @@ -45,7 +45,7 @@ async fn main() {
.get_api_endpoint("newChallengeResponseSession")
.expect("Could not locate a newChallengeResponseSession endpoint");

let api_endpoint = format!("{}{}", base_url, relative_endpoint);
let api_endpoint = format!("{base_url}{relative_endpoint}");

// create a ChallengeResponse object
let cr = ChallengeResponseBuilder::new()
Expand All @@ -58,7 +58,7 @@ async fn main() {
// alternatively, to let Veraison pick the challenge: "let nonce = Nonce::Size(32);"

match cr.run(nonce, my_evidence_builder, Vec::new()).await {
Err(e) => println!("Error: {}", e),
Ok(attestation_result) => println!("Attestation Result: {}", attestation_result),
Err(e) => println!("Error: {e}"),
Ok(attestation_result) => println!("Attestation Result: {attestation_result}"),
}
}
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl std::fmt::Debug for Error {
| Error::ApiError(e)
| Error::CallbackError(e)
| Error::DataConversionError(e) => {
write!(f, "{}", e)
write!(f, "{e}")
}
}
}
Expand Down Expand Up @@ -263,8 +263,7 @@ impl ChallengeResponse {
Err(Error::NotImplementedError("asynchronous model".to_string()))
}
status => Err(Error::ApiError(format!(
"session response has unexpected success status: {}",
status,
"session response has unexpected success status: {status}",
))),
}
} else {
Expand Down Expand Up @@ -556,6 +555,7 @@ impl Discovery {
}
}

#[allow(dead_code)]
#[derive(serde::Deserialize)]
struct ProblemDetails {
r#type: String,
Expand Down