Skip to content

Commit f6fe0bd

Browse files
committed
refactor: change file name of the generated quote to incorporate report_data
1 parent b1c0abc commit f6fe0bd

File tree

1 file changed

+3
-3
lines changed
  • cvmassistants/quote-generator/src

1 file changed

+3
-3
lines changed

cvmassistants/quote-generator/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ use error::QuoteGeneratorError;
3838
const REPORT_DATA_SIZE: usize = 64;
3939
const REPORT_SIZE: usize = 1024;
4040
const TDX_UUID_SIZE: usize = 16;
41-
const QUOTE_FILE_NAME: &str = "quote.dat";
4241

4342
/// Creates a TDX report data structure from input bytes.
4443
///
@@ -156,8 +155,9 @@ fn main() -> Result<(), QuoteGeneratorError> {
156155
debug!("TDX report: {:?}", tdx_report.d);
157156
let quote = create_quote(&report_data)?;
158157
debug!("Quote: {:?}", quote);
159-
fs::write(QUOTE_FILE_NAME, quote)?;
160-
info!("Quote successfully written to {}", QUOTE_FILE_NAME);
158+
let quote_filename = format!("quote-{}.dat", input);
159+
fs::write(&quote_filename, quote)?;
160+
info!("Quote successfully written to {}", quote_filename);
161161

162162
Ok(())
163163
}

0 commit comments

Comments
 (0)