Struct PathInitializer

Source
pub struct PathInitializer;
Expand description

Initialization of the paths for the quoting enclaves and quote provider library

This should only be called once during process start up utilizing PathInitializer::with_paths() or PathInitializer::try_default(). If a consumer of this crate does not explicitly initialize the paths, then they will be defaulted on the first call to an SGX function that needs the paths set.

Implementations§

Source§

impl PathInitializer

Source

pub fn try_default() -> Result<(), Error>

Try to initialize the paths to the default for the system

Currently the defaults assume the default DCAP install on an Ubuntu machine.

§Errors
Source

pub fn with_paths<P1, P2, P3, P4>( quoting_enclave: P1, provisioning_certificate_enclave: P2, quote_provider_library: Option<P3>, id_enclave: P4, ) -> Result<(), Error>
where P1: AsRef<Path>, P2: AsRef<Path>, P3: AsRef<Path>, P4: AsRef<Path>,

Initialize the DCAP quoting library paths with provided values

§Arguments
  • quoting_enclave - The full file path to the quoting enclave
  • provisioning_certificate_enclave - The full file path to the provisioning certificate enclave
  • quote_provider_library - The full file path to the quote provider library. When this is None then no quote provider library will be used limiting quote generation to local quote generation only.
  • id_enclave - The full file path to the ID enclave.
§Errors

Trait Implementations§

Source§

impl Debug for PathInitializer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.