Asylo
Public Member Functions | Static Public Member Functions | List of all members
asylo::NamedIdentityExpectationMatcher Class Referenceabstract

A NamedIdentityExpectationMatcher is capable of matching an identity to an expectation if the identity and the expectation's reference identity have the same identity descriptions, and they match the identity description returned by the Description() method of the matcher. More...

#include <named_identity_expectation_matcher.h>

Inheritance diagram for asylo::NamedIdentityExpectationMatcher:
Inheritance graph
[legend]
Collaboration diagram for asylo::NamedIdentityExpectationMatcher:
Collaboration graph
[legend]

Public Member Functions

 NamedIdentityExpectationMatcher ()=default
 
 NamedIdentityExpectationMatcher (const NamedIdentityExpectationMatcher &other)=delete
 
 NamedIdentityExpectationMatcher (NamedIdentityExpectationMatcher &&other)=delete
 
NamedIdentityExpectationMatcheroperator= (const NamedIdentityExpectationMatcher &other)=delete
 
NamedIdentityExpectationMatcheroperator= (NamedIdentityExpectationMatcher &&other)=delete
 
virtual EnclaveIdentityDescription Description () const =0
 Returns the description of the enclave identities/enclave identity expectations this matcher is able to match. More...
 
- Public Member Functions inherited from asylo::IdentityExpectationMatcher
 IdentityExpectationMatcher ()=default
 
virtual ~IdentityExpectationMatcher ()=default
 
virtual StatusOr< bool > MatchAndExplain (const EnclaveIdentity &identity, const EnclaveIdentityExpectation &expectation, std::string *explanation) const =0
 Evaluates whether identity matches expectation. More...
 
virtual StatusOr< bool > Match (const EnclaveIdentity &identity, const EnclaveIdentityExpectation &expectation) const
 Shim for MatchAndExplain that does not support an explanation output string. More...
 

Static Public Member Functions

static StatusOr< std::string > GetMatcherName (const EnclaveIdentityDescription &description)
 Converts description to a name that can be used as a unique identifier for a NamedIdentityExpectationMatcher that handles identities/expectations of this description. More...
 

Detailed Description

A NamedIdentityExpectationMatcher is capable of matching an identity to an expectation if the identity and the expectation's reference identity have the same identity descriptions, and they match the identity description returned by the Description() method of the matcher.

A NamedIdentityExpectationMatcher is assigned a name based on the identity description it handles. All subclasses of this class must be marked final.

Constructor & Destructor Documentation

◆ NamedIdentityExpectationMatcher() [1/3]

asylo::NamedIdentityExpectationMatcher::NamedIdentityExpectationMatcher ( )
default

◆ NamedIdentityExpectationMatcher() [2/3]

asylo::NamedIdentityExpectationMatcher::NamedIdentityExpectationMatcher ( const NamedIdentityExpectationMatcher other)
delete

◆ NamedIdentityExpectationMatcher() [3/3]

asylo::NamedIdentityExpectationMatcher::NamedIdentityExpectationMatcher ( NamedIdentityExpectationMatcher &&  other)
delete

Member Function Documentation

◆ Description()

virtual EnclaveIdentityDescription asylo::NamedIdentityExpectationMatcher::Description ( ) const
pure virtual

Returns the description of the enclave identities/enclave identity expectations this matcher is able to match.

If the MatchAndExplain() method of this matcher is invoked with an identity or expectation with a different description, the matcher returns a non-OK status.

Returns
A description of the enclave identities/enclave identity expectations this matcher is able to match.

Implemented in asylo::SgxIdentityExpectationMatcher.

◆ GetMatcherName()

static StatusOr<std::string> asylo::NamedIdentityExpectationMatcher::GetMatcherName ( const EnclaveIdentityDescription &  description)
static

Converts description to a name that can be used as a unique identifier for a NamedIdentityExpectationMatcher that handles identities/expectations of this description.

Parameters
descriptionThe description to get a name for.
Returns
A unique identifying string for description.

◆ operator=() [1/2]

NamedIdentityExpectationMatcher& asylo::NamedIdentityExpectationMatcher::operator= ( const NamedIdentityExpectationMatcher other)
delete

◆ operator=() [2/2]

NamedIdentityExpectationMatcher& asylo::NamedIdentityExpectationMatcher::operator= ( NamedIdentityExpectationMatcher &&  other)
delete

The documentation for this class was generated from the following file: