Asylo
Classes | Public Member Functions | List of all members
asylo::SgxLocalAssertionGenerator Class Referencefinal

An implementation of the EnclaveAssertionGenerator interface for SGX local assertions. More...

#include <sgx_local_assertion_generator.h>

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

Public Member Functions

 SgxLocalAssertionGenerator ()
 Constructs an uninitialized SgxLocalAssertionGenerator. More...
 
Status Initialize (const std::string &config) override
 Initializes this assertion authority using the provided config. More...
 
bool IsInitialized () const override
 Indicates whether this assertion authority has been initialized successfully via a call to Initialize(). More...
 
EnclaveIdentityType IdentityType () const override
 Gets the enclave identity type handled by this assertion authority. More...
 
std::string AuthorityType () const override
 Gets the type of this assertion authority. More...
 
Status CreateAssertionOffer (AssertionOffer *offer) const override
 Creates an assertion offer compatible with this generator's identity type and authority type and places the result in offer. More...
 
StatusOr< bool > CanGenerate (const AssertionRequest &request) const override
 Indicates whether the assertion requested in request can be generated by this generator. More...
 
Status Generate (const std::string &user_data, const AssertionRequest &request, Assertion *assertion) const override
 Generates an assertion that satisfies the given request, if request is compatible with this generator's identity type and authority type. More...
 
- Public Member Functions inherited from asylo::EnclaveAssertionAuthority
virtual ~EnclaveAssertionAuthority ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from asylo::EnclaveAssertionAuthority
static StatusOr< std::string > GenerateAuthorityId (const EnclaveIdentityType &identity_type, const std::string &authority_type)
 Gets a unique identifier for an EnclaveAssertionAuthority with the given identity_type and authority_type. More...
 
- Protected Member Functions inherited from asylo::EnclaveAssertionAuthority
bool IsCompatibleAssertionDescription (const AssertionDescription &description) const
 Indicates whether description describes an assertion that is compatible with this authority. More...
 

Detailed Description

An implementation of the EnclaveAssertionGenerator interface for SGX local assertions.

An SgxLocalAssertionGenerator is capable of generating assertion offers and assertions for SGX code identities that can be verified by SGX enclaves running within the same local attestation domain.

Constructor & Destructor Documentation

◆ SgxLocalAssertionGenerator()

asylo::SgxLocalAssertionGenerator::SgxLocalAssertionGenerator ( )

Constructs an uninitialized SgxLocalAssertionGenerator.

The generator can be initialized via a call to Initialize().

Member Function Documentation

◆ AuthorityType()

std::string asylo::SgxLocalAssertionGenerator::AuthorityType ( ) const
overridevirtual

Gets the type of this assertion authority.

Returns
The type of this authority.

Implements asylo::EnclaveAssertionAuthority.

◆ CanGenerate()

StatusOr<bool> asylo::SgxLocalAssertionGenerator::CanGenerate ( const AssertionRequest &  request) const
overridevirtual

Indicates whether the assertion requested in request can be generated by this generator.

Parameters
requestA request to be fulfilled.
Returns
True if the assertion specified in request can be generated, and false if no errors occur during the operation but request cannot be fulfilled. Returns a non-OK Status if this generator is not yet initialized or if an internal error occurs while attempting the operation.

Implements asylo::EnclaveAssertionGenerator.

◆ CreateAssertionOffer()

Status asylo::SgxLocalAssertionGenerator::CreateAssertionOffer ( AssertionOffer *  offer) const
overridevirtual

Creates an assertion offer compatible with this generator's identity type and authority type and places the result in offer.

Parameters
[out]offerThe generated offer.
Returns
A Status indicating whether the offer was created. Returns a non-OK Status if this generator is not initialized or if an internal error occurs while attempting the operation.

Implements asylo::EnclaveAssertionGenerator.

◆ Generate()

Status asylo::SgxLocalAssertionGenerator::Generate ( const std::string &  user_data,
const AssertionRequest &  request,
Assertion *  assertion 
) const
overridevirtual

Generates an assertion that satisfies the given request, if request is compatible with this generator's identity type and authority type.

The caller cannot make any assumptions about the contents of assertion if generation fails.

Parameters
user_dataUser-provided binding data.
requestA request to fulfill.
[out]assertionThe generated assertion.
Returns
A Status indicating whether an assertion was generated successfully. Returns a non-OK Status if the generator is not initialized or if an internal error occurs while attempting the operation.

Implements asylo::EnclaveAssertionGenerator.

◆ IdentityType()

EnclaveIdentityType asylo::SgxLocalAssertionGenerator::IdentityType ( ) const
overridevirtual

Gets the enclave identity type handled by this assertion authority.

Returns
The identity type handled by this authority.

Implements asylo::EnclaveAssertionAuthority.

◆ Initialize()

Status asylo::SgxLocalAssertionGenerator::Initialize ( const std::string &  config)
overridevirtual

Initializes this assertion authority using the provided config.

Parameters
configA config with which to initialize this authority.
Returns
A Status indicating whether initialization succeeded.

Implements asylo::EnclaveAssertionAuthority.

◆ IsInitialized()

bool asylo::SgxLocalAssertionGenerator::IsInitialized ( ) const
overridevirtual

Indicates whether this assertion authority has been initialized successfully via a call to Initialize().

Returns
True if this authority is initialized.

Implements asylo::EnclaveAssertionAuthority.


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