]> git.droids-corp.org - dpdk.git/commitdiff
drivers/crypto: fix warnings for OpenSSL version
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 10 May 2022 15:06:35 +0000 (17:06 +0200)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 1 Jun 2022 14:26:35 +0000 (16:26 +0200)
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>
drivers/crypto/ccp/ccp_crypto.c
drivers/crypto/openssl/rte_openssl_pmd.c
drivers/crypto/openssl/rte_openssl_pmd_ops.c
drivers/crypto/qat/qat_sym.c
drivers/crypto/qat/qat_sym_session.c

index 4ed91a74369de85072173ed191d6fa496d0236fa..4bab18323b086f57fbe99d5cf10915b5f52a4e69 100644 (file)
@@ -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>
index d80e1052e2fab007247f52329689f471de54a173..4f331af157fe3dfac500821cd106d7de5dd29837 100644 (file)
@@ -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>
index 1cb07794bdde125f44760f2de1dfcc01d9155f98..87c395a836ca44914aa125d22f3f6c5244d0f90b 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2016-2017 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <string.h>
 
 #include <rte_common.h>
index ca8c9a81245c6148c9c2b5d20f3dd8481ad78cf2..3a6c9dcc0ae071772e866551d2b681e9922dd86b 100644 (file)
@@ -2,6 +2,8 @@
  * Copyright(c) 2015-2022 Intel Corporation
  */
 
+#define OPENSSL_API_COMPAT 0x10100000L
+
 #include <openssl/evp.h>
 
 #include <rte_mempool.h>
index 9d6a19c0bee758817a9874cad8261ea260817597..737a1808107c8e9cf24122321b810dc38ef5f331 100644 (file)
@@ -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 */