MySQL 8.4.0
Source Code Documentation
Xcom_network_provider_ssl_library Class Reference

#include <xcom_network_provider_native_lib.h>

Static Public Member Functions

static int xcom_init_ssl (const char *server_key_file, const char *server_cert_file, const char *client_key_file, const char *client_cert_file, const char *ca_file, const char *ca_path, const char *crl_file, const char *crl_path, const char *cipher, const char *tls_version, const char *tls_ciphersuites)
 
static void xcom_cleanup_ssl ()
 
static void xcom_destroy_ssl ()
 
static int ssl_verify_server_cert (SSL *ssl, const char *server_hostname)
 
static std::pair< SSL *, int > timed_connect_ssl_msec (int fd, SSL_CTX *client_ctx, const std::string &hostname, int timeout)
 Establishes an SSL connection to a node that already has a connection in place. More...
 

Member Function Documentation

◆ ssl_verify_server_cert()

int Xcom_network_provider_ssl_library::ssl_verify_server_cert ( SSL *  ssl,
const char *  server_hostname 
)
static

◆ timed_connect_ssl_msec()

std::pair< SSL *, int > Xcom_network_provider_ssl_library::timed_connect_ssl_msec ( int  fd,
SSL_CTX *  client_ctx,
const std::string &  hostname,
int  timeout 
)
static

Establishes an SSL connection to a node that already has a connection in place.

It is asynchronous in nature, since it unblocks the socket, establishes the connection and wait for the result via a poll mechanism no more than timeout miliseconds.

It returns a pair that contains the established SSL connection and an error code (0 in case of success.)

Parameters
fdan established connection file descriptor.
client_ctxthe client context to use.
hostnamehostname to validate
timeouttimeout value in miliseconds.
Returns
std::pair<SSL *, int> a pair containing:
  • An established SSL connection, or nullptr
  • 0 in case of success. An error code, otherwise.

◆ xcom_cleanup_ssl()

void Xcom_network_provider_ssl_library::xcom_cleanup_ssl ( )
static

◆ xcom_destroy_ssl()

void Xcom_network_provider_ssl_library::xcom_destroy_ssl ( )
static

◆ xcom_init_ssl()

int Xcom_network_provider_ssl_library::xcom_init_ssl ( const char *  server_key_file,
const char *  server_cert_file,
const char *  client_key_file,
const char *  client_cert_file,
const char *  ca_file,
const char *  ca_path,
const char *  crl_file,
const char *  crl_path,
const char *  cipher,
const char *  tls_version,
const char *  tls_ciphersuites 
)
static

The documentation for this class was generated from the following files: