diff --git a/crates/test-cli/src/lib.rs b/crates/test-cli/src/lib.rs index 8f60b2300..7ed40a961 100644 --- a/crates/test-cli/src/lib.rs +++ b/crates/test-cli/src/lib.rs @@ -577,8 +577,13 @@ pub async fn run_command( }, CliCommand::GetTdxQuote { tss_endpoint, output_filename } => { // TODO add context - let quote_bytes = - reqwest::get(format!("http://{}/attest", tss_endpoint)).await?.bytes().await?; + let response = + reqwest::get(format!("http://{}/attest?context=change_endpoint", tss_endpoint)) + .await?; + if response.status() != reqwest::StatusCode::OK { + return Err(anyhow!(response.text().await?)); + } + let quote_bytes = response.bytes().await?; let output_filename = output_filename.unwrap_or("quote.dat".into()); std::fs::write(&output_filename, quote_bytes)?;