MySQL 8.0.40
Source Code Documentation
|
#include "my_config.h"
#include <mysql_version.h>
#include <stdint.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <algorithm>
#include <array>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include "client/client_priv.h"
#include "client/logger.h"
#include "client/path.h"
#include "my_alloc.h"
#include "my_compiler.h"
#include "my_dbug.h"
#include "my_default.h"
#include "my_dir.h"
#include "my_getopt.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "my_macros.h"
#include "my_sys.h"
#include "mysql/service_mysql_alloc.h"
#include "print_version.h"
#include "welcome_copyright_notice.h"
#include <pwd.h>
#include <openssl/ssl.h>
Classes | |
class | RSA_priv |
class | RSA_pub |
class | X509_key |
class | X509v3_ext_writer |
class | X509_cert |
Macros | |
#define | MAX_PATH_LEN (FN_REFLEN - strlen(FN_DIRSEP) - cert_files[SERVER_CERT].length() - 1) |
#define | MAX_SUFFIX_LEN 17 |
Typedefs | |
typedef string | Sql_string_t |
Enumerations | |
enum | certs { CA_CERT = 0 , CA_KEY , CA_REQ , SERVER_CERT , SERVER_KEY , SERVER_REQ , CLIENT_CERT , CLIENT_KEY , CLIENT_REQ , PRIVATE_KEY , PUBLIC_KEY , OPENSSL_RND } |
enum | extfiles { CAV3_EXT = 0 , CERTV3_EXT } |
Functions | |
static Sql_string_t | create_string (const char *ptr) |
The string class will break if constructed with a NULL pointer. More... | |
int | security_level (void) |
static int | execute_command (const Sql_string_t &command, const Sql_string_t &error_message) |
static int | set_file_pair_permission (const Sql_string_t &priv, const Sql_string_t &pub) |
static bool | file_exists (const Sql_string_t &filename) |
static int | remove_file (const Sql_string_t &filename, bool report_error=true) |
static void | free_resources () |
static void | usage (void) |
static bool | my_arguments_get_one_option (int optid, const struct my_option *, char *) |
static bool | is_not_alnum_underscore (char c) |
static bool | check_suffix () |
int | main (int argc, char *argv[]) |
Variables | |
constexpr const std::array | rsa_key_sizes {2048, 2048, 2048, 3072, 7680, 15360} |
Sql_string_t | cert_files [] |
Sql_string_t | ext_files [] |
Log | info (cout, "NOTE") |
Log | error (cerr, "ERROR") |
char ** | defaults_argv = nullptr |
static char * | opt_datadir = nullptr |
static char | default_data_dir [] = MYSQL_DATADIR |
static char * | opt_suffix = nullptr |
static char | default_suffix [] = MYSQL_SERVER_VERSION |
static char * | opt_userid = nullptr |
struct passwd * | user_info = nullptr |
Path | dir_string |
Sql_string_t | suffix_string |
bool | opt_verbose |
static const char * | load_default_groups [] |
static struct my_option | my_options [] |
#define MAX_PATH_LEN (FN_REFLEN - strlen(FN_DIRSEP) - cert_files[SERVER_CERT].length() - 1) |
#define MAX_SUFFIX_LEN 17 |
typedef string Sql_string_t |
enum certs |
enum extfiles |
|
static |
|
static |
The string class will break if constructed with a NULL pointer.
This wrapper provides a systematic protection when importing char pointers.
|
static |
|
static |
|
static |
|
inlinestatic |
int main | ( | int | argc, |
char * | argv[] | ||
) |
|
static |
|
static |
int security_level | ( | void | ) |
|
static |
|
static |
Sql_string_t cert_files[] |
|
static |
|
static |
char** defaults_argv = nullptr |
Path dir_string |
Log error(cerr, "ERROR") | ( | cerr | , |
"ERROR" | |||
) |
Sql_string_t ext_files[] |
Log info(cout, "NOTE") | ( | cout | , |
"NOTE" | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
bool opt_verbose |
|
constexpr |
Sql_string_t suffix_string |
struct passwd* user_info = nullptr |