Asylo
Classes | Typedefs | Enumerations | Functions
asylo::primitives Namespace Reference

Classes

class  Client
 A reference to an enclave held by untrusted code. More...
 
class  EntryHandler
 Callback structure for dispatching messages passed to the enclave. More...
 
class  ExitHandler
 Callback structure for dispatching messages from the enclave. More...
 
class  Extent
 A extent object suitable for sharing address ranges between trusted and untrusted code. More...
 
class  PrimitiveStatus
 Shared representation of a status code across the enclave boundary. More...
 
class  TrustedPrimitives
 Trusted runtime primitive interface. More...
 
class  UntrustedDeleter
 Deleter for untrusted memory for use with std::unique_ptr. More...
 

Typedefs

using ExtentAllocator = std::function< primitives::Extent(size_t)>
 The callback signature for a function which performs custom allocation of an Extent. More...
 
template<typename T >
using UntrustedUniquePtr = std::unique_ptr< T, UntrustedDeleter >
 An alias for unique_ptr that frees data with UntrustedDeleter. More...
 

Enumerations

enum  AbslStatusCode : int {
  kOk = 0, kCancelled = 1, kUnknown = 2, kInvalidArgument = 3,
  kDeadlineExceeded = 4, kNotFound = 5, kAlreadyExists = 6, kPermissionDenied = 7,
  kResourceExhausted = 8, kFailedPrecondition = 9, kAborted = 10, kOutOfRange = 11,
  kUnimplemented = 12, kInternal = 13, kUnavailable = 14, kDataLoss = 15,
  kUnauthenticated = 16
}
 This enum of error codes aliases absl::StatusCode. More...
 

Functions

template<typename Backend , typename... Args>
StatusOr< std::shared_ptr< class Client > > LoadEnclave (Args &&... args)
 Loads an enclave. More...
 

Typedef Documentation

◆ ExtentAllocator

using asylo::primitives::ExtentAllocator = typedef std::function<primitives::Extent(size_t)>

The callback signature for a function which performs custom allocation of an Extent.

◆ UntrustedUniquePtr

template<typename T >
using asylo::primitives::UntrustedUniquePtr = typedef std::unique_ptr<T, UntrustedDeleter>

An alias for unique_ptr that frees data with UntrustedDeleter.

Enumeration Type Documentation

◆ AbslStatusCode

This enum of error codes aliases absl::StatusCode.

These aliases are needed because these error codes may be used by low-level runtime components which must compile without C++ runtime support. Abseil does not guarantee that the file defining absl::StatusCode will be supported in such an environment.

Enumerator
kOk 
kCancelled 
kUnknown 
kInvalidArgument 
kDeadlineExceeded 
kNotFound 
kAlreadyExists 
kPermissionDenied 
kResourceExhausted 
kFailedPrecondition 
kAborted 
kOutOfRange 
kUnimplemented 
kInternal 
kUnavailable 
kDataLoss 
kUnauthenticated 

Function Documentation

◆ LoadEnclave()

template<typename Backend , typename... Args>
StatusOr<std::shared_ptr<class Client> > asylo::primitives::LoadEnclave ( Args &&...  args)

Loads an enclave.

This template function should be instantiated with an "Enclave Backend" parameter exported by a concrete implementation of the "Backend" concept.