pub struct Signer { /* private fields */ }
Implementations§
source§impl Signer
impl Signer
sourcepub fn new(enclavehash: EnclaveHash) -> Signer
pub fn new(enclavehash: EnclaveHash) -> Signer
Create a new Signer
with default attributes (64-bit, XFRM: 0x3
) and
today’s date.
pub fn unsigned_hash<H: SgxHashOps>(&self) -> Hash
pub fn unsigned_sig(&self) -> Sigstruct
sourcepub fn sign<K: SgxRsaOps, H: SgxHashOps>(
self,
key: &K
) -> Result<Sigstruct, K::Error>
pub fn sign<K: SgxRsaOps, H: SgxHashOps>( self, key: &K ) -> Result<Sigstruct, K::Error>
§Panics
Panics if key is not 3072 bits. Panics if the public exponent of key is not 3.
sourcepub fn cat_sign<K: SgxRsaPubOps + SgxRsaOps>(
&self,
key: &K,
s_vec: Vec<u8>
) -> Result<Sigstruct, <K as SgxRsaPubOps>::Error>
pub fn cat_sign<K: SgxRsaPubOps + SgxRsaOps>( &self, key: &K, s_vec: Vec<u8> ) -> Result<Sigstruct, <K as SgxRsaPubOps>::Error>
Adds a signature from raw bytes. This is used to add a signature generated in an out-of-band process outside of sgxs-tools.
pub fn date(&mut self, year: u16, month: u8, day: u8) -> &mut Self
pub fn swdefined(&mut self, swdefined: u32) -> &mut Self
pub fn isvprodid(&mut self, isvprodid: u16) -> &mut Self
pub fn isvsvn(&mut self, isvsvn: u16) -> &mut Self
pub fn miscselect(&mut self, miscselect: Miscselect, mask: u32) -> &mut Self
pub fn attributes_flags( &mut self, flags: AttributesFlags, mask: u64 ) -> &mut Self
pub fn attributes_xfrm(&mut self, xfrm: u64, mask: u64) -> &mut Self
pub fn enclavehash(&mut self, hash: EnclaveHash) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Signer
impl RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl UnwindSafe for Signer
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