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 Nov 26, 2024
1 parent 8f5b677 commit 39727d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kernel/src/svsm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,11 @@ pub extern "C" fn svsm_main() {
prepare_fw_launch(fw_meta).expect("Failed to setup guest VMSA/CAA");
}

let mut attest_driver = AttestationDriver::from(kbs_types::Tee::Snp);
let _secret = attest_driver.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 39727d1

Please sign in to comment.