pub struct StoredPrivateKey {
pub name: String,
pub pkcs8_der: Zeroizing<Vec<u8>>,
pub usages: KeyUsages,
pub certificate_chain: Vec<Vec<u8>>,
/* private fields */
}Expand description
Private key encoded as provider-neutral PKCS#8 DER.
Fields§
§name: StringOpaque caller-assigned name.
pkcs8_der: Zeroizing<Vec<u8>>Private key bytes; zeroized on drop.
usages: KeyUsagesAllowed operations.
certificate_chain: Vec<Vec<u8>>Associated certificates, leaf first when a matching leaf exists.
Implementations§
Source§impl StoredPrivateKey
impl StoredPrivateKey
Sourcepub fn decapsulation_key(
&self,
provider: &dyn CryptoProvider,
algorithm: KeyEncapsulationAlgorithm,
policy: &KeyEstablishmentPolicy,
resources: &ResourcePolicy,
) -> Result<Arc<dyn KeyDecapsulationKey>, KeyStoreError>
pub fn decapsulation_key( &self, provider: &dyn CryptoProvider, algorithm: KeyEncapsulationAlgorithm, policy: &KeyEstablishmentPolicy, resources: &ResourcePolicy, ) -> Result<Arc<dyn KeyDecapsulationKey>, KeyStoreError>
Import an explicitly selected recipient into the operation’s crypto engine.
Sourcepub fn matching_certificate_chain(&self) -> Option<&[Vec<u8>]>
pub fn matching_certificate_chain(&self) -> Option<&[Vec<u8>]>
Return the chain only when its first certificate matches this private key.
Auto Trait Implementations§
impl Freeze for StoredPrivateKey
impl RefUnwindSafe for StoredPrivateKey
impl Send for StoredPrivateKey
impl Sync for StoredPrivateKey
impl Unpin for StoredPrivateKey
impl UnsafeUnpin for StoredPrivateKey
impl UnwindSafe for StoredPrivateKey
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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