Struct schannel::cert_store::Memory
source · pub struct Memory(/* private fields */);
Expand description
Representation of an in-memory certificate store.
Internally this contains a CertStore
which this type can be converted to.
Implementations§
source§impl Memory
impl Memory
sourcepub fn new() -> Result<Memory>
pub fn new() -> Result<Memory>
Creates a new in-memory certificate store which certificates and CTLs can be added to.
Initially the returned certificate store contains no certificates.
sourcepub fn add_encoded_certificate(&mut self, cert: &[u8]) -> Result<CertContext>
pub fn add_encoded_certificate(&mut self, cert: &[u8]) -> Result<CertContext>
Adds a new certificate to this memory store.
For example the bytes could be a DER-encoded certificate.
sourcepub fn add_encoded_ctl(&mut self, ctl: &[u8]) -> Result<CtlContext>
pub fn add_encoded_ctl(&mut self, ctl: &[u8]) -> Result<CtlContext>
Adds a new CTL to this memory store, in its encoded form.
This can be created through the ctl_context::Builder
type.
sourcepub fn into_store(self) -> CertStore
pub fn into_store(self) -> CertStore
Consumes this memory store, returning the underlying CertStore
.
Auto Trait Implementations§
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
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