MySQL 8.3.0
Source Code Documentation
tls_context.cc File Reference
#include "mysql/harness/tls_context.h"
#include <array>
#include <shared_mutex>
#include <string>
#include <vector>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include "my_thread.h"
#include "mysql/harness/stdx/expected.h"
#include "mysql/harness/tls_error.h"
#include "mysql/harness/tls_types.h"
#include "openssl_version.h"
#include <openssl/core_names.h>
#include <openssl/decoder.h>

Classes

struct  CRYPTO_dynlock_value
 

Typedefs

using shared_lock_t = std::shared_mutex
 
typedef struct CRYPTO_dynlock_value openssl_lock_t
 

Functions

static void openssl_lock (int mode, openssl_lock_t *lock, const char *file, int line)
 
static void openssl_lock_function (int mode, int n, const char *file, int line)
 
static openssl_lock_topenssl_dynlock_create (const char *file, int line)
 
static void openssl_dynlock_destroy (openssl_lock_t *lock, const char *file, int line)
 
static unsigned long openssl_id_function ()
 
static void init_ssl_locks ()
 
static void deinit_ssl_locks ()
 
static void set_lock_callback_functions (bool init)
 
static void init_lock_callback_functions ()
 
static void deinit_lock_callback_functions ()
 
static int o11x_version (TlsVersion version)
 
static stdx::expected< int, std::error_code > get_rsa_key_size (X509 *x509)
 get the key size of an RSA key. More...
 

Variables

constexpr int kMinRsaKeySize {2048}
 
static openssl_lock_topenssl_stdlocks
 

Typedef Documentation

◆ openssl_lock_t

◆ shared_lock_t

using shared_lock_t = std::shared_mutex

Function Documentation

◆ deinit_lock_callback_functions()

static void deinit_lock_callback_functions ( )
static

◆ deinit_ssl_locks()

static void deinit_ssl_locks ( )
static

◆ get_rsa_key_size()

static stdx::expected< int, std::error_code > get_rsa_key_size ( X509 *  x509)
static

get the key size of an RSA key.

Parameters
x509a non-null pointer to RSA-key wrapped in a X509 struct.
Returns
a key-size of RSA key on success, a std::error_code on failure.

◆ init_lock_callback_functions()

static void init_lock_callback_functions ( )
static

◆ init_ssl_locks()

static void init_ssl_locks ( )
static

◆ o11x_version()

static int o11x_version ( TlsVersion  version)
static

◆ openssl_dynlock_create()

static openssl_lock_t * openssl_dynlock_create ( const char *  file,
int  line 
)
static

◆ openssl_dynlock_destroy()

static void openssl_dynlock_destroy ( openssl_lock_t lock,
const char *  file,
int  line 
)
static

◆ openssl_id_function()

static unsigned long openssl_id_function ( )
static

◆ openssl_lock()

static void openssl_lock ( int  mode,
openssl_lock_t lock,
const char *  file,
int  line 
)
static

◆ openssl_lock_function()

static void openssl_lock_function ( int  mode,
int  n,
const char *  file,
int  line 
)
static

◆ set_lock_callback_functions()

static void set_lock_callback_functions ( bool  init)
static

Variable Documentation

◆ kMinRsaKeySize

constexpr int kMinRsaKeySize {2048}
constexpr

◆ openssl_stdlocks

openssl_lock_t* openssl_stdlocks
static