CUBRID Engine
latest
|
#include <stdlib.h>
#include <assert.h>
#include <openssl/conf.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/sha.h>
#include <openssl/rand.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "heap_file.h"
#include "btree.h"
#include "system_parameter.h"
#include "boot_sr.h"
#include "file_io.h"
#include "error_manager.h"
#include "error_code.h"
#include "log_storage.hpp"
#include "log_volids.hpp"
#include "tde.h"
Go to the source code of this file.
Macros | |
#define | off_signals(new_mask, old_mask) |
#define | restore_signals(old_mask) sigprocmask(SIG_SETMASK, &(old_mask), NULL) |
Functions | |
static int | tde_generate_keyinfo (TDE_KEYINFO *keyinfo, int mk_index, const unsigned char *master_key, const time_t created_time, const TDE_DATA_KEY_SET *dks) |
static int | tde_update_keyinfo (THREAD_ENTRY *thread_p, const TDE_KEYINFO *keyinfo) |
static int | tde_create_keys_file (const char *keyfile_fullname) |
static bool | tde_validate_mk (const unsigned char *master_key, const unsigned char *mk_hash) |
static void | tde_make_mk_hash (const unsigned char *master_key, unsigned char *mk_hash) |
static int | tde_load_dks (const unsigned char *master_key, const TDE_KEYINFO *keyinfo) |
static int | tde_create_dk (unsigned char *data_key) |
static int | tde_encrypt_dk (const unsigned char *dk_plain, TDE_DATA_KEY_TYPE dk_type, const unsigned char *master_key, unsigned char *dk_cipher) |
static int | tde_decrypt_dk (const unsigned char *dk_cipher, TDE_DATA_KEY_TYPE dk_type, const unsigned char *master_key, unsigned char *dk_plain) |
static void | tde_dk_nonce (TDE_DATA_KEY_TYPE dk_type, unsigned char *dk_nonce) |
static int | tde_encrypt_internal (const unsigned char *plain_buffer, int length, TDE_ALGORITHM tde_algo, const unsigned char *key, const unsigned char *nonce, unsigned char *cipher_buffer) |
static int | tde_decrypt_internal (const unsigned char *cipher_buffer, int length, TDE_ALGORITHM tde_algo, const unsigned char *key, const unsigned char *nonce, unsigned char *plain_buffer) |
int | tde_initialize (THREAD_ENTRY *thread_p, HFID *keyinfo_hfid) |
int | tde_cipher_initialize (THREAD_ENTRY *thread_p, const HFID *keyinfo_hfid, const char *mk_path_given) |
bool | tde_validate_keys_file (int vdes) |
int | tde_copy_keys_file (THREAD_ENTRY *thread_p, const char *dest_fullname, const char *src_fullname, bool keep_dest_mount, bool keep_src_mount) |
void | tde_make_keys_file_fullname (char *keys_vol_fullname, const char *db_full_name, bool ignore_parm) |
int | tde_get_keyinfo (THREAD_ENTRY *thread_p, TDE_KEYINFO *keyinfo) |
int | tde_change_mk (THREAD_ENTRY *thread_p, const int mk_index, const unsigned char *master_key, const time_t created_time) |
int | tde_load_mk (int vdes, const TDE_KEYINFO *keyinfo, unsigned char *master_key) |
int | tde_encrypt_data_page (const FILEIO_PAGE *iopage_plain, TDE_ALGORITHM tde_algo, bool is_temp, FILEIO_PAGE *iopage_cipher) |
int | tde_decrypt_data_page (const FILEIO_PAGE *iopage_cipher, TDE_ALGORITHM tde_algo, bool is_temp, FILEIO_PAGE *iopage_plain) |
int | tde_encrypt_log_page (const LOG_PAGE *logpage_plain, TDE_ALGORITHM tde_algo, LOG_PAGE *logpage_cipher) |
int | tde_decrypt_log_page (const LOG_PAGE *logpage_cipher, TDE_ALGORITHM tde_algo, LOG_PAGE *logpage_plain) |
int | xtde_get_mk_info (THREAD_ENTRY *thread_p, int *mk_index, time_t *created_time, time_t *set_time) |
int | xtde_change_mk_without_flock (THREAD_ENTRY *thread_p, const int mk_index) |
int | tde_create_mk (unsigned char *master_key, time_t *created_time) |
void | tde_print_mk (const unsigned char *master_key) |
int | tde_add_mk (int vdes, const unsigned char *master_key, time_t created_time, int *mk_index) |
int | tde_find_mk (int vdes, int mk_index, unsigned char *master_key, time_t *created_time) |
int | tde_find_first_mk (int vdes, int *mk_index, unsigned char *master_key, time_t *created_time) |
int | tde_delete_mk (int vdes, int mk_index) |
int | tde_dump_mks (int vdes, bool print_value) |
const char * | tde_get_algorithm_name (TDE_ALGORITHM tde_algo) |
Variables | |
TDE_CIPHER | tde_Cipher |
static OID | tde_Keyinfo_oid = OID_INITIALIZER |
static HFID | tde_Keyinfo_hfid = HFID_INITIALIZER |
#define off_signals | ( | new_mask, | |
old_mask | |||
) |
Definition at line 56 of file tde.c.
Referenced by tde_add_mk(), tde_create_keys_file(), tde_delete_mk(), tde_dump_mks(), tde_find_first_mk(), tde_find_mk(), and tde_validate_keys_file().
#define restore_signals | ( | old_mask | ) | sigprocmask(SIG_SETMASK, &(old_mask), NULL) |
Definition at line 66 of file tde.c.
Referenced by tde_add_mk(), tde_create_keys_file(), tde_delete_mk(), tde_dump_mks(), tde_find_first_mk(), tde_find_mk(), and tde_validate_keys_file().
int tde_add_mk | ( | int | vdes, |
const unsigned char * | master_key, | ||
time_t | created_time, | ||
int * | mk_index | ||
) |
Definition at line 1351 of file tde.c.
References ARG_FILE_LINE, tde_mk_file_item::created_time, ER_ERROR_SEVERITY, ER_FAILED, ER_IO_READ, er_set(), er_set_with_oserror(), ER_TDE_INVALID_KEYS_FILE, ER_TDE_MAX_KEY_FILE, err, fileio_get_volume_label_by_fd(), tde_mk_file_item::master_key, NO_ERROR, off_signals, PEEK, restore_signals, TDE_MASTER_KEY_LENGTH, TDE_MK_FILE_CONTENTS_START, TDE_MK_FILE_ITEM_COUNT_MAX, TDE_MK_FILE_ITEM_INDEX, and TDE_MK_FILE_ITEM_SIZE.
Referenced by tde(), and tde_initialize().
int tde_change_mk | ( | THREAD_ENTRY * | thread_p, |
const int | mk_index, | ||
const unsigned char * | master_key, | ||
const time_t | created_time | ||
) |
Definition at line 649 of file tde.c.
References ARG_FILE_LINE, tde_cipher::data_keys, ER_ERROR_SEVERITY, er_set(), ER_TDE_CIPHER_IS_NOT_LOADED, err, heap_flush(), tde_cipher::is_loaded, NO_ERROR, tde_generate_keyinfo(), and tde_update_keyinfo().
Referenced by boot_reset_mk_after_restart_from_backup(), and xtde_change_mk_without_flock().
int tde_cipher_initialize | ( | THREAD_ENTRY * | thread_p, |
const HFID * | keyinfo_hfid, | ||
const char * | mk_path_given | ||
) |
Definition at line 232 of file tde.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, boot_db_full_name(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_TDE_INVALID_KEYS_FILE, err, fileio_dismount(), fileio_mount(), HFID_COPY, tde_cipher::is_loaded, LOG_DBTDE_KEYS_VOLID, tde_keyinfo::mk_index, NO_ERROR, NULL, NULL_VOLDES, tde_get_keyinfo(), tde_load_dks(), tde_load_mk(), tde_make_keys_file_fullname(), TDE_MASTER_KEY_LENGTH, tde_validate_keys_file(), and tde_cipher::temp_write_counter.
Referenced by boot_remove_all_volumes(), and boot_restart_server().
int tde_copy_keys_file | ( | THREAD_ENTRY * | thread_p, |
const char * | dest_fullname, | ||
const char * | src_fullname, | ||
bool | keep_dest_mount, | ||
bool | keep_src_mount | ||
) |
Definition at line 398 of file tde.c.
References ARG_FILE_LINE, ASSERT_ERROR, ASSERT_ERROR_AND_SET, boot_db_full_name(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_IO_WRITE, er_set(), er_set_with_oserror(), ER_TDE_INVALID_KEYS_FILE, err, fileio_dismount(), fileio_is_volume_exist(), fileio_mount(), fileio_unformat_and_rename(), LOG_DBCOPY_VOLID, LOG_DBTDE_KEYS_VOLID, NO_ERROR, NULL, NULL_VOLDES, tde_create_keys_file(), and tde_validate_keys_file().
Referenced by boot_reset_mk_after_restart_from_backup(), logpb_backup(), and logpb_copy_database().
|
static |
Definition at line 802 of file tde.c.
References ARG_FILE_LINE, assert, ER_ERROR_SEVERITY, er_set(), ER_TDE_KEY_CREATION_FAIL, NO_ERROR, NULL, and TDE_DATA_KEY_LENGTH.
Referenced by tde_initialize().
|
static |
Definition at line 309 of file tde.c.
References ARG_FILE_LINE, boot_db_full_name(), CUBRID_MAGIC_KEYS, CUBRID_MAGIC_MAX_LENGTH, ER_BO_CANNOT_CREATE_VOL, ER_BO_VOLUME_EXISTS, ER_ERROR_SEVERITY, er_get_msglog_filename(), er_set(), err, fileio_close(), fileio_is_volume_exist(), fileio_open(), NO_ERROR, NULL_VOLDES, off_signals, and restore_signals.
Referenced by tde_copy_keys_file(), and tde_initialize().
int tde_create_mk | ( | unsigned char * | master_key, |
time_t * | created_time | ||
) |
Definition at line 1311 of file tde.c.
References ARG_FILE_LINE, assert, ER_ERROR_SEVERITY, er_set(), ER_TDE_KEY_CREATION_FAIL, NO_ERROR, NULL, and TDE_MASTER_KEY_LENGTH.
Referenced by tde(), and tde_initialize().
int tde_decrypt_data_page | ( | const FILEIO_PAGE * | iopage_cipher, |
TDE_ALGORITHM | tde_algo, | ||
bool | is_temp, | ||
FILEIO_PAGE * | iopage_plain | ||
) |
Definition at line 949 of file tde.c.
References ARG_FILE_LINE, tde_cipher::data_keys, ER_ERROR_SEVERITY, er_set(), ER_TDE_CIPHER_IS_NOT_LOADED, err, tde_cipher::is_loaded, NO_ERROR, tde_data_key_set::perm_key, fileio_page::prv, TDE_DATA_PAGE_ENC_LENGTH, TDE_DATA_PAGE_ENC_OFFSET, TDE_DATA_PAGE_NONCE_LENGTH, tde_decrypt_internal(), fileio_page_reserved::tde_nonce, and tde_data_key_set::temp_key.
Referenced by pgbuf_claim_bcb_for_fix().
|
static |
Definition at line 846 of file tde.c.
References TDE_DATA_KEY_LENGTH, tde_decrypt_internal(), TDE_DK_ALGORITHM, tde_dk_nonce(), and TDE_DK_NONCE_LENGTH.
Referenced by tde_load_dks().
|
static |
Definition at line 1141 of file tde.c.
References ARG_FILE_LINE, assert, cleanup(), ER_ERROR_SEVERITY, er_set(), ER_TDE_DECRYPTION_ERROR, err, NO_ERROR, NULL, TDE_ALGORITHM_AES, TDE_ALGORITHM_ARIA, and TDE_ALGORITHM_NONE.
Referenced by tde_decrypt_data_page(), tde_decrypt_dk(), and tde_decrypt_log_page().
int tde_decrypt_log_page | ( | const LOG_PAGE * | logpage_cipher, |
TDE_ALGORITHM | tde_algo, | ||
LOG_PAGE * | logpage_plain | ||
) |
Definition at line 1027 of file tde.c.
References ARG_FILE_LINE, tde_cipher::data_keys, ER_ERROR_SEVERITY, er_set(), ER_TDE_CIPHER_IS_NOT_LOADED, log_page::hdr, tde_cipher::is_loaded, tde_data_key_set::log_key, log_hdrpage::logical_pageid, tde_decrypt_internal(), TDE_LOG_PAGE_ENC_LENGTH, TDE_LOG_PAGE_ENC_OFFSET, and TDE_LOG_PAGE_NONCE_LENGTH.
Referenced by la_log_fetch(), la_log_fetch_from_archive(), la_log_page_check(), logpb_fetch_from_archive(), logpb_read_page_from_active_log(), and logpb_read_page_from_file().
int tde_delete_mk | ( | int | vdes, |
int | mk_index | ||
) |
Definition at line 1569 of file tde.c.
References ARG_FILE_LINE, tde_mk_file_item::created_time, ER_ERROR_SEVERITY, er_set(), ER_TDE_MASTER_KEY_NOT_FOUND, NO_ERROR, off_signals, restore_signals, TDE_MK_FILE_ITEM_OFFSET, and TDE_MK_FILE_ITEM_SIZE.
Referenced by tde().
|
inlinestatic |
Definition at line 863 of file tde.c.
References assert, NULL, TDE_DATA_KEY_TYPE_LOG, TDE_DATA_KEY_TYPE_PERM, TDE_DATA_KEY_TYPE_TEMP, and TDE_DK_NONCE_LENGTH.
Referenced by tde_decrypt_dk(), and tde_encrypt_dk().
int tde_dump_mks | ( | int | vdes, |
bool | print_value | ||
) |
Definition at line 1629 of file tde.c.
References tde_mk_file_item::created_time, CTIME_MAX, ER_FAILED, i, tde_mk_file_item::master_key, NO_ERROR, off_signals, restore_signals, TDE_MK_FILE_CONTENTS_START, TDE_MK_FILE_ITEM_INDEX, TDE_MK_FILE_ITEM_SIZE, and tde_print_mk().
Referenced by tde().
int tde_encrypt_data_page | ( | const FILEIO_PAGE * | iopage_plain, |
TDE_ALGORITHM | tde_algo, | ||
bool | is_temp, | ||
FILEIO_PAGE * | iopage_cipher | ||
) |
Definition at line 896 of file tde.c.
References ARG_FILE_LINE, tde_cipher::data_keys, ER_ERROR_SEVERITY, er_set(), ER_TDE_CIPHER_IS_NOT_LOADED, err, tde_cipher::is_loaded, fileio_page_reserved::lsa, NO_ERROR, tde_data_key_set::perm_key, fileio_page::prv, TDE_DATA_PAGE_ENC_LENGTH, TDE_DATA_PAGE_ENC_OFFSET, TDE_DATA_PAGE_NONCE_LENGTH, tde_encrypt_internal(), fileio_page_reserved::tde_nonce, tde_data_key_set::temp_key, and tde_cipher::temp_write_counter.
Referenced by pgbuf_bcb_flush_with_wal().
|
static |
Definition at line 826 of file tde.c.
References TDE_DATA_KEY_LENGTH, TDE_DK_ALGORITHM, tde_dk_nonce(), TDE_DK_NONCE_LENGTH, and tde_encrypt_internal().
Referenced by tde_generate_keyinfo().
|
static |
Definition at line 1062 of file tde.c.
References ARG_FILE_LINE, assert, cleanup(), ER_ERROR_SEVERITY, er_set(), ER_TDE_ENCRYPTION_ERROR, err, NO_ERROR, NULL, TDE_ALGORITHM_AES, TDE_ALGORITHM_ARIA, and TDE_ALGORITHM_NONE.
Referenced by tde_encrypt_data_page(), tde_encrypt_dk(), and tde_encrypt_log_page().
int tde_encrypt_log_page | ( | const LOG_PAGE * | logpage_plain, |
TDE_ALGORITHM | tde_algo, | ||
LOG_PAGE * | logpage_cipher | ||
) |
Definition at line 997 of file tde.c.
References ARG_FILE_LINE, tde_cipher::data_keys, ER_ERROR_SEVERITY, er_set(), ER_TDE_CIPHER_IS_NOT_LOADED, log_page::hdr, tde_cipher::is_loaded, tde_data_key_set::log_key, log_hdrpage::logical_pageid, tde_encrypt_internal(), TDE_LOG_PAGE_ENC_LENGTH, TDE_LOG_PAGE_ENC_OFFSET, and TDE_LOG_PAGE_NONCE_LENGTH.
Referenced by logpb_write_page_to_disk(), logpb_write_toflush_pages_to_archive(), and logpb_writev_append_pages().
int tde_find_first_mk | ( | int | vdes, |
int * | mk_index, | ||
unsigned char * | master_key, | ||
time_t * | created_time | ||
) |
Definition at line 1504 of file tde.c.
References ARG_FILE_LINE, tde_mk_file_item::created_time, ER_ERROR_SEVERITY, ER_FAILED, ER_IO_READ, er_set(), er_set_with_oserror(), ER_TDE_INVALID_KEYS_FILE, err, fileio_get_volume_label_by_fd(), tde_mk_file_item::master_key, NO_ERROR, off_signals, PEEK, restore_signals, TDE_MASTER_KEY_LENGTH, TDE_MK_FILE_ITEM_OFFSET, and TDE_MK_FILE_ITEM_SIZE.
Referenced by boot_reset_mk_after_restart_from_backup(), and tde_initialize().
int tde_find_mk | ( | int | vdes, |
int | mk_index, | ||
unsigned char * | master_key, | ||
time_t * | created_time | ||
) |
Definition at line 1437 of file tde.c.
References ARG_FILE_LINE, tde_mk_file_item::created_time, ER_ERROR_SEVERITY, er_set(), ER_TDE_MASTER_KEY_NOT_FOUND, tde_mk_file_item::master_key, NO_ERROR, NULL, off_signals, restore_signals, TDE_MASTER_KEY_LENGTH, TDE_MK_FILE_ITEM_OFFSET, and TDE_MK_FILE_ITEM_SIZE.
Referenced by tde_load_mk(), and xtde_change_mk_without_flock().
|
static |
Definition at line 520 of file tde.c.
References tde_keyinfo::created_time, tde_keyinfo::dk_log, tde_keyinfo::dk_perm, tde_keyinfo::dk_temp, err, tde_data_key_set::log_key, tde_keyinfo::mk_hash, tde_keyinfo::mk_index, NO_ERROR, NULL, tde_data_key_set::perm_key, tde_keyinfo::set_time, TDE_DATA_KEY_TYPE_LOG, TDE_DATA_KEY_TYPE_PERM, TDE_DATA_KEY_TYPE_TEMP, tde_encrypt_dk(), tde_make_mk_hash(), and tde_data_key_set::temp_key.
Referenced by tde_change_mk(), and tde_initialize().
const char* tde_get_algorithm_name | ( | TDE_ALGORITHM | tde_algo | ) |
Definition at line 1694 of file tde.c.
References NULL, TDE_ALGORITHM_AES, TDE_ALGORITHM_ARIA, and TDE_ALGORITHM_NONE.
Referenced by object_printer::describe_class(), emit_schema(), file_alloc(), file_apply_tde_algorithm(), file_destroy(), file_set_tde_algorithm_internal(), logpb_next_append_page(), logpb_start_append(), pgbuf_dealloc_page(), pgbuf_rv_dealloc_undo(), pgbuf_rv_dealloc_undo_compensate(), pgbuf_set_tde_algorithm(), and pt_print_table_option().
int tde_get_keyinfo | ( | THREAD_ENTRY * | thread_p, |
TDE_KEYINFO * | keyinfo | ||
) |
Definition at line 557 of file tde.c.
References recdes::area_size, assert, COPY, recdes::data, ER_FAILED, heap_first(), heap_scancache_end(), heap_scancache_quick_start_with_class_hfid(), HFID_IS_NULL, recdes::length, NO_ERROR, NULL, and S_SUCCESS.
Referenced by boot_reset_mk_after_restart_from_backup(), tde_cipher_initialize(), xtde_change_mk_without_flock(), and xtde_get_mk_info().
int tde_initialize | ( | THREAD_ENTRY * | thread_p, |
HFID * | keyinfo_hfid | ||
) |
Definition at line 106 of file tde.c.
References recdes::area_size, ARG_FILE_LINE, ASSERT_ERROR, boot_db_full_name(), COPY_OID, recdes::data, ER_BO_VOLUME_EXISTS, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_TDE_INVALID_KEYS_FILE, err, fileio_dismount(), fileio_mount(), heap_create_insert_context(), heap_insert_logical(), HFID_COPY, recdes::length, LOG_DBTDE_KEYS_VOLID, tde_data_key_set::log_key, NO_ERROR, NULL, NULL_VOLDES, tde_data_key_set::perm_key, REC_HOME, heap_operation_context::res_oid, tde_add_mk(), tde_create_dk(), tde_create_keys_file(), tde_create_mk(), tde_find_first_mk(), tde_generate_keyinfo(), tde_make_keys_file_fullname(), TDE_MASTER_KEY_LENGTH, tde_validate_keys_file(), tde_data_key_set::temp_key, and recdes::type.
Referenced by boot_create_all_volumes().
|
static |
Definition at line 730 of file tde.c.
References tde_cipher::data_keys, tde_keyinfo::dk_log, tde_keyinfo::dk_perm, tde_keyinfo::dk_temp, err, tde_data_key_set::log_key, NO_ERROR, tde_data_key_set::perm_key, TDE_DATA_KEY_TYPE_LOG, TDE_DATA_KEY_TYPE_PERM, TDE_DATA_KEY_TYPE_TEMP, tde_decrypt_dk(), and tde_data_key_set::temp_key.
Referenced by tde_cipher_initialize().
int tde_load_mk | ( | int | vdes, |
const TDE_KEYINFO * | keyinfo, | ||
unsigned char * | master_key | ||
) |
Definition at line 693 of file tde.c.
References ARG_FILE_LINE, assert, tde_keyinfo::created_time, ER_ERROR_SEVERITY, er_set(), ER_TDE_INVALID_MASTER_KEY, err, tde_keyinfo::mk_hash, tde_keyinfo::mk_index, NO_ERROR, tde_find_mk(), TDE_MASTER_KEY_LENGTH, and tde_validate_mk().
Referenced by boot_reset_mk_after_restart_from_backup(), and tde_cipher_initialize().
void tde_make_keys_file_fullname | ( | char * | keys_vol_fullname, |
const char * | db_full_name, | ||
bool | ignore_parm | ||
) |
Definition at line 492 of file tde.c.
References fileio_get_base_file_name(), fileio_make_keys_name(), fileio_make_keys_name_given_path(), NULL, prm_get_string_value(), and PRM_ID_TDE_KEYS_FILE_PATH.
Referenced by boot_reset_mk_after_restart_from_backup(), logpb_backup(), logpb_copy_database(), logpb_delete(), logpb_rename_all_volumes_files(), logpb_restore(), stde_get_mk_file_path(), tde_cipher_initialize(), tde_get_mk_file_path(), tde_initialize(), and xtde_change_mk_without_flock().
|
static |
Definition at line 782 of file tde.c.
References assert, NULL, and TDE_MASTER_KEY_LENGTH.
Referenced by tde_generate_keyinfo(), and tde_validate_mk().
void tde_print_mk | ( | const unsigned char * | master_key | ) |
Definition at line 1332 of file tde.c.
References i, and TDE_MASTER_KEY_LENGTH.
Referenced by tde(), and tde_dump_mks().
|
static |
Definition at line 595 of file tde.c.
References recdes::area_size, assert, ASSERT_ERROR, heap_scancache_node::class_oid, recdes::data, heap_create_update_context(), heap_scancache_end(), heap_scancache_start_modify(), heap_update_logical(), HFID_IS_NULL, recdes::length, NO_ERROR, heap_scancache::node, NULL, OID_ISNULL, oid_Root_class_oid, SINGLE_ROW_UPDATE, and UPDATE_INPLACE_CURRENT_MVCCID.
Referenced by tde_change_mk().
bool tde_validate_keys_file | ( | int | vdes | ) |
Definition at line 358 of file tde.c.
References CUBRID_MAGIC_KEYS, CUBRID_MAGIC_MAX_LENGTH, off_signals, and restore_signals.
Referenced by boot_reset_mk_after_restart_from_backup(), logpb_restore(), tde_cipher_initialize(), tde_copy_keys_file(), and tde_initialize().
|
static |
Definition at line 762 of file tde.c.
References tde_make_mk_hash(), and TDE_MASTER_KEY_LENGTH.
Referenced by tde_load_mk(), and xtde_change_mk_without_flock().
int xtde_change_mk_without_flock | ( | THREAD_ENTRY * | thread_p, |
const int | mk_index | ||
) |
Definition at line 1246 of file tde.c.
References ARG_FILE_LINE, boot_db_full_name(), ER_ERROR_SEVERITY, ER_IO_MOUNT_FAIL, er_set_with_oserror(), err, fileio_close(), fileio_open(), tde_keyinfo::mk_hash, tde_keyinfo::mk_index, NO_ERROR, NULL, NULL_VOLDES, tde_change_mk(), tde_find_mk(), tde_get_keyinfo(), tde_make_keys_file_fullname(), TDE_MASTER_KEY_LENGTH, and tde_validate_mk().
Referenced by stde_change_mk_on_server(), and tde_change_mk_on_server().
int xtde_get_mk_info | ( | THREAD_ENTRY * | thread_p, |
int * | mk_index, | ||
time_t * | created_time, | ||
time_t * | set_time | ||
) |
Definition at line 1214 of file tde.c.
References ARG_FILE_LINE, tde_keyinfo::created_time, ER_ERROR_SEVERITY, er_set(), ER_TDE_CIPHER_IS_NOT_LOADED, err, tde_cipher::is_loaded, tde_keyinfo::mk_index, NO_ERROR, tde_keyinfo::set_time, and tde_get_keyinfo().
Referenced by stde_get_mk_info(), and tde_get_mk_info().
TDE_CIPHER tde_Cipher |
Definition at line 69 of file tde.c.
Referenced by boot_reset_mk_after_restart_from_backup(), file_apply_tde_to_class_files(), file_set_tde_algorithm(), la_apply_log_file(), la_delay_replica(), locator_update_force(), logpb_read_page_from_active_log(), logpb_set_tde_algorithm(), pgbuf_set_tde_algorithm(), prior_set_tde_encrypted(), stde_get_data_keys(), and xboot_restart_from_backup().
|
static |
|
static |