1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

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>
This commit is contained in:
Johannes Schindelin 2017-08-18 07:53:33 +02:00 committed by Daniel Stenberg
parent a34e141c09
commit b180a273fa
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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,