Commit 387dbedc authored by Nathan Claudel's avatar Nathan Claudel Committed by Tomasz Zawadzki
Browse files

env_dpdk: fix build with OpenSSL < 3.0.0



`OPENSSL_INIT_set_config_file_flags` does not exist in OpenSSL < 3.0.0.
Remove this function call in incompatible versions of OpenSSL, using the OPENSSL_VERSION_NUMBER macro.

pkgdep scripts seem to indicate that SPDK should be compatible with OpenSSL 1.1.

Change-Id: Id8558cfd69d186bee85671926d48aa59b59fd30a
Signed-off-by: default avatarNathan Claudel <nathan.claudel@kalrayinc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21789


Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 2b5de63c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -615,7 +615,9 @@ spdk_env_init(const struct spdk_env_opts *opts)
		return -ENOMEM;
	}

#if OPENSSL_VERSION_NUMBER >= 0x30000000 /* OPENSSL 3.0.0 */
	OPENSSL_INIT_set_config_file_flags(settings, 0);
#endif
	rc = OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, settings);
	if (rc != 1) {
		fprintf(stderr, "Failed to initialize OpenSSL\n");