pub struct ClientIdentity { /* private fields */ }Expand description
A validated client certificate chain and its matching PKCS#8 private key.
Implementations§
Source§impl ClientIdentity
impl ClientIdentity
Sourcepub fn from_pem(
certificates: impl AsRef<[u8]>,
private_key: impl AsRef<[u8]>,
) -> Result<Self, NetError>
pub fn from_pem( certificates: impl AsRef<[u8]>, private_key: impl AsRef<[u8]>, ) -> Result<Self, NetError>
Loads a PEM certificate chain and exactly one unencrypted PKCS#8 key. Each input is limited to 1 MiB and the chain to 128 certificates.
Sourcepub fn certificate_count(&self) -> usize
pub fn certificate_count(&self) -> usize
Returns the number of certificates in the validated client chain. Returns the number of certificates in the validated chain.
Trait Implementations§
Source§impl Clone for ClientIdentity
impl Clone for ClientIdentity
Auto Trait Implementations§
impl !RefUnwindSafe for ClientIdentity
impl !UnwindSafe for ClientIdentity
impl Freeze for ClientIdentity
impl Send for ClientIdentity
impl Sync for ClientIdentity
impl Unpin for ClientIdentity
impl UnsafeUnpin for ClientIdentity
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