MySQL 9.1.0
Source Code Documentation
keyring_manager.cc File Reference
#include "keyring/keyring_manager.h"
#include <random>
#include <stdexcept>
#include <system_error>
#include "dim.h"
#include "keyring/keyring_file.h"
#include "keyring/master_key_file.h"
#include "mysql/harness/filesystem.h"
#include "random_generator.h"

Namespaces

namespace  mysql_harness
 

Functions

static std::pair< std::string, std::string > mysql_harness::get_master_key (MasterKeyFile &mkf, const std::string &keyring_file_path, bool create_if_needed)
 Gets the master_key for the specified keyring_file from the master key store. More...
 
static std::pair< std::string, std::string > mysql_harness::create_initial_keyring_pair (MasterKeyFile &mkf, const std::string &keyring_file_path, std::string master_scramble)
 
HARNESS_EXPORT bool mysql_harness::init_keyring (const std::string &keyring_file_path, const std::string &master_key_path, bool create_if_needed)
 Initialize an instance of a keyring to be used in the application from the contents of a file, using the given master key file. More...
 
HARNESS_EXPORT bool mysql_harness::init_keyring_with_key (const std::string &keyring_file_path, const std::string &master_key, bool create_if_needed)
 Initialize an instance of a keyring to be used in the application from the contents of a file, using the given master key. More...
 
HARNESS_EXPORT void mysql_harness::flush_keyring ()
 Saves the keyring contents to disk. More...
 
HARNESS_EXPORT Keyring * mysql_harness::get_keyring () noexcept
 Gets a previously initialized singleton instance of the keyring. More...
 
HARNESS_EXPORT void mysql_harness::reset_keyring () noexcept
 Clears the keyring singleton. More...
 

Variables

static std::unique_ptr< KeyringFile > mysql_harness::g_keyring
 
static std::string mysql_harness::g_keyring_file_path
 
static std::string mysql_harness::g_keyring_key
 
static const unsigned mysql_harness::kKeyLength = 32