Struct paho_mqtt::ssl_options::SslOptionsBuilder
source · [−]pub struct SslOptionsBuilder { /* private fields */ }
Expand description
Builder to create SSL Options.
Implementations
sourceimpl SslOptionsBuilder
impl SslOptionsBuilder
sourcepub fn trust_store<P>(&mut self, trust_store: P) -> Result<&mut Self> where
P: AsRef<Path>,
pub fn trust_store<P>(&mut self, trust_store: P) -> Result<&mut Self> where
P: AsRef<Path>,
Set the name of the file in PEM format containing the public digital certificates trusted by the client.
sourcepub fn key_store<P>(&mut self, key_store: P) -> Result<&mut Self> where
P: AsRef<Path>,
pub fn key_store<P>(&mut self, key_store: P) -> Result<&mut Self> where
P: AsRef<Path>,
Set the name of the file in PEM format containing the public certificate chain of the client.
It may also include the client’s private key.
sourcepub fn private_key<P>(&mut self, private_key: P) -> Result<&mut Self> where
P: AsRef<Path>,
pub fn private_key<P>(&mut self, private_key: P) -> Result<&mut Self> where
P: AsRef<Path>,
If not included in the Key Store, this setting points to the file in PEM format containing the client’s private key.
sourcepub fn private_key_password<S>(&mut self, private_key_password: S) -> &mut Self where
S: Into<String>,
pub fn private_key_password<S>(&mut self, private_key_password: S) -> &mut Self where
S: Into<String>,
The password to load the client’s privateKey if it’s encrypted.
sourcepub fn enabled_cipher_suites<S>(
&mut self,
enabled_cipher_suites: S
) -> &mut Self where
S: Into<String>,
pub fn enabled_cipher_suites<S>(
&mut self,
enabled_cipher_suites: S
) -> &mut Self where
S: Into<String>,
The list of cipher suites that the client will present to the server during the SSL handshake.
For a full explanation of the cipher list format, please see the OpenSSL on-line documentation: http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT
If this setting is ommitted, its default value will be “ALL”, that is, all the cipher suites -excluding those offering no encryption- will be considered.
sourcepub fn enable_server_cert_auth(&mut self, on: bool) -> &mut Self
pub fn enable_server_cert_auth(&mut self, on: bool) -> &mut Self
Enable or disable verification of the server certificate
sourcepub fn ssl_version(&mut self, ver: SslVersion) -> &mut Self
pub fn ssl_version(&mut self, ver: SslVersion) -> &mut Self
The SSL/TLS version to use.
sourcepub fn verify(&mut self, on: bool) -> &mut Self
pub fn verify(&mut self, on: bool) -> &mut Self
Whether to carry out post-connect checks, including that a certificate matches the given host name.
sourcepub fn ca_path<P>(&mut self, ca_path: P) -> Result<&mut Self> where
P: AsRef<Path>,
pub fn ca_path<P>(&mut self, ca_path: P) -> Result<&mut Self> where
P: AsRef<Path>,
If set, this points to a directory containing CA certificates in PEM format.
sourcepub fn disable_default_trust_store(&mut self, disable: bool) -> &mut Self
pub fn disable_default_trust_store(&mut self, disable: bool) -> &mut Self
Don’t load the default SSL CA.
This should be used together with PSK to make sure regular servers with certificate in place is not accepted.
sourcepub fn alpn_protos(&mut self, protos: &[&str]) -> &mut Self
pub fn alpn_protos(&mut self, protos: &[&str]) -> &mut Self
If set, only these protocols are used during negotiation.
sourcepub fn finalize(&self) -> SslOptions
pub fn finalize(&self) -> SslOptions
Create the SSL options from the builder.
Trait Implementations
sourceimpl Default for SslOptionsBuilder
impl Default for SslOptionsBuilder
sourcefn default() -> SslOptionsBuilder
fn default() -> SslOptionsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for SslOptionsBuilder
impl !Send for SslOptionsBuilder
impl !Sync for SslOptionsBuilder
impl Unpin for SslOptionsBuilder
impl UnwindSafe for SslOptionsBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more