pub struct Identity(/* private fields */);Expand description
An encoded dev enclave identity (dev version + dev measurement), as patched into a compiled binary. Possibly still the unpatched placeholder.
Implementations§
Source§impl Identity
impl Identity
Sourcepub const PLACEHOLDER: Identity
pub const PLACEHOLDER: Identity
Bytes which sgx-builder replaces after compiling a dev enclave.
Sourcepub const SECTION_ELF: &'static str = ".lexe_dev_id"
pub const SECTION_ELF: &'static str = ".lexe_dev_id"
ELF section which lets sgx-builder locate the patch slot.
Sourcepub const SECTION_MACHO: &'static str = "__lexe_dev_id"
pub const SECTION_MACHO: &'static str = "__lexe_dev_id"
Mach-O equivalent of Identity::SECTION_ELF, for non-SGX dev builds
on macOS. Lives in the __DATA segment.
Sourcepub fn encode(version: &str, measurement: Measurement) -> Self
pub fn encode(version: &str, measurement: Measurement) -> Self
Encodes a dev enclave identity which sgx-builder writes over
Identity::PLACEHOLDER in a copied binary.
Panics if version is empty or too long to fit in the patch slot.
pub fn as_bytes(&self) -> &[u8; 64]
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnsafeUnpin for Identity
impl UnwindSafe for Identity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more