Struct Ssl

Source
pub struct Ssl(/* private fields */);
Expand description

Describes the SSL configuration of a cluster.

Implementations§

Source§

impl Ssl

Source

pub fn add_trusted_cert(&mut self, cert: impl AsRef<str>) -> Result<&mut Self>

Adds a trusted certificate. This is used to verify the peer’s certificate.

Source

pub fn set_verify_flags(&mut self, flags: &[SslVerifyFlag])

Sets verification performed on the peer’s certificate.

CASS_SSL_VERIFY_NONE - No verification is performed

CASS_SSL_VERIFY_PEER_CERT - Certificate is present and valid

CASS_SSL_VERIFY_PEER_IDENTITY - IP address matches the certificate’s common name or one of its subject alternative names. This implies the certificate is also present.

Default: CASS_SSL_VERIFY_PEER_CERT

Source

pub fn set_cert(&mut self, cert: &str) -> Result<&mut Self>

Set client-side certificate chain. This is used to authenticate the client on the server-side. This should contain the entire Certificate chain starting with the certificate itself.

Source

pub fn set_private_key( &mut self, key: &str, password: &str, ) -> Result<&mut Self>

Set client-side private key. This is used to authenticate the client on the server-side.

Trait Implementations§

Source§

impl Debug for Ssl

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Ssl

Source§

fn default() -> Ssl

Creates a new SSL context.

Source§

impl Drop for Ssl

Source§

fn drop(&mut self)

Frees a SSL context instance.

Source§

impl Send for Ssl

Source§

impl Sync for Ssl

Auto Trait Implementations§

§

impl Freeze for Ssl

§

impl RefUnwindSafe for Ssl

§

impl Unpin for Ssl

§

impl UnwindSafe for Ssl

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,