]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Merge pull request #2673 from 004helix/master
authorTim Kientzle <kientzle@acm.org>
Sun, 29 Jun 2025 02:10:27 +0000 (19:10 -0700)
committerMartin Matuska <martin@matuska.de>
Wed, 10 Sep 2025 08:17:55 +0000 (10:17 +0200)
archive_cryptor_private.h: check message digest functions are enabled for windows

(cherry picked from commit 31cff981e4fe9a583de43b239fb23e77045b293a)

libarchive/archive_cryptor_private.h

index 4b3c6c1614332b54c3edd7af464b131e11e51f22..45f7c61d2dfb2ad2ae3532653ceae4da21a50381 100644 (file)
@@ -144,9 +144,15 @@ typedef struct {
 
 #else
 
+#if defined(ARCHIVE_CRYPTO_MD5_WIN)    ||\
+       defined(ARCHIVE_CRYPTO_SHA1_WIN)   ||\
+       defined(ARCHIVE_CRYPTO_SHA256_WIN) ||\
+       defined(ARCHIVE_CRYPTO_SHA384_WIN) ||\
+       defined(ARCHIVE_CRYPTO_SHA512_WIN)
 #if defined(_WIN32) && !defined(__CYGWIN__) && !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA)
 #define ARCHIVE_CRYPTOR_USE_WINCRYPT 1
 #endif
+#endif
 
 #define AES_BLOCK_SIZE 16
 #define AES_MAX_KEY_SIZE 32