pub struct DeboaIdentity { /* private fields */ }Expand description
Represents a client certificate and its associated data for mutual TLS authentication.
Identity encapsulates the client certificate, its password.
It’s used to authenticate the client to the server during the
TLS handshake.
§Examples
use deboa::cert::Identity;
// Load a DER encoded PKCS#12 archive from a slice of bytes using a password
let cert = Identity::from_pkcs12(
&[1, 2, 3],
Some("cert-password".to_string()),
);
// Load a DER encoded certificate and key from a slice of bytes
let cert_with_ca = Identity::from_pkcs8(
&[1, 2, 3],
&[4, 5, 6],
ContentEncoding::DER,
);
Trait Implementations§
Source§impl Clone for DeboaIdentity
impl Clone for DeboaIdentity
Source§fn clone(&self) -> DeboaIdentity
fn clone(&self) -> DeboaIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeboaIdentity
impl Debug for DeboaIdentity
Source§impl Identity for DeboaIdentity
impl Identity for DeboaIdentity
Source§impl IdentityExt for DeboaIdentity
impl IdentityExt for DeboaIdentity
Source§fn from_pkcs8(cert: &[u8], key: &[u8], encoding: ContentEncoding) -> Self
fn from_pkcs8(cert: &[u8], key: &[u8], encoding: ContentEncoding) -> Self
Source§async fn from_pkcs8_file(
cert: &str,
key: &str,
encoding: ContentEncoding,
) -> Result<Self>
async fn from_pkcs8_file( cert: &str, key: &str, encoding: ContentEncoding, ) -> Result<Self>
Load DER encoded certificate and key from files Read more
Auto Trait Implementations§
impl Freeze for DeboaIdentity
impl RefUnwindSafe for DeboaIdentity
impl Send for DeboaIdentity
impl Sync for DeboaIdentity
impl Unpin for DeboaIdentity
impl UnsafeUnpin for DeboaIdentity
impl UnwindSafe for DeboaIdentity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more