[Privoxy-devel] Compile errors with --with-wolfssl

Ian Silvester iansilvester at fastmail.fm
Wed Jun 17 23:05:26 CEST 2026


Hi,

I am dissatisfied with the pre-requisites for building OpenSSL from source so I thought I'd try one of our alternative SSL libraries; I picked WolfSSL for no reason other than I remembered the name before mbedTLS ;)

I noticed this warning at the end of running WolfSSL's ./configure:

Note: Make sure your application includes "wolfssl/options.h" before any other wolfSSL headers.
      You can define "WOLFSSL_USE_OPTIONS_H" in your application to include this automatically.

I didn't find this #define anywhere in our code.

Our ./configure ran cleanly, but make threw the errors below. Might the cause be as simple as the lack of the #define above?

Ian



gcc -std=gnu23 -c -pipe -O2 -mdynamic-no-pic -mcpu=apple-m1  -I/usr/local/include/ -I/usr/local/include/wolfssl -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch arm64 -mmacosx-version-min=11.0 -DNDEBUG   -Dunix -Wall  wolfssl.c -o wolfssl.o
wolfssl.c:59:53: error: unknown type name 'X509'
   59 | static int ssl_store_cert(struct client_state *csp, X509 *crt);
      |                                                     ^
wolfssl.c:78:2: warning: wolfSSL has been compiled without WOLFSSL_ALT_CERT_CHAINS [-W#warnings]
   78 | #warning wolfSSL has been compiled without WOLFSSL_ALT_CERT_CHAINS
      |  ^
wolfssl.c:251:12: error: use of undeclared identifier 'EVP_PKEY_RSA'
  251 |       case EVP_PKEY_RSA:
      |            ^~~~~~~~~~~~
wolfssl.c:253:12: error: use of undeclared identifier 'EVP_PKEY_DSA'
  253 |       case EVP_PKEY_DSA:
      |            ^~~~~~~~~~~~
wolfssl.c:255:12: error: use of undeclared identifier 'EVP_PKEY_EC'
  255 |       case EVP_PKEY_EC:
      |            ^~~~~~~~~~~
wolfssl.c:279:53: error: unknown type name 'X509'
  279 | static int ssl_store_cert(struct client_state *csp, X509 *cert)
      |                                                     ^
wolfssl.c:284:23: error: use of undeclared identifier 'BIO_new'
  284 |    WOLFSSL_BIO *bio = BIO_new(BIO_s_mem());
      |                       ^~~~~~~
wolfssl.c:284:31: error: use of undeclared identifier 'BIO_s_mem'
  284 |    WOLFSSL_BIO *bio = BIO_new(BIO_s_mem());
      |                               ^~~~~~~~~
wolfssl.c:319:8: error: use of undeclared identifier 'wolfSSL_PEM_write_bio_X509'; did you mean 'wolfSSL_PEM_write_X509'?
  319 |    if (wolfSSL_PEM_write_bio_X509(bio, cert) != WOLFSSL_SUCCESS)
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |        wolfSSL_PEM_write_X509
/usr/local/include/wolfssl/openssl/pem.h:231:5: note: 'wolfSSL_PEM_write_X509' declared here
  231 | int wolfSSL_PEM_write_X509(XFILE fp, WOLFSSL_X509 *x);
      |     ^
wolfssl.c:326:10: error: use of undeclared identifier 'wolfSSL_BIO_get_mem_data'; did you mean 'wolfSSL_RSA_get_ex_data'?
  326 |    len = wolfSSL_BIO_get_mem_data(bio, &bio_mem_data);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
      |          wolfSSL_RSA_get_ex_data
/usr/local/include/wolfssl/openssl/rsa.h:213:19: note: 'wolfSSL_RSA_get_ex_data' declared here
  213 | WOLFSSL_API void* wolfSSL_RSA_get_ex_data(const WOLFSSL_RSA *rsa, int idx);
      |                   ^
wolfssl.c:326:35: warning: incompatible pointer types passing 'WOLFSSL_BIO *' (aka 'struct WOLFSSL_BIO *') to parameter of type 'const WOLFSSL_RSA *' (aka 'const struct WOLFSSL_RSA *') [-Wincompatible-pointer-types]
  326 |    len = wolfSSL_BIO_get_mem_data(bio, &bio_mem_data);
      |                                   ^~~
/usr/local/include/wolfssl/openssl/rsa.h:213:62: note: passing argument to parameter 'rsa' here
  213 | WOLFSSL_API void* wolfSSL_RSA_get_ex_data(const WOLFSSL_RSA *rsa, int idx);
      |                                                              ^
wolfssl.c:326:40: error: incompatible pointer to integer conversion passing 'char **' to parameter of type 'int' [-Wint-conversion]
  326 |    len = wolfSSL_BIO_get_mem_data(bio, &bio_mem_data);
      |                                        ^~~~~~~~~~~~~
/usr/local/include/wolfssl/openssl/rsa.h:213:71: note: passing argument to parameter 'idx' here
  213 | WOLFSSL_API void* wolfSSL_RSA_get_ex_data(const WOLFSSL_RSA *rsa, int idx);
      |                                                                       ^
wolfssl.c:326:8: error: incompatible pointer to integer conversion assigning to 'long' from 'void *' [-Wint-conversion]
  326 |    len = wolfSSL_BIO_get_mem_data(bio, &bio_mem_data);
      |        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wolfssl.c:339:4: error: use of undeclared identifier 'wolfSSL_BIO_free'; did you mean 'wolfSSL_BN_free'?
  339 |    wolfSSL_BIO_free(bio);
      |    ^~~~~~~~~~~~~~~~
      |    wolfSSL_BN_free
/usr/local/include/wolfssl/openssl/bn.h:98:28: note: 'wolfSSL_BN_free' declared here
   98 | WOLFSSL_API void           wolfSSL_BN_free(WOLFSSL_BIGNUM* bn);
      |                            ^
wolfssl.c:339:21: warning: incompatible pointer types passing 'WOLFSSL_BIO *' (aka 'struct WOLFSSL_BIO *') to parameter of type 'WOLFSSL_BIGNUM *' (aka 'struct WOLFSSL_BIGNUM *') [-Wincompatible-pointer-types]
  339 |    wolfSSL_BIO_free(bio);
      |                     ^~~
/usr/local/include/wolfssl/openssl/bn.h:98:60: note: passing argument to parameter 'bn' here
   98 | WOLFSSL_API void           wolfSSL_BN_free(WOLFSSL_BIGNUM* bn);
      |                                                            ^
wolfssl.c:340:10: error: use of undeclared identifier 'wolfSSL_BIO_new'; did you mean 'wolfSSL_BN_new'?
  340 |    bio = wolfSSL_BIO_new(wolfSSL_BIO_s_mem());
      |          ^~~~~~~~~~~~~~~
      |          wolfSSL_BN_new
/usr/local/include/wolfssl/openssl/bn.h:94:29: note: 'wolfSSL_BN_new' declared here
   94 | WOLFSSL_API WOLFSSL_BIGNUM* wolfSSL_BN_new(void);
      |                             ^
wolfssl.c:340:26: error: use of undeclared identifier 'wolfSSL_BIO_s_mem'
  340 |    bio = wolfSSL_BIO_new(wolfSSL_BIO_s_mem());
      |                          ^~~~~~~~~~~~~~~~~
wolfssl.c:351:8: error: use of undeclared identifier 'wolfSSL_X509_get_version'; did you mean 'wolfSSL_X509_version'?
  351 |    l = wolfSSL_X509_get_version(cert);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~
      |        wolfSSL_X509_version
/usr/local/include/wolfssl/ssl.h:3486:17: note: 'wolfSSL_X509_version' declared here
 3486 | WOLFSSL_API int wolfSSL_X509_version(WOLFSSL_X509* x509);
      |                 ^
wolfssl.c:354:11: error: use of undeclared identifier 'wolfSSL_BIO_printf'; did you mean 'wolfSSL_BN_print_fp'?
  354 |       if (wolfSSL_BIO_printf(bio, "cert. version     : %ld\n", l + 1) <= 0)
      |           ^~~~~~~~~~~~~~~~~~
      |           wolfSSL_BN_print_fp
/usr/local/include/wolfssl/openssl/bn.h:184:21: note: 'wolfSSL_BN_print_fp' declared here
  184 |     WOLFSSL_API int wolfSSL_BN_print_fp(XFILE fp, const WOLFSSL_BIGNUM *bn);
      |                     ^
wolfssl.c:354:64: error: too many arguments to function call, expected 2, have 3
  354 |       if (wolfSSL_BIO_printf(bio, "cert. version     : %ld\n", l + 1) <= 0)
      |           ~~~~~~~~~~~~~~~~~~                                   ^~~~~
/usr/local/include/wolfssl/openssl/bn.h:184:21: note: 'wolfSSL_BN_print_fp' declared here
  184 |     WOLFSSL_API int wolfSSL_BN_print_fp(XFILE fp, const WOLFSSL_BIGNUM *bn);
      |                     ^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wolfssl.c:363:11: error: use of undeclared identifier 'wolfSSL_BIO_printf'; did you mean 'wolfSSL_BN_print_fp'?
  363 |       if (wolfSSL_BIO_printf(bio, "cert. version     : Unknown (%ld)\n", l) <= 0)
      |           ^~~~~~~~~~~~~~~~~~
      |           wolfSSL_BN_print_fp
/usr/local/include/wolfssl/openssl/bn.h:184:21: note: 'wolfSSL_BN_print_fp' declared here
  184 |     WOLFSSL_API int wolfSSL_BN_print_fp(XFILE fp, const WOLFSSL_BIGNUM *bn);
      |                     ^
wolfssl.c:363:74: error: too many arguments to function call, expected 2, have 3
  363 |       if (wolfSSL_BIO_printf(bio, "cert. version     : Unknown (%ld)\n", l) <= 0)
      |           ~~~~~~~~~~~~~~~~~~                                             ^
/usr/local/include/wolfssl/openssl/bn.h:184:21: note: 'wolfSSL_BN_print_fp' declared here
  184 |     WOLFSSL_API int wolfSSL_BN_print_fp(XFILE fp, const WOLFSSL_BIGNUM *bn);
      |                     ^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
make: *** [wolfssl.o] Error 1


More information about the Privoxy-devel mailing list