From cd10ccf4d1b4671883a0d45f6769947a6cdb45d0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 10:55:47 +0200 Subject: Adding upstream version 1.24.5. Signed-off-by: Daniel Baumann --- lib/sha256.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'lib/sha256.h') diff --git a/lib/sha256.h b/lib/sha256.h index 938b106..a9d7abb 100644 --- a/lib/sha256.h +++ b/lib/sha256.h @@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA256 and SHA224 sum library functions. - Copyright (C) 2005-2006, 2008-2023 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2024 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -30,7 +30,21 @@ # ifndef OPENSSL_API_COMPAT # define OPENSSL_API_COMPAT 0x10101000L /* FIXME: Use OpenSSL 1.1+ API. */ # endif -# include +/* If would give a compile-time error, don't use OpenSSL. */ +# include +# if OPENSSL_VERSION_MAJOR >= 3 +# include +# if (OPENSSL_CONFIGURED_API \ + < (OPENSSL_API_COMPAT < 0x900000L ? OPENSSL_API_COMPAT : \ + ((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \ + + ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \ + + ((OPENSSL_API_COMPAT >> 12) & 0xFF))) +# undef HAVE_OPENSSL_SHA256 +# endif +# endif +# if HAVE_OPENSSL_SHA256 +# include +# endif # endif # ifdef __cplusplus -- cgit v1.2.3