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

Enable MultiSSL in winbuild #3772

Closed
wants to merge 2 commits into from
Closed

Conversation

Jan-E
Copy link
Contributor

@Jan-E Jan-E commented Apr 12, 2019

This patch enables support for MultiSSL for OpenSSL and Schannel in /winbuild by

  1. Removing the lines in winbuild/Makefile.vc that generate an error with multiple SSL backends
  2. Add /DCURL_WITH_MULTI_SSL in winbuild/MakefileBuild.vc if both USE_WINSSL and USE_SSL are set

See https://curl.haxx.se/mail/lib-2019-04/0032.html for the discussion in the curl-library mailinglist.

Copy link

@vjardin vjardin left a comment

Choose a reason for hiding this comment

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

Ok

Copy link
Member

@jay jay left a comment

Choose a reason for hiding this comment

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

I don't think it can be done this way. The other makefiles only have OpenSSL and WinSSL so that might be ok but this one allows for more than that iirc so CURL_WITH_MULTI_SSL would have to be set if any combination of 2 or more are enabled. configure.ac does it like this:

curl/configure.ac

Lines 2693 to 2713 in 521bbbe

case "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$MBEDTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED$SECURETRANSPORT_ENABLED$MESALINK_ENABLED$AMISSL_ENABLED" in
x)
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink or --with-amissl to address this.])
;;
x1)
# one SSL backend is enabled
AC_SUBST(SSL_ENABLED)
SSL_ENABLED="1"
AC_MSG_NOTICE([built with one SSL backend])
;;
*)
# more than one SSL backend is enabled
AC_SUBST(SSL_ENABLED)
SSL_ENABLED="1"
AC_SUBST(CURL_WITH_MULTI_SSL)
CURL_WITH_MULTI_SSL="1"
AC_DEFINE(CURL_WITH_MULTI_SSL, 1, [built with multiple SSL backends])
AC_MSG_NOTICE([built with multiple SSL backends])
;;
esac

@Jan-E
Copy link
Contributor Author

Jan-E commented Apr 13, 2019

There are 3 possible SSL backends that can be enabled with /winbuild:

  1. USE_SSL (= OpenSSL)
  2. USE_WINSSL
  3. USE_MBEDTLS

The second commit in this PR reintroduces the original checks to prohibit multiple backends for the purpose of enabling CURL_WITH_MULTI_SSL

!IF ( "$(USE_SSL)"=="true" && "$(USE_WINSSL)"=="true" ) \
 || ( "$(USE_SSL)"=="true" && "$(USE_MBEDTLS)"=="true" ) \
 || ( "$(USE_MBEDTLS)"=="true" && "$(USE_WINSSL)"=="true" )
CFLAGS = $(CFLAGS) /DCURL_WITH_MULTI_SSL
!ENDIF

Tested only with the combination of USE_SSL and USE_WINSSL, but should be working for any combination with USE_MBEDTLS as well.

@jay jay closed this in 79c4864 Apr 13, 2019
@jay
Copy link
Member

jay commented Apr 13, 2019

Thanks

@Jan-E Jan-E deleted the multissl-winbuild branch April 14, 2019 02:02
@lock lock bot locked as resolved and limited conversation to collaborators Jul 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants