Skip to content

Commit

Permalink
ibmse: use hash rather than hex for initdata digest in claims
Browse files Browse the repository at this point in the history
Use the initdata hash value directly rather than it's hex in claims

Signed-off-by: Qi Feng Huo <[email protected]>
  • Loading branch information
Qi Feng Huo authored and Xynnn007 committed Aug 12, 2024
1 parent e3bd648 commit 81f904f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions deps/verifier/src/se/ibmse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ pub struct SeAttestationResponse {
pub struct SeAttestationClaims {
#[serde_as(as = "Hex")]
cuid: ConfigUid,
#[serde_as(as = "Hex")]
user_data: Vec<u8>,
user_data: String,
version: u32,
#[serde_as(as = "Hex")]
image_phkh: Vec<u8>,
Expand Down Expand Up @@ -218,7 +217,7 @@ impl SeVerifierImpl {

let claims = SeAttestationClaims {
cuid: se_response.cuid,
user_data: se_response.user_data.clone(),
user_data: String::from_utf8(se_response.user_data.clone())?,
version: AttestationVersion::One as u32,
image_phkh: image_phkh.to_vec(),
attestation_phkh: attestation_phkh.to_vec(),
Expand Down

0 comments on commit 81f904f

Please sign in to comment.