[−][src]Struct graphene_sgx::AttestationVerifier
Attestation verifier enables easy checking of various attestation evidence properties.
Example
use chrono::Duration; use graphene_sgx::sgx::SgxQuote; use graphene_sgx::AttestationResponse; let quote = SgxQuote::hasher() .data(&[0u8; 42]) .data(&[1u8; 10]) .build() .unwrap(); let evidence = AttestationResponse::default(); // this should be obtained from IAS let verifier = evidence.verifier(); let result = verifier.max_age(Duration::minutes(1)) .data(&[0u8; 42]) .data(&[1u8; 10]) .mr_enclave(quote.body.report_body.mr_enclave) .isv_prod_id(42) .not_debug() .check();
Implementations
impl AttestationVerifier
[src]
pub fn data(self, data: &[u8]) -> Self
[src]
Add custom data to hash. All bytes added using this method are hashed with SHA512
and compared with enclave quote's report_data
field.
pub fn nonce(self, nonce: &str) -> Self
[src]
Check IAS report's nonce.
pub fn mr_enclave(self, mr: SgxMeasurement) -> Self
[src]
Check enclave's hash (must match the supplied value).
pub fn mr_enclave_list(self, mrs: &[SgxMeasurement]) -> Self
[src]
Check enclave's hash (must match any of the supplied values).
pub fn mr_signer(self, mr: SgxMeasurement) -> Self
[src]
Check enclave's hash of signing key (must match the supplied value).
pub fn mr_signer_list(self, mrs: &[SgxMeasurement]) -> Self
[src]
Check enclave's hash of signing key (must match any of the supplied values).
pub fn isv_prod_id(self, id: u16) -> Self
[src]
Check enclave's ISV product ID.
pub fn isv_svn(self, svn: u16) -> Self
[src]
Check enclave's security version number.
pub fn not_outdated(self) -> Self
[src]
Check that enclave's IAS status is not GROUP_OUT_OF_DATE
(platform missing security
updates).
pub fn not_debug(self) -> Self
[src]
Check that enclave is not in debug mode.
pub fn max_age(self, age: Duration) -> Self
[src]
Check maximum age of the IAS report (using report's timestamp).
pub fn check(self) -> AttestationResult
[src]
Finalize all checks and convert the verifier into attestation result.
Auto Trait Implementations
impl RefUnwindSafe for AttestationVerifier
impl Send for AttestationVerifier
impl Sync for AttestationVerifier
impl Unpin for AttestationVerifier
impl UnwindSafe for AttestationVerifier
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,