wolfssl: use for SHA256, MD4, MD5, and setting DES odd parity

Prior to this commit, OpenSSL could be used for all these functions, but
not wolfSSL. This commit makes it so wolfSSL will be used if USE_WOLFSSL
is defined.

Closes #7806
This commit is contained in:
Hayden Roche 2021-10-01 16:06:55 -07:00 committed by Daniel Stenberg
parent 8bb5f4ddf3
commit e12dc2dd97
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 37 additions and 7 deletions

View file

@ -65,12 +65,19 @@ static void MD5_Final(unsigned char *digest, MD5_CTX *ctx)
md5_digest(ctx, 16, digest);
}
#elif defined(USE_OPENSSL) && !defined(USE_AMISSL)
/* When OpenSSL is available we use the MD5-function from OpenSSL */
#elif (defined(USE_OPENSSL) && !defined(USE_AMISSL)) || defined(USE_WOLFSSL)
#ifdef USE_WOLFSSL
#include <wolfssl/options.h>
#endif
#if defined(USE_OPENSSL) || (defined(USE_WOLFSSL) && !defined(NO_MD5))
/* When OpenSSL or wolfSSL is available, we use their MD5 functions. */
#include <openssl/md5.h>
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
#endif
#elif defined(USE_MBEDTLS)