pub struct Context { /* private fields */ }
Expand description
Wrapper around tss_esapi::Context.
Implementations
sourceimpl Context
impl Context
sourcepub fn create_ek(
&mut self,
alg: EncryptionAlgorithm,
handle: Option<&str>
) -> Result<EKResult, TpmError>
pub fn create_ek(
&mut self,
alg: EncryptionAlgorithm,
handle: Option<&str>
) -> Result<EKResult, TpmError>
Creates an EK, returns the key handle and public cert in EKResult
.
sourcepub fn create_ak(
&mut self,
handle: KeyHandle,
hash_alg: HashAlgorithm,
sign_alg: SignAlgorithm
) -> Result<AKResult, TpmError>
pub fn create_ak(
&mut self,
handle: KeyHandle,
hash_alg: HashAlgorithm,
sign_alg: SignAlgorithm
) -> Result<AKResult, TpmError>
Creates an AK.
sourcepub fn load_ak(
&mut self,
handle: KeyHandle,
ak: &AKResult
) -> Result<KeyHandle, TpmError>
pub fn load_ak(
&mut self,
handle: KeyHandle,
ak: &AKResult
) -> Result<KeyHandle, TpmError>
Loads an existing AK associated with handle
and ak
.
sourcepub fn activate_credential(
&mut self,
keyblob: Vec<u8>,
ak: KeyHandle,
ek: KeyHandle
) -> Result<Digest, TpmError>
pub fn activate_credential(
&mut self,
keyblob: Vec<u8>,
ak: KeyHandle,
ek: KeyHandle
) -> Result<Digest, TpmError>
Activates credentials with given secret keyblob
, AK, and EK.
sourcepub fn quote(
&mut self,
nonce: &[u8],
mask: Option<u32>,
pubkey: &PKeyRef<Public>,
ak_handle: KeyHandle,
hash_alg: HashAlgorithm,
sign_alg: SignAlgorithm
) -> Result<String, TpmError>
pub fn quote(
&mut self,
nonce: &[u8],
mask: Option<u32>,
pubkey: &PKeyRef<Public>,
ak_handle: KeyHandle,
hash_alg: HashAlgorithm,
sign_alg: SignAlgorithm
) -> Result<String, TpmError>
Calculates a TPM quote of nonce
over PCRs indicated with mask
.
mask
is a u32
value, e.g., 0x408000, translating bits that
are set to pcrs to include in the list. The LSB in the mask
corresponds to PCR0.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more