pub struct CertContext(/* private fields */);
Expand description
CertContext wraps CERT_CONTEXT structure for high-level certificate operations
Implementations§
Source§impl CertContext
impl CertContext
Sourcepub fn new_owned(context: *const CERT_CONTEXT) -> Self
pub fn new_owned(context: *const CERT_CONTEXT) -> Self
Construct CertContext as an owned object which automatically frees the inner handle
Sourcepub fn new_borrowed(context: *const CERT_CONTEXT) -> Self
pub fn new_borrowed(context: *const CERT_CONTEXT) -> Self
Construct CertContext as a borrowed object which does not free the inner handle
Sourcepub fn acquire_key(&self, silent: bool) -> Result<NCryptKey>
pub fn acquire_key(&self, silent: bool) -> Result<NCryptKey>
Attempt to acquire a CNG private key from this context.
The silent
parameter indicates whether to suppress the user prompts.
Trait Implementations§
Source§impl Clone for CertContext
impl Clone for CertContext
Source§fn clone(&self) -> CertContext
fn clone(&self) -> CertContext
Returns a duplicate 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 Freeze for CertContext
impl RefUnwindSafe for CertContext
impl Send for CertContext
impl Sync for CertContext
impl Unpin for CertContext
impl UnwindSafe for CertContext
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