pub trait AttestationHandler<AccountId> {
// Required methods
fn verify_quote(
attestee: &AccountId,
x25519_public_key: X25519PublicKey,
quote: Vec<u8>,
context: QuoteContext,
) -> Result<BoundedVecEncodedVerifyingKey, VerifyQuoteError>;
fn request_quote(attestee: &AccountId, nonce: [u8; 32]);
}
Expand description
A trait for types which can handle attestation requests.
Required Methods§
Sourcefn verify_quote(
attestee: &AccountId,
x25519_public_key: X25519PublicKey,
quote: Vec<u8>,
context: QuoteContext,
) -> Result<BoundedVecEncodedVerifyingKey, VerifyQuoteError>
fn verify_quote( attestee: &AccountId, x25519_public_key: X25519PublicKey, quote: Vec<u8>, context: QuoteContext, ) -> Result<BoundedVecEncodedVerifyingKey, VerifyQuoteError>
Verify that the given quote is valid and matches the given information about the attestee. The Provisioning Certification Key (PCK) certifcate chain is extracted from the quote and verified. If successful, the PCK public key used to sign the quote is returned.
Sourcefn request_quote(attestee: &AccountId, nonce: [u8; 32])
fn request_quote(attestee: &AccountId, nonce: [u8; 32])
Indicate to the attestation handler that a quote is desired.
The nonce
should be a piece of data (e.g a random number) which indicates that the quote
is reasonably fresh and has not been reused.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<AccountId> AttestationHandler<AccountId> for ()
A convenience implementation for testing and benchmarking.
impl<AccountId> AttestationHandler<AccountId> for ()
A convenience implementation for testing and benchmarking.