Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #8292: allow building curl when wolfssl configured with --enable-opensslextra #8315

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/wolfssl.yml
Expand Up @@ -35,7 +35,7 @@ jobs:
tar -xzf v5.0.0-stable.tar.gz
cd wolfssl-5.0.0-stable
./autogen.sh
./configure --enable-tls13 --enable-all --enable-harden --prefix=$HOME/wssl
./configure --enable-tls13 --enable-opensslextra --enable-harden --prefix=$HOME/wssl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you should remove the old --enable-all build but I think adding an --enable-opensslextra is a good ideas. Note that the second build is a lesser wolfSSL build and for example NTLM will not be enabled in your curl build using that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have had a go at splitting the wolfssl CI job in two to test the two configurations.

make && make install

name: 'install wolfssl'
Expand Down
2 changes: 1 addition & 1 deletion lib/curl_sha256.h
Expand Up @@ -32,7 +32,7 @@ extern const struct HMAC_params Curl_HMAC_SHA256[1];
/* SHA256_DIGEST_LENGTH is an enum value in wolfSSL. Need to import it from
* sha.h*/
#include <wolfssl/options.h>
#include <openssl/sha.h>
#include <wolfssl/openssl/sha.h>
#else
#define SHA256_DIGEST_LENGTH 32
#endif
Expand Down
5 changes: 5 additions & 0 deletions lib/md5.c
Expand Up @@ -83,7 +83,12 @@ static void MD5_Final(unsigned char *digest, MD5_CTX *ctx)
#elif defined(USE_OPENSSL_MD5) || defined(USE_WOLFSSL_MD5)

/* When OpenSSL or wolfSSL is available, we use their MD5 functions. */
#if defined(USE_OPENSSL_MD5)
#include <openssl/md5.h>
#elif defined(USE_WOLFSSL_MD5)
#include <wolfssl/openssl/md5.h>
#endif

#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
Expand Down
8 changes: 7 additions & 1 deletion lib/sha256.c
Expand Up @@ -69,8 +69,14 @@

#if defined(USE_OPENSSL_SHA256)

/* When OpenSSL is available we use the SHA256-function from OpenSSL */
/* When OpenSSL or wolfSSL is available is available we use their
* SHA256-functions.
*/
#if defined(USE_OPENSSL)
#include <openssl/evp.h>
#elif defined(USE_WOLFSSL)
#include <wolfssl/openssl/evp.h>
#endif

#include "curl_memory.h"

Expand Down