pub struct CsvGuest(/* private fields */);Expand description
A handle to the CSV guest device.
Implementations§
Source§impl CsvGuest
impl CsvGuest
Sourcepub fn open() -> Result<CsvGuest>
pub fn open() -> Result<CsvGuest>
Generate a handle to the CSV guest platform via /dev/csv-guest.
Sourcepub fn get_report(
&mut self,
data: Option<[u8; 64]>,
mnonce: Option<[u8; 16]>,
) -> Result<AttestationReportWrapper, Error>
pub fn get_report( &mut self, data: Option<[u8; 64]>, mnonce: Option<[u8; 16]>, ) -> Result<AttestationReportWrapper, Error>
Requests an legacy attestation report (i.e. AttestationReportV1) from the HYGON Secure Processor.
Hygon CSV1,CSV2 only support legacy attestation report. Hygon CSV3 supports legacy attestation report, and supports extended attestation report (i.e. AttestationReportV2) if the firmware has a build version >= 2337.
Sourcepub fn get_report_ext(
&mut self,
data: Option<[u8; 64]>,
mnonce: Option<[u8; 16]>,
flags: u32,
) -> Result<AttestationReportWrapper, Error>
pub fn get_report_ext( &mut self, data: Option<[u8; 64]>, mnonce: Option<[u8; 16]>, flags: u32, ) -> Result<AttestationReportWrapper, Error>
Requests an extended attestation report (i.e. AttestationReportV2) from the HYGON Secure Processor.
Hygon CSV1,CSV2 only support legacy attestation report. Hygon CSV3 supports legacy attestation report, and supports extended attestation report if the firmware has a build version >= 2337.
If extended attestation report is not supported, then request legacy attestation report.
Sourcepub fn req_rtmr_status(&mut self) -> Result<CsvGuestUserRtmrStatus, Error>
pub fn req_rtmr_status(&mut self) -> Result<CsvGuestUserRtmrStatus, Error>
Request rtmr_status
Sourcepub fn req_rtmr_start(
&mut self,
version: u16,
) -> Result<CsvGuestUserRtmrStart, Error>
pub fn req_rtmr_start( &mut self, version: u16, ) -> Result<CsvGuestUserRtmrStart, Error>
Request rtmr_start
Sourcepub fn req_rtmr_read(
&mut self,
bitmap: u32,
) -> Result<(Box<[u8]>, &mut CsvGuestUserRtmrRead), Error>
pub fn req_rtmr_read( &mut self, bitmap: u32, ) -> Result<(Box<[u8]>, &mut CsvGuestUserRtmrRead), Error>
Request rtmr_read
Sourcepub fn req_rtmr_extend(
&mut self,
index: u8,
data: &[u8],
) -> Result<CsvGuestUserRtmrExtend, Error>
pub fn req_rtmr_extend( &mut self, index: u8, data: &[u8], ) -> Result<CsvGuestUserRtmrExtend, Error>
Request rtmr_extend
Sourcepub fn check_rtmr_supported(&mut self) -> bool
pub fn check_rtmr_supported(&mut self) -> bool
Query if the rtmr is supported. The rtmr_status request will succeed when rtmr is supported.
Sourcepub fn check_attestation_report_v2_supported(&mut self) -> bool
pub fn check_attestation_report_v2_supported(&mut self) -> bool
Query if AttestationReportV2 is supported. It’s supported when rtmr is supported.