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
impl SslContextConfigurator
pub unsafe fn from_raw(ptr: *mut SSLContextConfigurator) -> Self
pub unsafe fn from_raw(ptr: *mut SSLContextConfigurator) -> Self
pub fn as_ptr(&self) -> *const SSLContextConfigurator
pub fn as_ptr(&self) -> *const SSLContextConfigurator
Get raw pointer (for passing to SSLContext)
pub fn reset(&mut self)
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
pub fn get_protocols(&mut self) -> i32
Get SSL protocols mask
Returns combination of Protocol_* constants
pub fn lock(&mut self)
pub fn lock(&mut self)
Lock configurator for exclusive access
Called by SSLContext constructor before configuration
pub fn unlock(&mut self)
pub fn unlock(&mut self)
Unlock configurator
Called by SSLContext constructor after configuration
pub fn is_validate_peer_certificate(&mut self) -> bool
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
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
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
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>
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>
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.