Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion az-cvm-vtpm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ serde_json = "1.0.107"
thiserror = "2.0.3"
sev = "6.2.1"
ureq = { version = "2.6.2", default-features = false, features = ["json"] }
zerocopy = { version = "0.7.26", features = ["derive"] }
zerocopy = { version = "0.8.26", features = ["derive"] }
hex = "0.4"
2 changes: 1 addition & 1 deletion az-cvm-vtpm/az-tdx-vtpm/src/imds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use az_cvm_vtpm::tdx::TdReport;
use serde::Deserialize;
use thiserror::Error;
use zerocopy::AsBytes;
use zerocopy::IntoBytes;

const IMDS_QUOTE_URL: &str = "http://169.254.169.254/acc/tdquote";

Expand Down
12 changes: 6 additions & 6 deletions az-cvm-vtpm/src/tdx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

use serde::{Deserialize, Serialize};
use serde_big_array::BigArray;
use zerocopy::AsBytes;
use zerocopy::{Immutable, IntoBytes};

#[repr(C)]
#[derive(AsBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
#[derive(Immutable, IntoBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
pub struct ReportType {
pub r#type: u8,
pub subtype: u8,
Expand All @@ -18,7 +18,7 @@ pub struct ReportType {
}

#[repr(C)]
#[derive(AsBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
#[derive(Immutable, IntoBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
pub struct ReportMac {
pub reporttype: ReportType,
pub _reserved_1: [u8; 12],
Expand All @@ -34,14 +34,14 @@ pub struct ReportMac {
}

#[repr(C)]
#[derive(AsBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
#[derive(Immutable, IntoBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
pub struct Rtmr {
#[serde(with = "BigArray")]
pub register_data: [u8; 48],
}

#[repr(C)]
#[derive(AsBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
#[derive(Immutable, IntoBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
pub struct TdInfo {
pub attributes: [u8; 8],
pub xfam: [u8; 8],
Expand All @@ -59,7 +59,7 @@ pub struct TdInfo {
}

#[repr(C)]
#[derive(AsBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
#[derive(Immutable, IntoBytes, Copy, Clone, Debug, Serialize, Deserialize, PartialEq)]
pub struct TdReport {
pub report_mac: ReportMac,
#[serde(with = "BigArray")]
Expand Down