MySQL 8.0.40
Source Code Documentation
qa_auth_server.cc File Reference
#include <mysql/client_plugin.h>
#include <mysql/plugin_auth.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "my_compiler.h"

Macros

#define ORDINARY_QUESTION   "\2"
 first byte of the question string is the question "type". More...
 
#define LAST_QUESTION   "\3"
 
#define LAST_PASSWORD   "\4"
 
#define PASSWORD_QUESTION   "\5"
 

Functions

static int qa_auth_interface (MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
 
static int generate_auth_string_hash (char *outbuf, unsigned int *buflen, const char *inbuf, unsigned int inbuflen)
 
static int validate_auth_string_hash (char *const inbuf, unsigned int buflen)
 
static int set_salt (const char *password, unsigned int password_len, unsigned char *salt, unsigned char *salt_len)
 
 mysql_declare_plugin (test_plugin)
 

Variables

static struct st_mysql_auth qa_auth_test_handler
 
 mysql_declare_plugin_end
 

Macro Definition Documentation

◆ LAST_PASSWORD

#define LAST_PASSWORD   "\4"

◆ LAST_QUESTION

#define LAST_QUESTION   "\3"

◆ ORDINARY_QUESTION

#define ORDINARY_QUESTION   "\2"

first byte of the question string is the question "type".

It can be a "ordinary" or a "password" question. The last bit set marks a last question in the authentication exchange.

◆ PASSWORD_QUESTION

#define PASSWORD_QUESTION   "\5"

Function Documentation

◆ generate_auth_string_hash()

static int generate_auth_string_hash ( char *  outbuf,
unsigned int *  buflen,
const char *  inbuf,
unsigned int  inbuflen 
)
static

◆ mysql_declare_plugin()

mysql_declare_plugin ( test_plugin  )

◆ qa_auth_interface()

static int qa_auth_interface ( MYSQL_PLUGIN_VIO vio,
MYSQL_SERVER_AUTH_INFO info 
)
static

◆ set_salt()

static int set_salt ( const char *  password,
unsigned int  password_len,
unsigned char *  salt,
unsigned char *  salt_len 
)
static

◆ validate_auth_string_hash()

static int validate_auth_string_hash ( char *const  inbuf,
unsigned int  buflen 
)
static

Variable Documentation

◆ mysql_declare_plugin_end

mysql_declare_plugin_end

◆ qa_auth_test_handler

struct st_mysql_auth qa_auth_test_handler
static
Initial value:
= {
"qa_auth_interface",
nullptr}
#define AUTH_FLAG_PRIVILEGED_USER_FOR_PASSWORD_CHANGE
Definition: plugin_auth.h:49
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION
Definition: plugin_auth.h:37
static int validate_auth_string_hash(char *const inbuf, unsigned int buflen)
Definition: qa_auth_server.cc:81
static int qa_auth_interface(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
Definition: qa_auth_server.cc:44
static int set_salt(const char *password, unsigned int password_len, unsigned char *salt, unsigned char *salt_len)
Definition: qa_auth_server.cc:86
static int generate_auth_string_hash(char *outbuf, unsigned int *buflen, const char *inbuf, unsigned int inbuflen)
Definition: qa_auth_server.cc:69