fix: refactor OB_USE_BABASSL macro define scope in TDE

This commit is contained in:
obdev
2023-09-08 11:17:16 +08:00
committed by ob-robot
parent c6439a604d
commit 645ed64591

View File

@ -374,13 +374,11 @@ static void ob_free_openssl(void *ptr, const char *, int)
int ObEncryptionUtil::init_ssl_malloc()
{
int ret = OB_SUCCESS;
#ifdef OB_USE_BABASSL
int tmp_ret = CRYPTO_set_mem_functions(ob_malloc_openssl, ob_realloc_openssl, ob_free_openssl);
if (OB_UNLIKELY(tmp_ret != 1)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("failed to set crypto mem functions", K(tmp_ret), K(ret));
}
#endif
return ret;
}