]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Set ARCHIVE_CRYPTOR_USE_WINCRYPT for WinCrypt 2630/head
authorTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 23 May 2025 17:33:53 +0000 (19:33 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 23 May 2025 17:43:26 +0000 (19:43 +0200)
If WinCrypt is used, actually set ARCHIVE_CRYPTOR_USE_WINCRYPT
for version details output.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_cryptor_private.h

index 460d38c122a6356666732ddee4d5a10e26a32f88..4b3c6c1614332b54c3edd7af464b131e11e51f22 100644 (file)
@@ -144,6 +144,10 @@ typedef struct {
 
 #else
 
+#if defined(_WIN32) && !defined(__CYGWIN__) && !(defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA)
+#define ARCHIVE_CRYPTOR_USE_WINCRYPT 1
+#endif
+
 #define AES_BLOCK_SIZE 16
 #define AES_MAX_KEY_SIZE 32
 typedef int archive_crypto_ctx;