Struct oasis_core_runtime::policy::PolicyVerifier
source · pub struct PolicyVerifier { /* private fields */ }
Expand description
Consensus policy verifier.
Implementations§
source§impl PolicyVerifier
impl PolicyVerifier
sourcepub fn new(consensus_verifier: Arc<dyn Verifier>) -> Self
pub fn new(consensus_verifier: Arc<dyn Verifier>) -> Self
Create a new consensus policy verifier.
sourcepub fn quote_policy(
&self,
runtime_id: &Namespace,
version: Option<Version>,
) -> Result<QuotePolicy>
pub fn quote_policy( &self, runtime_id: &Namespace, version: Option<Version>, ) -> Result<QuotePolicy>
Fetch runtime’s quote policy from the latest verified consensus layer state.
If the runtime version is not provided, the policy for the active deployment is returned.
sourcepub fn verify_quote_policy(
&self,
policy: QuotePolicy,
runtime_id: &Namespace,
version: Option<Version>,
) -> Result<QuotePolicy>
pub fn verify_quote_policy( &self, policy: QuotePolicy, runtime_id: &Namespace, version: Option<Version>, ) -> Result<QuotePolicy>
Verify that runtime’s quote policy has been published in the consensus layer.
sourcepub fn key_manager_status(&self, key_manager: Namespace) -> Result<Status>
pub fn key_manager_status(&self, key_manager: Namespace) -> Result<Status>
Fetch key manager’s status from the latest verified consensus layer state.
sourcepub fn verify_key_manager_status(
&self,
status: Status,
key_manager: Namespace,
) -> Result<Status>
pub fn verify_key_manager_status( &self, status: Status, key_manager: Namespace, ) -> Result<Status>
Verify that key manager’s status has been published in the consensus layer.
sourcepub fn key_manager_policy(
&self,
key_manager: Namespace,
) -> Result<SignedPolicySGX>
pub fn key_manager_policy( &self, key_manager: Namespace, ) -> Result<SignedPolicySGX>
Fetch key manager’s policy from the latest verified consensus layer state.
sourcepub fn verify_key_manager_policy(
&self,
policy: SignedPolicySGX,
key_manager: Namespace,
) -> Result<SignedPolicySGX>
pub fn verify_key_manager_policy( &self, policy: SignedPolicySGX, key_manager: Namespace, ) -> Result<SignedPolicySGX>
Verify that key manager’s policy has been published in the consensus layer.
sourcepub fn key_manager(&self, runtime_id: &Namespace) -> Result<Namespace>
pub fn key_manager(&self, runtime_id: &Namespace) -> Result<Namespace>
Fetch runtime’s key manager.
Auto Trait Implementations§
impl Freeze for PolicyVerifier
impl !RefUnwindSafe for PolicyVerifier
impl Send for PolicyVerifier
impl Sync for PolicyVerifier
impl Unpin for PolicyVerifier
impl !UnwindSafe for PolicyVerifier
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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