From 6859993ea7ac6d0140cd8b479a0495abfef65605 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 50b00317..fcd838a2 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 5b12088e..d10ca7cb 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 837fed8d..d288e698 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 e394d16c..cfb554f3 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 8276d561..4cf5a4c9 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