diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:56:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:56:01 +0000 |
commit | 502c540485a1626fce474639d572904a4e3c55fe (patch) | |
tree | c8bb1ed8bda9ce49697a30eaab650191e9462e2a /lib/sha1.h | |
parent | Adding debian version 1.21.4-1. (diff) | |
download | wget-502c540485a1626fce474639d572904a4e3c55fe.tar.xz wget-502c540485a1626fce474639d572904a4e3c55fe.zip |
Merging upstream version 1.24.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/sha1.h')
-rw-r--r-- | lib/sha1.h | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -1,6 +1,6 @@ /* Declarations of functions and data types used for SHA1 sum library functions. - Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2023 Free Software + Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2024 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify @@ -31,7 +31,21 @@ # ifndef OPENSSL_API_COMPAT # define OPENSSL_API_COMPAT 0x10101000L /* FIXME: Use OpenSSL 1.1+ API. */ # endif -# include <openssl/sha.h> +/* If <openssl/macros.h> would give a compile-time error, don't use OpenSSL. */ +# include <openssl/opensslv.h> +# if OPENSSL_VERSION_MAJOR >= 3 +# include <openssl/configuration.h> +# 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_SHA1 +# endif +# endif +# if HAVE_OPENSSL_SHA1 +# include <openssl/sha.h> +# endif # endif # ifdef __cplusplus |