pub struct ClientIdentity { /* private fields */ }Expand description
Parsed certificate material, validated cryptographically by the selected provider.
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.
This parses the PEM material without selecting cryptography. Key loading
and certificate/key matching happen during NetworkConfig::validate
and client construction, using the client’s final provider.
Sourcepub fn certificate_count(&self) -> usize
pub fn certificate_count(&self) -> usize
Returns the number of certificates in the parsed client chain.
Trait Implementations§
Source§impl Clone for ClientIdentity
impl Clone for ClientIdentity
Auto Trait Implementations§
impl Forget for ClientIdentity
impl Freeze for ClientIdentity
impl Move for ClientIdentity
impl RefUnwindSafe for ClientIdentity
impl Send for ClientIdentity
impl Sync for ClientIdentity
impl Unpin for ClientIdentity
impl UnsafeUnpin for ClientIdentity
impl UnwindSafe 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