[CP] support load the soft module to encrypt data
This commit is contained in:
@ -171,6 +171,32 @@ private:
|
||||
static const EVP_MD* get_hash_evp_md(const ObHashAlgorithm algo);
|
||||
};
|
||||
|
||||
class ObTdeEncryptEngineLoader {
|
||||
public:
|
||||
enum ObEncryptEngineType {
|
||||
OB_NONE_ENGINE = 0,
|
||||
OB_INVALID_ENGINE = 1,
|
||||
OB_AES_ENGINE = 2,
|
||||
OB_SM4_ENGINE = 3,
|
||||
OB_MAX_ENGINE
|
||||
};
|
||||
static ObTdeEncryptEngineLoader &get_instance();
|
||||
ObTdeEncryptEngineLoader() {
|
||||
ssl_init();
|
||||
MEMSET(tde_engine_, 0, sizeof(ENGINE*)*OB_MAX_ENGINE);
|
||||
}
|
||||
~ObTdeEncryptEngineLoader() { destroy(); }
|
||||
void ssl_init();
|
||||
void destroy();
|
||||
int load(const common::ObString& engine);
|
||||
ObEncryptEngineType get_engine_type(const common::ObString& engine);
|
||||
ENGINE* get_tde_engine(ObAesOpMode &mode) const;
|
||||
int reload_config();
|
||||
private:
|
||||
bool is_inited_;
|
||||
ENGINE* tde_engine_[OB_MAX_ENGINE];
|
||||
};
|
||||
|
||||
}//end share
|
||||
} //end oceanbase
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user