pub trait EndorsementPolicyEvaluator {
// Required method
fn verify_atom<C: Context>(
ctx: &C,
policy: &AllowedEndorsement,
ect: &EndorsedCapabilityTEE,
endorsing_node_id: PublicKey,
endorsing_node: &Option<Node>,
metadata: &BTreeMap<String, String>,
) -> Result<(), Error>;
// Provided methods
fn verify<C: Context>(
ctx: &C,
policy: &[Box<AllowedEndorsement>],
ect: &EndorsedCapabilityTEE,
metadata: &BTreeMap<String, String>,
) -> Result<Option<Node>, Error> { ... }
fn verify_atoms<C: Context>(
ctx: &C,
op: EndorsementPolicyOperator,
policy: &[Box<AllowedEndorsement>],
ect: &EndorsedCapabilityTEE,
endorsing_node_id: PublicKey,
endorsing_node: &Option<Node>,
metadata: &BTreeMap<String, String>,
max_depth: usize,
) -> Result<(), Error> { ... }
}Expand description
An evaluator of an endorsement policy which decides whether the node that endorsed the given enclave is acceptable accoording to a policy.
Required Methods§
Sourcefn verify_atom<C: Context>(
ctx: &C,
policy: &AllowedEndorsement,
ect: &EndorsedCapabilityTEE,
endorsing_node_id: PublicKey,
endorsing_node: &Option<Node>,
metadata: &BTreeMap<String, String>,
) -> Result<(), Error>
fn verify_atom<C: Context>( ctx: &C, policy: &AllowedEndorsement, ect: &EndorsedCapabilityTEE, endorsing_node_id: PublicKey, endorsing_node: &Option<Node>, metadata: &BTreeMap<String, String>, ) -> Result<(), Error>
Verify a single endorsement policy atom.
Provided Methods§
Sourcefn verify<C: Context>(
ctx: &C,
policy: &[Box<AllowedEndorsement>],
ect: &EndorsedCapabilityTEE,
metadata: &BTreeMap<String, String>,
) -> Result<Option<Node>, Error>
fn verify<C: Context>( ctx: &C, policy: &[Box<AllowedEndorsement>], ect: &EndorsedCapabilityTEE, metadata: &BTreeMap<String, String>, ) -> Result<Option<Node>, Error>
Verify the given endorsed TEE capability against an endorsement policy.
Sourcefn verify_atoms<C: Context>(
ctx: &C,
op: EndorsementPolicyOperator,
policy: &[Box<AllowedEndorsement>],
ect: &EndorsedCapabilityTEE,
endorsing_node_id: PublicKey,
endorsing_node: &Option<Node>,
metadata: &BTreeMap<String, String>,
max_depth: usize,
) -> Result<(), Error>
fn verify_atoms<C: Context>( ctx: &C, op: EndorsementPolicyOperator, policy: &[Box<AllowedEndorsement>], ect: &EndorsedCapabilityTEE, endorsing_node_id: PublicKey, endorsing_node: &Option<Node>, metadata: &BTreeMap<String, String>, max_depth: usize, ) -> Result<(), Error>
Verify multiple endorsement policy atoms.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".