Struct amq_protocol_tcp::RustlsConnectorConfig
source · pub struct RustlsConnectorConfig(/* private fields */);Expand description
Configuration helper for RustlsConnector
Implementations§
source§impl RustlsConnectorConfig
impl RustlsConnectorConfig
sourcepub fn new_with_native_certs() -> Result<RustlsConnectorConfig, Error>
pub fn new_with_native_certs() -> Result<RustlsConnectorConfig, Error>
Create a new RustlsConnectorConfig using the system certs (requires native-certs feature enabled)
§Errors
Returns an error if we fail to load the native certs.
sourcepub fn add_parsable_certificates(
&mut self,
der_certs: Vec<CertificateDer<'_>>,
) -> (usize, usize)
pub fn add_parsable_certificates( &mut self, der_certs: Vec<CertificateDer<'_>>, ) -> (usize, usize)
Parse the given DER-encoded certificates and add all that can be parsed in a best-effort fashion.
This is because large collections of root certificates often include ancient or syntactically invalid certificates.
Returns the number of certificates added, and the number that were ignored.
sourcepub fn connector_with_no_client_auth(self) -> RustlsConnector
pub fn connector_with_no_client_auth(self) -> RustlsConnector
Create a new RustlsConnector from this config and no client certificate
sourcepub fn connector_with_single_cert(
self,
cert_chain: Vec<CertificateDer<'static>>,
key_der: PrivateKeyDer<'static>,
) -> Result<RustlsConnector, Error>
pub fn connector_with_single_cert( self, cert_chain: Vec<CertificateDer<'static>>, key_der: PrivateKeyDer<'static>, ) -> Result<RustlsConnector, Error>
Create a new RustlsConnector from this config and the given client certificate
cert_chain is a vector of DER-encoded certificates. key_der is a DER-encoded RSA, ECDSA, or Ed25519 private key.
This function fails if key_der is invalid.
Trait Implementations§
source§impl Clone for RustlsConnectorConfig
impl Clone for RustlsConnectorConfig
source§fn clone(&self) -> RustlsConnectorConfig
fn clone(&self) -> RustlsConnectorConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for RustlsConnectorConfig
impl Default for RustlsConnectorConfig
source§fn default() -> RustlsConnectorConfig
fn default() -> RustlsConnectorConfig
Auto Trait Implementations§
impl Freeze for RustlsConnectorConfig
impl RefUnwindSafe for RustlsConnectorConfig
impl Send for RustlsConnectorConfig
impl Sync for RustlsConnectorConfig
impl Unpin for RustlsConnectorConfig
impl UnwindSafe for RustlsConnectorConfig
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)