pub struct TpmPolicySessionBuilder { /* private fields */ }Expand description
A builder for creating a TPM policy session.
Implementations§
Source§impl TpmPolicySessionBuilder
impl TpmPolicySessionBuilder
pub fn new() -> Self
pub fn with_bind(self, bind: TpmHandle) -> Self
pub fn with_tpm_key(self, tpm_key: TpmHandle) -> Self
pub fn with_nonce_caller(self, nonce: Tpm2bNonce) -> Self
pub fn with_encrypted_salt(self, salt: Tpm2bEncryptedSecret) -> Self
pub fn with_session_type(self, session_type: TpmSe) -> Self
pub fn with_symmetric(self, symmetric: TpmtSymDefObject) -> Self
pub fn with_auth_hash(self, auth_hash: TpmAlgId) -> Self
Sourcepub fn open(
self,
device: &mut TpmDevice,
) -> Result<TpmPolicySession, TpmDeviceError>
pub fn open( self, device: &mut TpmDevice, ) -> Result<TpmPolicySession, TpmDeviceError>
Opens the policy session on the provided device.
§Errors
Returns ResponseMismatch if
the TPM response is unexpected.
Returns Unmarshal when unmarshal
operation on TPM protocol compliant data fails.
Returns other TpmDeviceError variants depending
on function.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TpmPolicySessionBuilder
impl RefUnwindSafe for TpmPolicySessionBuilder
impl Send for TpmPolicySessionBuilder
impl Sync for TpmPolicySessionBuilder
impl Unpin for TpmPolicySessionBuilder
impl UnwindSafe for TpmPolicySessionBuilder
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