Skip to content

Commit

Permalink
REMOVE: print secret for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerfanelli committed Dec 11, 2024
1 parent 5dc6dac commit 56ccb1b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions kernel/src/svsm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,15 @@ pub extern "C" fn svsm_main() {
panic!("Failed to prepare guest FW: {e:#?}");
}

let mut attest_driver = AttestationDriver::from(kbs_types::Tee::Snp);
let _secret = attest_driver.attest();
#[cfg(feature = "attest")]
{
let mut attest_driver = AttestationDriver::try_from(kbs_types::Tee::Snp).unwrap();

let secret = attest_driver.attest().unwrap();

let msg = core::str::from_utf8(&secret).unwrap();
log::info!("Decrypted secret from attestation server: {}", msg);
}
#[cfg(all(feature = "vtpm", not(test)))]
vtpm_init().expect("vTPM failed to initialize");

Expand Down

0 comments on commit 56ccb1b

Please sign in to comment.