Skip to main content

Module simulate

Module simulate 

Source
Expand description

Simulated TEE attestation for development and testing.

When A3S_TEE_SIMULATE=1 is set, the guest attestation server generates fake SNP reports with correct field layout but no hardware signature. The host verifier can accept these with allow_simulated: true.

Constants§

SIMULATED_CHIP_ID
Simulated chip ID (all 0xA3 bytes, clearly fake).
SIMULATED_REPORT_VERSION
Simulated SNP report version marker. Real SNP reports use version 2; simulated reports use 0xA3 to distinguish.
TEE_SIMULATE_ENV
Environment variable to enable TEE simulation mode.

Functions§

build_simulated_report
Build a simulated 1184-byte SNP report with the given report_data.
is_simulate_mode
Check if TEE simulation mode is enabled via environment variable.
is_simulated_report
Check if an SNP report is a simulated report (version == 0xA3).