MySQL 8.0.39
Source Code Documentation
classic_greeting_receiver.cc File Reference
#include "classic_greeting_receiver.h"
#include <cctype>
#include <random>
#include <sstream>
#include <system_error>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include "classic_auth.h"
#include "classic_auth_caching_sha2.h"
#include "classic_auth_cleartext.h"
#include "classic_auth_forwarder.h"
#include "classic_auth_native.h"
#include "classic_auth_sha256_password.h"
#include "classic_connection_base.h"
#include "classic_frame.h"
#include "classic_greeting_forwarder.h"
#include "classic_lazy_connect.h"
#include "harness_assert.h"
#include "mysql/harness/logging/logger.h"
#include "mysql/harness/logging/logging.h"
#include "mysql/harness/net_ts/socket.h"
#include "mysql/harness/stdx/expected.h"
#include "mysql/harness/tls_error.h"
#include "mysqld_error.h"
#include "mysqlrouter/classic_protocol_codec_error.h"
#include "mysqlrouter/classic_protocol_constants.h"
#include "mysqlrouter/connection_base.h"
#include "processor.h"
#include "router_config.h"
#include "sql/server_component/mysql_command_services_imp.h"
#include "tracer.h"

Functions

template<class T >
std::vector< T > vector_splice (std::vector< T > v, const std::vector< T > &other)
 splice two vectors together. More...
 
static void ssl_info_cb (const SSL *ssl, int where, int ret)
 
static bool client_ssl_mode_is_satisfied (SslMode client_ssl_mode, classic_protocol::capabilities::value_type shared_capabilities)
 
static bool client_compress_is_satisfied (classic_protocol::capabilities::value_type client_capabilities, classic_protocol::capabilities::value_type shared_capabilities)
 
static stdx::expected< size_t, std::error_code > send_ssl_connection_error_msg (Channel *dst_channel, ClassicProtocolState *dst_protocol, const std::string &msg)
 
static bool authentication_method_is_supported (const std::string &auth_method_name)
 check if the authentication method is supported. More...
 
static std::optional< std::string > password_from_auth_method_data (std::string auth_data)
 extract the password from auth-method-data. More...
 

Variables

static constexpr const std::array supported_authentication_methods
 
static constexpr const bool kCapturePlaintextPassword {true}
 

Function Documentation

◆ authentication_method_is_supported()

static bool authentication_method_is_supported ( const std::string &  auth_method_name)
static

check if the authentication method is supported.

See also
supported_authentication_methods
Return values
trueauth_method_name is supported
falseauth_method_name is not supported

◆ client_compress_is_satisfied()

static bool client_compress_is_satisfied ( classic_protocol::capabilities::value_type  client_capabilities,
classic_protocol::capabilities::value_type  shared_capabilities 
)
static

◆ client_ssl_mode_is_satisfied()

static bool client_ssl_mode_is_satisfied ( SslMode  client_ssl_mode,
classic_protocol::capabilities::value_type  shared_capabilities 
)
static

◆ password_from_auth_method_data()

static std::optional< std::string > password_from_auth_method_data ( std::string  auth_data)
static

extract the password from auth-method-data.

Returns
the payload without the trailing NUL-char.
Return values
falsein there is no password.

◆ send_ssl_connection_error_msg()

static stdx::expected< size_t, std::error_code > send_ssl_connection_error_msg ( Channel dst_channel,
ClassicProtocolState dst_protocol,
const std::string &  msg 
)
static

◆ ssl_info_cb()

static void ssl_info_cb ( const SSL *  ssl,
int  where,
int  ret 
)
static

◆ vector_splice()

template<class T >
std::vector< T > vector_splice ( std::vector< T >  v,
const std::vector< T > &  other 
)

splice two vectors together.

appends all elements of other to the vector v.

Variable Documentation

◆ kCapturePlaintextPassword

constexpr const bool kCapturePlaintextPassword {true}
staticconstexpr

◆ supported_authentication_methods

constexpr const std::array supported_authentication_methods
staticconstexpr
Initial value:
{
}
static constexpr const std::string_view kName
Definition: classic_auth_caching_sha2.h:43
static constexpr const std::string_view kName
Definition: classic_auth_cleartext.h:38
static constexpr const std::string_view kName
Definition: classic_auth_native.h:35
static constexpr const std::string_view kName
Definition: classic_auth_sha256_password.h:42