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

Conversation

@Jan-E
Copy link
Contributor

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.

@vjardin

This comment has been minimized.

Copy link

commented on 471b415 Apr 12, 2019

LGTM

Copy link

left a comment

Ok

Copy link
Member

left a comment

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Apr 13, 2019

Thanks

@Jan-E Jan-E deleted the Jan-E:multissl-winbuild branch Apr 14, 2019
@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.
Projects
None yet
3 participants
You can’t perform that action at this time.