From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: Fan Zhang <roy.fan.zhang@intel.com>
Cc: Chandubabu Namburu <chandu@amd.com>,
dev@dpdk.org,
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Subject: [PATCH 1/1] drivers: define OPENSSL_API_COMPAT
Date: Tue, 10 May 2022 17:06:35 +0200 [thread overview]
Message-ID: <20220510150635.61975-1-heinrich.schuchardt@canonical.com> (raw)
The API of the OpenSSL library has changed with version 3.0. This results
in a lot of compiler warnings like
../dpdk/drivers/crypto/ccp/ccp_crypto.c:182:9:
warning: ‘SHA256_Transform’ is deprecated:
Since OpenSSL 3.0 [-Wdeprecated-declarations]
As many Linux distributions still use elder OpenSSL libraries we cannot
change the used API now. Instead define OPENSSL_API_COMPAT to indicate
that we are using the OpenSSL 1.1.0 API.
OPENSSL_API_COMPAT is introduced in *.c files and not in *.h files as some
*.c files directly include OpenSSL headers.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
drivers/crypto/ccp/ccp_crypto.c | 2 ++
drivers/crypto/openssl/rte_openssl_pmd.c | 2 ++
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 2 ++
drivers/crypto/qat/qat_sym.c | 2 ++
drivers/crypto/qat/qat_sym_session.c | 2 ++
5 files changed, 10 insertions(+)
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 4ed91a7436..4bab18323b 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -2,6 +2,8 @@
* Copyright(c) 2018 Advanced Micro Devices, Inc. All rights reserved.
*/
+#define OPENSSL_API_COMPAT 0x10100000L
+
#include <dirent.h>
#include <fcntl.h>
#include <stdio.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index d80e1052e2..4f331af157 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -2,6 +2,8 @@
* Copyright(c) 2016-2017 Intel Corporation
*/
+#define OPENSSL_API_COMPAT 0x10100000L
+
#include <rte_common.h>
#include <rte_hexdump.h>
#include <rte_cryptodev.h>
diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
index 1cb07794bd..87c395a836 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c
@@ -2,6 +2,8 @@
* Copyright(c) 2016-2017 Intel Corporation
*/
+#define OPENSSL_API_COMPAT 0x10100000L
+
#include <string.h>
#include <rte_common.h>
diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index ca8c9a8124..3a6c9dcc0a 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -2,6 +2,8 @@
* Copyright(c) 2015-2022 Intel Corporation
*/
+#define OPENSSL_API_COMPAT 0x10100000L
+
#include <openssl/evp.h>
#include <rte_mempool.h>
diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c
index 9d6a19c0be..737a180810 100644
--- a/drivers/crypto/qat/qat_sym_session.c
+++ b/drivers/crypto/qat/qat_sym_session.c
@@ -2,6 +2,8 @@
* Copyright(c) 2015-2022 Intel Corporation
*/
+#define OPENSSL_API_COMPAT 0x10100000L
+
#include <openssl/sha.h> /* Needed to calculate pre-compute values */
#include <openssl/aes.h> /* Needed to calculate pre-compute values */
#include <openssl/md5.h> /* Needed to calculate pre-compute values */
--
2.34.1
next reply other threads:[~2022-05-10 15:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 15:06 Heinrich Schuchardt [this message]
2022-05-13 10:02 ` Gao, DaxueX
2022-05-17 12:03 ` David Marchand
2022-05-26 16:18 ` [EXT] " Akhil Goyal
2022-05-17 16:30 ` Ji, Kai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220510150635.61975-1-heinrich.schuchardt@canonical.com \
--to=heinrich.schuchardt@canonical.com \
--cc=chandu@amd.com \
--cc=dev@dpdk.org \
--cc=roy.fan.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).