pub enum IdentitySource {
Pkcs12File(String),
PemFiles {
certificates: String,
private_key: String,
},
Store {
location: StoreLocation,
store: String,
select: StoreSelector,
},
}Expand description
Where an identity is loaded from.
Variants§
Pkcs12File(String)
PKCS#12 file with an empty password.
PemFiles
PEM certificate chain and unencrypted PKCS#8 private-key files.
Fields
Store
Windows system certificate store, e.g. cert:LocalMachine\MY\<thumbprint>.
Implementations§
Source§impl IdentitySource
impl IdentitySource
Sourcepub fn load(&self) -> Result<Identity, Error>
pub fn load(&self) -> Result<Identity, Error>
Loads the identity.
§Errors
Error::NotFound if the file cannot be read, otherwise see Identity::from_pkcs12
or Identity::from_pem. Store loading is Windows-only.
Trait Implementations§
Source§impl Clone for IdentitySource
impl Clone for IdentitySource
Source§fn clone(&self) -> IdentitySource
fn clone(&self) -> IdentitySource
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 IdentitySource
impl Debug for IdentitySource
impl Eq for IdentitySource
Source§impl FromStr for IdentitySource
impl FromStr for IdentitySource
Source§fn from_str(s: &str) -> Result<IdentitySource, Error>
fn from_str(s: &str) -> Result<IdentitySource, Error>
Parses a configuration value.
cert:<CurrentUser|LocalMachine>\<store>\<40 hex thumbprint>cert:<CurrentUser|LocalMachine>\<store>\subject=<subject>- anything else is a PKCS#12 file path.
/ may be used instead of \; cert: and the location are case-insensitive.
§Errors
Error::Unsupported for store sources on non-Windows targets,
Error::InvalidIdentity for malformed store sources.
Source§impl PartialEq for IdentitySource
impl PartialEq for IdentitySource
impl StructuralPartialEq for IdentitySource
Auto Trait Implementations§
impl Freeze for IdentitySource
impl RefUnwindSafe for IdentitySource
impl Send for IdentitySource
impl Sync for IdentitySource
impl Unpin for IdentitySource
impl UnsafeUnpin for IdentitySource
impl UnwindSafe for IdentitySource
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.