MySQL 8.3.0
Source Code Documentation
AuthCachingSha2Password Class Reference

#include <classic_auth_caching_sha2.h>

Inheritance diagram for AuthCachingSha2Password:
[legend]

Static Public Member Functions

static std::optional< std::string > scramble (std::string_view nonce, std::string_view pwd)
 
static stdx::expected< size_t, std::error_code > send_public_key_request (Channel *dst_channel, ClassicProtocolState *dst_protocol)
 
static stdx::expected< size_t, std::error_code > send_public_key (Channel *dst_channel, ClassicProtocolState *dst_protocol, const std::string &public_key)
 
static stdx::expected< size_t, std::error_code > send_plaintext_password_request (Channel *dst_channel, ClassicProtocolState *dst_protocol)
 
static stdx::expected< size_t, std::error_code > send_plaintext_password (Channel *dst_channel, ClassicProtocolState *dst_protocol, const std::string &password)
 
static stdx::expected< size_t, std::error_code > send_encrypted_password (Channel *dst_channel, ClassicProtocolState *dst_protocol, const std::string &password)
 
static bool is_public_key_request (const std::string_view &data)
 
static bool is_public_key (const std::string_view &data)
 
- Static Public Member Functions inherited from AuthBase
static stdx::expected< std::string, std::error_code > public_key_from_ssl_ctx_as_pem (SSL_CTX *ssl_ctx)
 
static stdx::expected< EvpPkey, std::error_code > public_key_from_pem (std::string_view pubkey)
 
static stdx::expected< std::string, std::error_code > public_key_encrypt (std::string plaintext, EVP_PKEY *pkey)
 
static stdx::expected< std::string, std::error_code > private_key_decrypt (std::string_view ciphertext, EVP_PKEY *priv)
 
static stdx::expected< std::string, std::error_code > rsa_decrypt_password (SSL_CTX *ssl_ctx, std::string_view encrypted, std::string_view nonce)
 
static stdx::expected< std::string, std::error_code > rsa_encrypt_password (const EvpPkey &pkey, std::string_view password, std::string_view nonce)
 
static std::string_view strip_trailing_null (std::string_view s)
 remove trailing \0 in a string_view. More...
 
static bool connection_has_public_key (MysqlRoutingClassicConnectionBase *connection)
 

Static Public Attributes

static constexpr const size_t kNonceLength {20}
 
static constexpr const std::string_view kName {"caching_sha2_password"}
 
static constexpr const std::string_view kPublicKeyRequest {"\x02"}
 
static constexpr const uint8_t kFastAuthDone {0x03}
 
static constexpr const uint8_t kPerformFullAuth {0x04}
 

Member Function Documentation

◆ is_public_key()

bool AuthCachingSha2Password::is_public_key ( const std::string_view &  data)
static

◆ is_public_key_request()

bool AuthCachingSha2Password::is_public_key_request ( const std::string_view &  data)
static

◆ scramble()

std::optional< std::string > AuthCachingSha2Password::scramble ( std::string_view  nonce,
std::string_view  pwd 
)
static

◆ send_encrypted_password()

stdx::expected< size_t, std::error_code > AuthCachingSha2Password::send_encrypted_password ( Channel dst_channel,
ClassicProtocolState dst_protocol,
const std::string &  password 
)
static

◆ send_plaintext_password()

stdx::expected< size_t, std::error_code > AuthCachingSha2Password::send_plaintext_password ( Channel dst_channel,
ClassicProtocolState dst_protocol,
const std::string &  password 
)
static

◆ send_plaintext_password_request()

stdx::expected< size_t, std::error_code > AuthCachingSha2Password::send_plaintext_password_request ( Channel dst_channel,
ClassicProtocolState dst_protocol 
)
static

◆ send_public_key()

stdx::expected< size_t, std::error_code > AuthCachingSha2Password::send_public_key ( Channel dst_channel,
ClassicProtocolState dst_protocol,
const std::string &  public_key 
)
static

◆ send_public_key_request()

stdx::expected< size_t, std::error_code > AuthCachingSha2Password::send_public_key_request ( Channel dst_channel,
ClassicProtocolState dst_protocol 
)
static

Member Data Documentation

◆ kFastAuthDone

constexpr const uint8_t AuthCachingSha2Password::kFastAuthDone {0x03}
staticconstexpr

◆ kName

constexpr const std::string_view AuthCachingSha2Password::kName {"caching_sha2_password"}
staticconstexpr

◆ kNonceLength

constexpr const size_t AuthCachingSha2Password::kNonceLength {20}
staticconstexpr

◆ kPerformFullAuth

constexpr const uint8_t AuthCachingSha2Password::kPerformFullAuth {0x04}
staticconstexpr

◆ kPublicKeyRequest

constexpr const std::string_view AuthCachingSha2Password::kPublicKeyRequest {"\x02"}
staticconstexpr

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