From 8edf930ec0c9effd83e2d115114386f9afd7050b Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Thu, 16 May 2024 00:23:39 +0200 Subject: [PATCH] Fix string.h, strings.h and stdio.h include in crypto backend. String.h and stdbool.h are already included in main backend header, no need to include them again. Stdio.h is missing for OpenSSL and NSS backed (for sprintf). Strings.h is missing for cipher_generic, gcrypt and OpoenSSL (strcasecmp). Fixes: #885 --- lib/crypto_backend/cipher_generic.c | 3 +-- lib/crypto_backend/crc32.c | 2 -- lib/crypto_backend/crypto_cipher_kernel.c | 2 -- lib/crypto_backend/crypto_gcrypt.c | 2 +- lib/crypto_backend/crypto_kernel.c | 1 - lib/crypto_backend/crypto_nettle.c | 1 - lib/crypto_backend/crypto_nss.c | 2 +- lib/crypto_backend/crypto_openssl.c | 3 ++- 8 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/crypto_backend/cipher_generic.c b/lib/crypto_backend/cipher_generic.c index 746cfcf2..00aa43f5 100644 --- a/lib/crypto_backend/cipher_generic.c +++ b/lib/crypto_backend/cipher_generic.c @@ -19,9 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include -#include #include +#include #include "crypto_backend.h" struct cipher_alg { diff --git a/lib/crypto_backend/crc32.c b/lib/crypto_backend/crc32.c index 7a12a8e7..c0025ed4 100644 --- a/lib/crypto_backend/crc32.c +++ b/lib/crypto_backend/crc32.c @@ -38,8 +38,6 @@ * */ -#include - #include "crypto_backend.h" static const uint32_t crc32_tab[] = { diff --git a/lib/crypto_backend/crypto_cipher_kernel.c b/lib/crypto_backend/crypto_cipher_kernel.c index 77b3643f..1efa0d93 100644 --- a/lib/crypto_backend/crypto_cipher_kernel.c +++ b/lib/crypto_backend/crypto_cipher_kernel.c @@ -19,10 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include #include #include -#include #include #include #include diff --git a/lib/crypto_backend/crypto_gcrypt.c b/lib/crypto_backend/crypto_gcrypt.c index 8e3f14e4..1deabf56 100644 --- a/lib/crypto_backend/crypto_gcrypt.c +++ b/lib/crypto_backend/crypto_gcrypt.c @@ -19,9 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include #include #include +#include #include #include #include "crypto_backend_internal.h" diff --git a/lib/crypto_backend/crypto_kernel.c b/lib/crypto_backend/crypto_kernel.c index be6051a9..cc23ceb2 100644 --- a/lib/crypto_backend/crypto_kernel.c +++ b/lib/crypto_backend/crypto_kernel.c @@ -19,7 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include #include #include #include diff --git a/lib/crypto_backend/crypto_nettle.c b/lib/crypto_backend/crypto_nettle.c index f08db748..7a179709 100644 --- a/lib/crypto_backend/crypto_nettle.c +++ b/lib/crypto_backend/crypto_nettle.c @@ -20,7 +20,6 @@ */ #include -#include #include #include #include diff --git a/lib/crypto_backend/crypto_nss.c b/lib/crypto_backend/crypto_nss.c index 6b390a4a..05d09098 100644 --- a/lib/crypto_backend/crypto_nss.c +++ b/lib/crypto_backend/crypto_nss.c @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include +#include #include #include #include diff --git a/lib/crypto_backend/crypto_openssl.c b/lib/crypto_backend/crypto_openssl.c index 4e853844..869be94b 100644 --- a/lib/crypto_backend/crypto_openssl.c +++ b/lib/crypto_backend/crypto_openssl.c @@ -28,9 +28,10 @@ * for all of the code used other than OpenSSL. */ -#include +#include #include #include +#include #include #include #include