pub struct ClientIdentity {
pub certificate: Vec<u8>,
pub private_key: Vec<u8>,
pub authorities: Vec<Vec<u8>>,
}Expand description
A client’s identity read from its enrollment file: what it presents, and the CA it trusts.
Fields§
§certificate: Vec<u8>Its certificate (DER).
private_key: Vec<u8>Its private key (PKCS #8, DER).
The certificate authority of the server(s) that enrolled it (DER).
Implementations§
Source§impl ClientIdentity
impl ClientIdentity
Sourcepub fn from_file(path: &Path) -> StreamResult<Self>
pub fn from_file(path: &Path) -> StreamResult<Self>
Reads an enrollment file: its first certificate is the client’s, the others the CA’s.
pub fn from_pem(bytes: &[u8]) -> StreamResult<Self>
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
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