[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 135/282: win32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5
From: |
gnunet |
Subject: |
[gnurl] 135/282: win32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functions |
Date: |
Wed, 01 Apr 2020 14:30:00 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 150f45e8d1cce189a5b0b963243a8563d3d14b8e
Author: Steve Holme <address@hidden>
AuthorDate: Wed Feb 19 07:46:22 2020 +0000
win32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functions
Whilst lib\md4.c used this pre-processor, lib\md5.c and
src\tool_metalink.c did not and simply relied on the WIN32
pre-processor directive.
Reviewed-by: Marcel Raad
Closes #4955
---
lib/config-win32.h | 4 +++-
lib/md5.c | 4 ++--
src/tool_metalink.c | 4 ++--
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/lib/config-win32.h b/lib/config-win32.h
index 1dcce0db4..8b488c1c1 100644
--- a/lib/config-win32.h
+++ b/lib/config-win32.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -714,7 +714,9 @@ Vista
#endif
/* Define to use the Windows crypto library. */
+#if !defined(CURL_WINDOWS_APP)
#define USE_WIN32_CRYPTO
+#endif
/* Define to use Unix sockets. */
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
diff --git a/lib/md5.c b/lib/md5.c
index 2b81ca455..8741bd225 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -124,7 +124,7 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX
*ctx)
CC_MD5_Final(digest, ctx);
}
-#elif defined(WIN32) && !defined(CURL_WINDOWS_APP)
+#elif defined(USE_WIN32_CRYPTO)
#include <wincrypt.h>
#include "curl_memory.h"
diff --git a/src/tool_metalink.c b/src/tool_metalink.c
index 53de61258..7acbb7a07 100644
--- a/src/tool_metalink.c
+++ b/src/tool_metalink.c
@@ -73,7 +73,7 @@
and later. If you're building for an older cat, well, sorry. */
# define COMMON_DIGEST_FOR_OPENSSL
# include <CommonCrypto/CommonDigest.h>
-#elif defined(WIN32)
+#elif defined(USE_WIN32_CRYPTO)
/* For Windows: If no other crypto library is provided, we fallback
to the hash functions provided within the Microsoft Windows CryptoAPI */
# include <wincrypt.h>
@@ -381,7 +381,7 @@ static void SHA256_Final(unsigned char digest[32],
SHA256_CTX *ctx)
sha256_finish(ctx, digest);
}
-#elif defined(WIN32)
+#elif defined(USE_WIN32_CRYPTO)
static void win32_crypto_final(struct win32_crypto_hash *ctx,
unsigned char *digest,
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 110/282: create-dirs.d: mention the mode, (continued)
- [gnurl] 110/282: create-dirs.d: mention the mode, gnunet, 2020/04/01
- [gnurl] 109/282: CURLOPT_ALTSVC_CTRL.3: fix the DEFAULT wording, gnunet, 2020/04/01
- [gnurl] 117/282: azure: disable brotli on the macos debug-builds, gnunet, 2020/04/01
- [gnurl] 125/282: cookies: make saving atomic with a rename, gnunet, 2020/04/01
- [gnurl] 122/282: multi: if Curl_readwrite sets 'comeback' use expire, not loop, gnunet, 2020/04/01
- [gnurl] 119/282: TODO: Paged searches on LDAP server, gnunet, 2020/04/01
- [gnurl] 133/282: HTTP-COOKIES: mention that a trailing newline is required, gnunet, 2020/04/01
- [gnurl] 130/282: SOCKS: fix typo in printf formatting, gnunet, 2020/04/01
- [gnurl] 127/282: altsvc: make saving the cache an atomic operation, gnunet, 2020/04/01
- [gnurl] 129/282: CURLOPT_REDIR_PROTOCOLS.3: update the DEFAULT section, gnunet, 2020/04/01
- [gnurl] 135/282: win32: USE_WIN32_CRYPTO to enable Win32 based MD4, MD5 and SHA256 functions,
gnunet <=
- [gnurl] 142/282: md4: Fixed compilation issues when using GNU TLS gcrypt, gnunet, 2020/04/01
- [gnurl] 131/282: tool_util: Improve Windows version of tvnow(), gnunet, 2020/04/01
- [gnurl] 128/282: docs/GOVERNANCE: refreshed + added "donations" and "commercial support", gnunet, 2020/04/01
- [gnurl] 138/282: GnuTLS: Always send client cert, gnunet, 2020/04/01
- [gnurl] 134/282: connect: remove some spurious infof() calls, gnunet, 2020/04/01
- [gnurl] 136/282: cleanup: comment typos, gnunet, 2020/04/01
- [gnurl] 139/282: gtls: fix the copyright year, gnunet, 2020/04/01
- [gnurl] 132/282: nit: Copyright year out of date, gnunet, 2020/04/01
- [gnurl] 137/282: github action: add CIFuzz, gnunet, 2020/04/01
- [gnurl] 141/282: RELEASE-NOTES: synced, gnunet, 2020/04/01