SslContextConfigurator

Struct SslContextConfigurator 

pub struct SslContextConfigurator { /* private fields */ }
Expand description

Rust wrapper for System::SSLContextConfigurator

This wraps a C++ SSLContextConfigurator instance that configures SSL contexts. The configurator is typically created by C++ code and passed to Rust for use with SSLContext.

Implementations§

§

impl SslContextConfigurator

pub unsafe fn from_raw(ptr: *mut SSLContextConfigurator) -> Self

Create from raw C++ pointer

§Safety

Caller must ensure the pointer is valid and lives long enough

pub fn as_ptr(&self) -> *const SSLContextConfigurator

Get raw pointer (for passing to SSLContext)

pub fn reset(&mut self)

Reset configurator state

Called before configuration to reset internal state from previous rounds

pub fn get_protocols(&mut self) -> i32

Get SSL protocols mask

Returns combination of Protocol_* constants

pub fn lock(&mut self)

Lock configurator for exclusive access

Called by SSLContext constructor before configuration

pub fn unlock(&mut self)

Unlock configurator

Called by SSLContext constructor after configuration

pub fn is_validate_peer_certificate(&mut self) -> bool

Returns true if peer certificate validation is required

pub fn get_ciphers_list(&mut self) -> String

Get OpenSSL ciphers configuration string

Returns empty string if using OpenSSL defaults. See: https://www.openssl.org/docs/man1.0.2/apps/ciphers.html

pub fn password_callback( &mut self, index: i32, array_index: i32, max_password_size: i32, ) -> String

Password callback for encrypted private keys and certificates

§Parameters
  • index - Certificate/key pair tracking index (-1 for CA from getClientCAsList)
  • array_index - Password index (-1 for private key, 0+ for certificates in chain)
  • max_password_size - Maximum password length (truncated beyond this)

Returns the password for the encrypted key/certificate.

pub fn get_verify_locations(&mut self) -> CACertificateLocations

Get CA certificate verification locations

Returns locations where CA certificates for SSL validation can be found.

pub fn get_next_certificate_private_key_pair( &mut self, ) -> Option<CertificatePrivateKeyPair>

Get next certificate/private key pair

Called iteratively to retrieve all certificate/key pairs configured. Returns None when no more pairs are available.

pub fn get_client_ca_list(&mut self) -> Option<ClientCAList>

Get client CA list

Server-side only: Retrieves list of acceptable CAs to send to client. Returns None if the acceptable CA certificates list should not be updated.

Trait Implementations§

Auto Trait Implementations§

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.