drivers/crypto: fix warnings for OpenSSL version
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. Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library") Cc: stable@dpdk.org Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Tested-by: Daxue Gao <daxuex.gao@intel.com> Tested-by: David Marchand <david.marchand@redhat.com> Acked-by: Kai Ji <kai.ji@intel.com>
This commit is contained in:
parent
4b45567f35
commit
7360749f16
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -2,6 +2,8 @@
|
||||
* Copyright(c) 2016-2017 Intel Corporation
|
||||
*/
|
||||
|
||||
#define OPENSSL_API_COMPAT 0x10100000L
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <rte_common.h>
|
||||
|
@ -2,6 +2,8 @@
|
||||
* Copyright(c) 2015-2022 Intel Corporation
|
||||
*/
|
||||
|
||||
#define OPENSSL_API_COMPAT 0x10100000L
|
||||
|
||||
#include <openssl/evp.h>
|
||||
|
||||
#include <rte_mempool.h>
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user