curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Unable to build Curl 7.86.0 with both Schannel and OpenSSL support.

From: Peter Kitson via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 7 Nov 2022 21:33:17 +0000

Hello Curl developers,

Prior to release 7.86.0, I've been able to build Curl with both Schannel
and OpenSSL support (using MSVC), but now get an error:

[ 66%] Building C object lib/CMakeFiles/libcurl.dir/vtls/openssl.c.obj
openssl.c
C:\Apache24\include\openssl/x509v3.h(181): error C2059: syntax error: '('
C:\Apache24\include\openssl/x509v3.h(188): error C2059: syntax error:
'<parameter-list>'
C:\Apache24\include\openssl/x509v3.h(193): error C2059: syntax error: '}'
C:\Apache24\include\openssl/x509v3.h(194): error C2059: syntax error: '}'
C:\Apache24\include\openssl/x509v3.h(198): error C2061: syntax error:
identifier 'GENERAL_NAME'
C:\Apache24\include\openssl/x509v3.h(199): error C2059: syntax error: '}'
etc

Line 181 of x509v3.h doesn't contain a '(' - it's part way through a struct
definition.

Comparing vtls/openssl.h for versions 7.85.0 and 7.86.0, there's actually a
comment relating to Schannel and OpenSSL support in both, which says:

/*
 * In an effort to avoid using 'X509 *' here, we instead use the struct
 * x509_st version of the type so that we can forward-declare it here
without
 * having to include <openssl/x509v3.h>. Including that header causes name
 * conflicts when libcurl is built with both Schannel and OpenSSL support.
 */

The key issue is the 7.86.0 version of vtls/openssl.h DOES now include
openssl/ssl.h which in turn includes openssl/x509v3.h. Hence we now get a
name conflict with something in the Schannel code?

Are you able to update the OpenSSL header file to avoid whatever conflict
is occuring, in a similar manner that resulted in the comment you've
previously noted?

Thanks, tangent


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-11-07