Topic: Can't get cURL with wolfSSL to work

Hi!

I have been using Curllib for regular ftp transfer but need to make it work for sftp as well. I wanted to use wolfSSL for this and I followed the build instructions on how to build ssl and ssh for Visual studio and that worked without any issue what I can see.

Now I need to build curllib and I selected "Lib wolfSSL" in the curl visual studion project (I have tried both release and debug, 32 and 64 bit with same result). I setup the include directories so it found the wolf .h files but it wont't build without errors.

I get a lot of errors but I think a lot of them depends on these:
Error    C2027    use of undefined type 'sha256_ctx'
Error    C2061    syntax error: identifier 'EVP_MD_CTX'

The error comes from these lines in sha256.c

#if defined(USE_OPENSSL_SHA256)

struct sha256_ctx {
  EVP_MD_CTX *openssl_ctx;
}; is not defined

I found EVP_MD_CTX in the file 'compat_types.h' but that file is not referenced anywere in the project.

so its is strange that USE_OPENSSL_SHA256 is defined since that will create errors.

#ifdef USE_WOLFSSL
#include <wolfssl/options.h>
#ifndef NO_SHA256
#define USE_OPENSSL_SHA256
#endif
#endif

USE_OPENSSL_SHA256 is defined since NO_SHA256 is NOT, but defining it created just a whole lot of other errors so defining it wasn't the solution.

So I'm stuck at the moment since I can't find any information regarding how to solve this.

Share

Re: Can't get cURL with wolfSSL to work

Hi Samuel,

It looks like you are not enabling our OpenSSL compatibility layer when building curl, this implements EVP_MD_CTX and many other OpenSSL types/functions.  Please share your build settings for wolfSSL and wolfSSL version.  You should be building wolfSSL with --enable-curl to use it with curl.

Thanks,
Kareem

Share

Re: Can't get cURL with wolfSSL to work

Hi

I used the 'wolfssl64.sln' file that is included to build SSL. So should I add something to the preprocessor directive?

Share