summaryrefslogtreecommitdiff
path: root/src/tool_metalink.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-08-18 07:53:33 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-08-28 14:56:59 +0200
commitb180a273fab64b601e7f44a36a0ec8bd5363e8e1 (patch)
tree63909af1e94b622137e11f423c10bd1c482d2f7b /src/tool_metalink.c
parenta34e141c0964697ced819b37b95a12d074f27209 (diff)
downloadcurl-b180a273fab64b601e7f44a36a0ec8bd5363e8e1.tar.gz
metalink: allow compiling with multiple SSL backends
Previously, the code assumed that at most one of the SSL backends would be compiled in, emulating OpenSSL's functions if the configured backend was not OpenSSL itself. However, now we allow building with multiple SSL backends and choosing one at runtime. Therefore, metalink needs to be adjusted to handle this scenario, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'src/tool_metalink.c')
-rw-r--r--src/tool_metalink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tool_metalink.c b/src/tool_metalink.c
index 4713a911b..a20aec14e 100644
--- a/src/tool_metalink.c
+++ b/src/tool_metalink.c
@@ -117,7 +117,9 @@ struct win32_crypto_hash {
return PARAM_NO_MEM; \
} WHILE_FALSE
-#ifdef USE_GNUTLS_NETTLE
+#if defined(USE_OPENSSL)
+/* Functions are already defined */
+#elif defined(USE_GNUTLS_NETTLE)
static int MD5_Init(MD5_CTX *ctx)
{
@@ -375,7 +377,7 @@ static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
sha256_finish(ctx, digest);
}
-#elif defined(_WIN32) && !defined(USE_OPENSSL)
+#elif defined(_WIN32)
static void win32_crypto_final(struct win32_crypto_hash *ctx,
unsigned char *digest,