mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:43:32 +03:00
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:
parent
8bb5f4ddf3
commit
e12dc2dd97
5 changed files with 37 additions and 7 deletions
13
lib/md4.c
13
lib/md4.c
|
|
@ -27,6 +27,7 @@
|
|||
#include "curl_md4.h"
|
||||
#include "warnless.h"
|
||||
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
#include <openssl/opensslconf.h>
|
||||
#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
|
||||
|
|
@ -35,6 +36,13 @@
|
|||
#endif
|
||||
#endif /* USE_OPENSSL */
|
||||
|
||||
#ifdef USE_WOLFSSL
|
||||
#include <wolfssl/options.h>
|
||||
#ifdef NO_MD4
|
||||
#define OPENSSL_NO_MD4
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef USE_MBEDTLS
|
||||
#include <mbedtls/version.h>
|
||||
#if MBEDTLS_VERSION_NUMBER >= 0x03000000
|
||||
|
|
@ -74,8 +82,9 @@ static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
|
|||
md4_digest(ctx, MD4_DIGEST_SIZE, result);
|
||||
}
|
||||
|
||||
#elif defined(USE_OPENSSL) && !defined(OPENSSL_NO_MD4)
|
||||
/* When OpenSSL is available we use the MD4-functions from OpenSSL */
|
||||
#elif (defined(USE_OPENSSL) || defined(USE_WOLFSSL)) && \
|
||||
!defined(OPENSSL_NO_MD4)
|
||||
/* When OpenSSL or wolfSSL is available, we use their MD4 functions. */
|
||||
#include <openssl/md4.h>
|
||||
|
||||
#elif (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue