Skip to main content

EnclaveBuilder

Struct EnclaveBuilder 

Source
pub struct EnclaveBuilder<'a, L> { /* private fields */ }

Implementations§

Source§

impl<'a, L> EnclaveBuilder<'a, L>

Source

pub fn new(enclave_path: &'a Path) -> EnclaveBuilder<'a, L>

Source

pub fn new_from_memory(enclave_data: &'a [u8]) -> EnclaveBuilder<'a, L>

Source

pub fn dummy_signature(&mut self) -> &mut Self

Source

pub fn with_dummy_signature_signer<H, S, F, E, T>(&mut self, load_key: F)
where H: SgxHashOps, E: Error + Send + Sync + 'static, S: SgxRsaOps<Error = E>, T: AsRef<S>, F: 'static + FnOnce(&[u8]) -> T,

Use custom implemetations of SgxHashOps and SgxRsaOps for producing dummy signature.

The hasher is specified through type parameter H, and the signer through S. load_key is used to parse an RSA private key in DER format and should return a type T that implements AsRef<S> where S is a type that implements SgxRsaOps. E is the associated Error type of S when implementing SgxRsaOps.

Source

pub fn coresident_signature(&mut self) -> IoResult<&mut Self>

Source

pub fn signature<P: AsRef<Path>>(&mut self, path: P) -> IoResult<&mut Self>

Source

pub fn sigstruct(&mut self, sigstruct: Sigstruct) -> &mut Self

Source

pub fn attributes(&mut self, attributes: Attributes) -> &mut Self

Source

pub fn miscselect(&mut self, miscselect: Miscselect) -> &mut Self

Source

pub fn force_insecure_time_usercalls( &mut self, force_time_usercalls: bool, ) -> &mut Self

SGXv2 platforms allow enclaves to use the rdtsc instruction. This can speed up performance significantly as enclave no longer need to call out to userspace to request the current time. Unfortunately, older enclaves are not compatible with new enclave runners. Also, sometimes the behavior of enclaves always calling out the userspace needs to be simulated. This setting enforces the old behavior.

Trait Implementations§

Source§

impl<'a, L: Load> EnclavePlatform<Command> for EnclaveBuilder<'a, L>

Source§

type Loader = L

Source§

fn build( self, loader: L, configuration: EnclaveConfiguration, cmd_configuration: CommandConfiguration, ) -> Result<Command, Error>

Source§

impl<'a, L: Load> EnclavePlatform<Library> for EnclaveBuilder<'a, L>

Source§

type Loader = L

Source§

fn build( self, loader: L, configuration: EnclaveConfiguration, _: LibraryConfiguration, ) -> Result<Library, Error>

Auto Trait Implementations§

§

impl<'a, L> !RefUnwindSafe for EnclaveBuilder<'a, L>

§

impl<'a, L> !Send for EnclaveBuilder<'a, L>

§

impl<'a, L> !Sync for EnclaveBuilder<'a, L>

§

impl<'a, L> !UnwindSafe for EnclaveBuilder<'a, L>

§

impl<'a, L> Forget for EnclaveBuilder<'a, L>

§

impl<'a, L> Freeze for EnclaveBuilder<'a, L>
where PhantomData<L>: Freeze,

§

impl<'a, L> Unpin for EnclaveBuilder<'a, L>
where PhantomData<L>: Unpin,

§

impl<'a, L> UnsafeUnpin for EnclaveBuilder<'a, L>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.