diff --git a/src/storage/gstor/zekernel/common/cm_encrypt.c b/src/storage/gstor/zekernel/common/cm_encrypt.c index 214eaf0c124b7632dba7975306a1c2e9034f2cd7..46ed40afb47e2d03b719d4943815e73382a56f27 100644 --- a/src/storage/gstor/zekernel/common/cm_encrypt.c +++ b/src/storage/gstor/zekernel/common/cm_encrypt.c @@ -289,6 +289,7 @@ status_t cm_encyrpt_init(cm_encrypt_ctrl *ctrl, cipher_alg_type alg_type, uchar status_t cm_init_drbg(void) { +#if OPENSSL_VERSION_NUMBER < 0x30000000L RAND_DRBG *master_drbg = NULL; master_drbg = RAND_DRBG_get0_master(); @@ -316,7 +317,7 @@ status_t cm_init_drbg(void) GS_THROW_ERROR(ERR_RANDOM_INIT); return GS_ERROR; } - +#endif return GS_SUCCESS; } diff --git a/src/storage/gstor/zekernel/common/cm_encrypt.h b/src/storage/gstor/zekernel/common/cm_encrypt.h index 7743128d3152dc9e17a69fd0f29fdda50dcd6989..19b5f366b925c1342fbf53d8fb5ab7648a3a1b71 100644 --- a/src/storage/gstor/zekernel/common/cm_encrypt.h +++ b/src/storage/gstor/zekernel/common/cm_encrypt.h @@ -27,7 +27,11 @@ #include "cm_defs.h" #include "cm_text.h" #include "openssl/evp.h" +#if OPENSSL_VERSION_NUMBER < 0x30000000L #include "openssl/rand_drbg.h" +#else +#include "openssl/rand.h" +#endif #include "openssl/ssl.h" #ifdef __cplusplus diff --git a/src/storage/gstor/zekernel/common/cm_entropy.h b/src/storage/gstor/zekernel/common/cm_entropy.h index 1390a7204ada4544ad0049d718206eba707b40f0..440ecbaabfe5e7344c702eebf1593eebd8ce4ffa 100644 --- a/src/storage/gstor/zekernel/common/cm_entropy.h +++ b/src/storage/gstor/zekernel/common/cm_entropy.h @@ -25,8 +25,12 @@ #define __CM_ENTROPY_H__ #include "cm_defs.h" -#include "openssl/rand_drbg.h" #include "openssl/evp.h" +#if OPENSSL_VERSION_NUMBER < 0x30000000L +#include "openssl/rand_drbg.h" +#else +#include "openssl/rand.h" +#endif #ifdef __cplusplus extern "C" {