Struct clevis::TangClient
source · pub struct TangClient { /* private fields */ }Expand description
A tang server connection specification.
This does not hold an active connection, only connection parameters.
Implementations§
source§impl TangClient
impl TangClient
sourcepub fn new(url: &str, timeout: Option<Duration>) -> Self
pub fn new(url: &str, timeout: Option<Duration>) -> Self
Create a new client. If timeout is not specified, it will default to 120s.
sourcepub fn create_secure_key<const KEYBYTES: usize>(
&self
) -> Result<ProvisionedData<KEYBYTES>>
pub fn create_secure_key<const KEYBYTES: usize>( &self ) -> Result<ProvisionedData<KEYBYTES>>
Locate derive keys from the server and provision an encryption key with specified lengh.
sourcepub fn create_secure_key_trusted_key<const KEYBYTES: usize>(
&self,
thumbprint: &str
) -> Result<ProvisionedData<KEYBYTES>>
pub fn create_secure_key_trusted_key<const KEYBYTES: usize>( &self, thumbprint: &str ) -> Result<ProvisionedData<KEYBYTES>>
A version of Self::create_secure_key that accepts a thumbprint.
sourcepub fn recover_secure_key<const KEYBYTES: usize>(
&self,
meta: &KeyMeta
) -> Result<EncryptionKey<KEYBYTES>>
pub fn recover_secure_key<const KEYBYTES: usize>( &self, meta: &KeyMeta ) -> Result<EncryptionKey<KEYBYTES>>
Recover a secure key using metadata that was stored.
Trait Implementations§
source§impl Clone for TangClient
impl Clone for TangClient
source§fn clone(&self) -> TangClient
fn clone(&self) -> TangClient
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for TangClient
impl Send for TangClient
impl Sync for TangClient
impl Unpin for TangClient
impl UnwindSafe for TangClient
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