Struct enclave_runner::EnclaveBuilder
source · pub struct EnclaveBuilder<'a> { /* private fields */ }
Implementations§
source§impl<'a> EnclaveBuilder<'a>
impl<'a> EnclaveBuilder<'a>
pub fn new(enclave_path: &'a Path) -> EnclaveBuilder<'a>
pub fn new_from_memory(enclave_data: &'a [u8]) -> EnclaveBuilder<'a>
pub fn dummy_signature(&mut self) -> &mut Self
sourcepub fn with_dummy_signature_signer<H, S, F, E, T>(&mut self, load_key: F)
pub fn with_dummy_signature_signer<H, S, F, E, T>(&mut self, load_key: F)
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
.
pub fn coresident_signature(&mut self) -> IoResult<&mut Self>
pub fn signature<P: AsRef<Path>>(&mut self, path: P) -> IoResult<&mut Self>
pub fn sigstruct(&mut self, sigstruct: Sigstruct) -> &mut Self
pub fn attributes(&mut self, attributes: Attributes) -> &mut Self
pub fn miscselect(&mut self, miscselect: Miscselect) -> &mut Self
pub fn usercall_extension<T: Into<Box<dyn UsercallExtension>>>( &mut self, extension: T )
sourcepub fn forward_panics(&mut self, fp: bool) -> &mut Self
pub fn forward_panics(&mut self, fp: bool) -> &mut Self
Whether to panic the runner if any enclave thread panics.
Defaults to false
.
Note: If multiple enclaves are loaded, and an enclave with this set to
true panics, then all enclaves handled by this runner will exit because
the runner itself will panic.
sourcepub fn args<I, S>(&mut self, args: I) -> &mut Self
pub fn args<I, S>(&mut self, args: I) -> &mut Self
Adds multiple arguments to pass to enclave’s fn main
.
NOTE: This is not an appropriate channel for passing secrets or
security configurations to the enclave.
NOTE: This is only applicable to Command
enclaves.
Adding command arguments and then calling build_library
will cause
a panic.
sourcepub fn arg<S: AsRef<[u8]>>(&mut self, arg: S) -> &mut Self
pub fn arg<S: AsRef<[u8]>>(&mut self, arg: S) -> &mut Self
Adds an argument to pass to enclave’s fn main
.
NOTE: This is not an appropriate channel for passing secrets or
security configurations to the enclave.
NOTE: This is only applicable to Command
enclaves.
Adding command arguments and then calling build_library
will cause
a panic.