Skip to content

Enable MultiSSL in winbuild - #3772

Closed
Jan-E wants to merge 2 commits into
curl:masterfrom
Jan-E:multissl-winbuild
Closed

Enable MultiSSL in winbuild#3772
Jan-E wants to merge 2 commits into
curl:masterfrom
Jan-E:multissl-winbuild

Conversation

@Jan-E

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

Copy link
Copy Markdown
Contributor

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 vjardin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ok

@jay jay left a comment

Copy link
Copy Markdown
Member

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

Jan-E commented Apr 13, 2019

Copy link
Copy Markdown
Contributor Author

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

jay commented Apr 13, 2019

Copy link
Copy Markdown
Member

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.

3 participants