pub struct QuotePolicyConfig {
pub allowed_statuses: Vec<TcbStatus>,
pub rejected_advisory_ids: Vec<String>,
pub platform_grace_period_secs: u64,
pub qe_grace_period_secs: u64,
pub min_tcb_eval_data_number: u32,
pub allow_dynamic_platform: bool,
pub allow_cached_keys: bool,
pub allow_smt: bool,
pub accepted_sgx_types: Option<Vec<u8>>,
}Expand description
JSON-serializable configuration for QuotePolicy.
All fields default to the strict values (zero / empty / false). Pass as JSON from FFI (Go, Python) to configure verification policy.
Unknown fields are rejected so that a stale or misspelled option in a security policy fails loudly instead of being silently ignored.
{
"allowed_statuses": ["UpToDate", "SWHardeningNeeded"],
"rejected_advisory_ids": ["INTEL-SA-00334"],
"platform_grace_period_secs": 2592000,
"allow_smt": true
}Fields§
§allowed_statuses: Vec<TcbStatus>§rejected_advisory_ids: Vec<String>§platform_grace_period_secs: u64§qe_grace_period_secs: u64§min_tcb_eval_data_number: u32§allow_dynamic_platform: bool§allow_cached_keys: bool§allow_smt: bool§accepted_sgx_types: Option<Vec<u8>>Implementations§
Source§impl QuotePolicyConfig
impl QuotePolicyConfig
Sourcepub fn into_policy(self, now_secs: u64) -> QuotePolicy
pub fn into_policy(self, now_secs: u64) -> QuotePolicy
Build a QuotePolicy from this config + current timestamp.
Default config (all fields zero/empty) produces QuotePolicy::strict(now).
Trait Implementations§
Source§impl Clone for QuotePolicyConfig
impl Clone for QuotePolicyConfig
Source§fn clone(&self) -> QuotePolicyConfig
fn clone(&self) -> QuotePolicyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QuotePolicyConfig
impl Debug for QuotePolicyConfig
Source§impl Default for QuotePolicyConfig
impl Default for QuotePolicyConfig
Source§fn default() -> QuotePolicyConfig
fn default() -> QuotePolicyConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for QuotePolicyConfig
impl<'de> Deserialize<'de> for QuotePolicyConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QuotePolicyConfig
impl RefUnwindSafe for QuotePolicyConfig
impl Send for QuotePolicyConfig
impl Sync for QuotePolicyConfig
impl Unpin for QuotePolicyConfig
impl UnsafeUnpin for QuotePolicyConfig
impl UnwindSafe for QuotePolicyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more