Skip to content

Commit

Permalink
Add snp attestation guest test script
Browse files Browse the repository at this point in the history
Signed-off-by: Zixi Chen <[email protected]>
  • Loading branch information
zixi-chen committed Dec 3, 2024
1 parent dba22f4 commit 18be3b7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions qemu/deps/sev-snp/regular_attestation_workflow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -e
# Verify regular attestation workflow on snp guest
snpguest report attestation-report.bin request-data.txt --random
snpguest display report attestation-report.bin
# get cpu model
cpu_familly_id=$(cat /proc/cpuinfo | grep 'cpu family' | head -1 | cut -d ":" -f 2 | tr -d " ")
model_id=$(cat /proc/cpuinfo | grep 'model' | head -1 | cut -d ":" -f 2 | tr -d " ")
dict_cpu=([251]="milan" [2517]="genoa")
cpu_model=${dict_cpu[${cpu_familly_id}${model_id}]}
snpguest fetch ca pem ${cpu_model} ./ -e vcek
snpguest fetch vcek pem ${cpu_model} ./ attestation-report.bin
snpguest verify certs ./
snpguest verify attestation ./ attestation-report.bin

0 comments on commit 18be3b7

Please sign in to comment.