[FEAT MERGE] support aead in tde

Co-authored-by: yinyj17 <yinyijun92@gmail.com>
This commit is contained in:
jingtaoye35
2023-08-24 04:10:29 +00:00
committed by ob-robot
parent fcadb31c97
commit 22a9b2252c
32 changed files with 540 additions and 394 deletions

View File

@ -49,11 +49,11 @@ void TestMicroBlockEncryption::SetUp()
ASSERT_EQ(OB_SUCCESS, share::ObMasterKeyGetter::instance().init(nullptr));
ASSERT_EQ(OB_SUCCESS, share::ObMasterKeyGetter::instance().set_master_key(
tenant_id_, master_key_id_, master_key_, strlen(master_key_)));
ObAesOpMode mode = ObAesOpMode::ob_invalid_mode;
ObCipherOpMode mode = ObCipherOpMode::ob_invalid_mode;
ASSERT_EQ(OB_SUCCESS, share::ObMasterKeyGetter::get_table_key_algorithm(tenant_id_, mode));
ASSERT_EQ(OB_SUCCESS, share::ObAesEncryption::aes_encrypt(master_key_, strlen(master_key_),
raw_key_, strlen(raw_key_), OB_MAX_ENCRYPTION_KEY_NAME_LENGTH, nullptr, 0, mode,
encrypt_key_, encrypt_key_len_));
ASSERT_EQ(OB_SUCCESS, share::ObBlockCipher::encrypt(master_key_, strlen(master_key_), raw_key_,
strlen(raw_key_), OB_MAX_ENCRYPTION_KEY_NAME_LENGTH, nullptr, 0, nullptr, 0,
0, mode, encrypt_key_, encrypt_key_len_, nullptr));
}
void TestMicroBlockEncryption::TearDown()

View File

@ -76,7 +76,7 @@ void TestRootBlockInfo::SetUp()
oceanbase::ObClusterVersion::get_instance().update_data_version(DATA_CURRENT_VERSION);
TestDataFilePrepare::SetUp();
prepare_tablet_read_info();
des_meta_.encrypt_id_ = ObAesOpMode::ob_invalid_mode;
des_meta_.encrypt_id_ = ObCipherOpMode::ob_invalid_mode;
des_meta_.compressor_type_ = ObCompressorType::NONE_COMPRESSOR;
ASSERT_TRUE(!root_info_.is_valid());
root_info_.reset();