Skip to content

configure: make the TLS library choice(s) explicit - #6897

Closed
bagder wants to merge 5 commits into
masterfrom
bagder/configure-explicit-tls
Closed

configure: make the TLS library choice(s) explicit#6897
bagder wants to merge 5 commits into
masterfrom
bagder/configure-explicit-tls

Conversation

@bagder

@bagder bagder commented Apr 15, 2021

Copy link
Copy Markdown
Member

With this, configure no longer tries to find a TLS library by default, but all libraries are now equal: the user needs to explicitly ask what TLS library or libraries to use.

If no TLS library is selected, configure will error out unless --without-ssl is explicitly used to request a build without TLS (as that is rare these days).

Update: this also removes --with-winssl and --with-darwinssl as they've been deprecated since 2019

@jay

jay commented Apr 15, 2021

Copy link
Copy Markdown
Member

why? this will break some builds and seems unnecessary

@bagder

bagder commented Apr 15, 2021

Copy link
Copy Markdown
Member Author

Any kind of auto-detection have to use an order of detecting the libraries that makes us have to choose that order of preference. This way, we remove ourselves from making that decision. Without a change like this, we implicitly say that OpenSSL is to prefer, while I'm not sure that's a good leg to lean on forever.

(I also wanted to remove the need for --without-ssl or --without-openssl when selecting another TLS backend, but I will agree that it can be done without forcing the user to make this selection.)

@bagder
bagder force-pushed the bagder/configure-explicit-tls branch from 7a80beb to 48d6bdd Compare April 15, 2021 08:56
@bagder

bagder commented Apr 15, 2021

Copy link
Copy Markdown
Member Author

@mback2k it'd be great if you could update your buildbots' configure invokes to use --with-schannel instead of the deprecated --with-winssl - so that we can make sure things build fine there as well with this change.

@bagder

bagder commented Apr 15, 2021

Copy link
Copy Markdown
Member Author

This change highlights an existing problem we didn't notice before: the three azure pipelines builds msys1_*debug_openssl all fail to detect OpenSSL in configure and therefore builds and continues with TLS disabled. Contrary to expectations.

With this change, those configure runs instead return failure. Ie the problem exists since before this change, but now we see it better.

@mback2k do you know what we can do to make openssl detected and used in those builds?

@bagder

bagder commented Apr 15, 2021

Copy link
Copy Markdown
Member Author

The appveyor builds similarly build without TLS enabled (== fail to detect any). I'll try to enable schannel for those.

@bagder
bagder force-pushed the bagder/configure-explicit-tls branch from efb48f5 to 5a2438b Compare April 15, 2021 21:32
bagder added a commit that referenced this pull request Apr 16, 2021
configure no longer tries to find a TLS library by default, but all
libraries are now equal: the user needs to explicitly ask what TLS
library or libraries to use.

If no TLS library is selected, configure will error out unless
--without-ssl is explicitly used to request a built without TLS (as that
is very rare these days).

Removes: --with-winssl, --with-darwinssl and all --without-* options for
TLS libraries.

Closes #6897
@bagder
bagder force-pushed the bagder/configure-explicit-tls branch from c8c6552 to 0937c85 Compare April 16, 2021 08:45
@mback2k

mback2k commented Apr 16, 2021

Copy link
Copy Markdown
Member

@mback2k it'd be great if you could update your buildbots' configure invokes to use --with-schannel instead of the deprecated --with-winssl - so that we can make sure things build fine there as well with this change.

Done since yesterday evening.

@mback2k do you know what we can do to make openssl detected and used in those builds?

No idea yet, but I will look into this over the weekend.

bagder added a commit that referenced this pull request Apr 17, 2021
configure no longer tries to find a TLS library by default, but all
libraries are now equal: the user needs to explicitly ask what TLS
library or libraries to use.

If no TLS library is selected, configure will error out unless
--without-ssl is explicitly used to request a built without TLS (as that
is very rare these days).

Removes: --with-winssl, --with-darwinssl and all --without-* options for
TLS libraries.

Closes #6897
@bagder
bagder force-pushed the bagder/configure-explicit-tls branch from 0937c85 to dad89ce Compare April 17, 2021 16:29
@mback2k

mback2k commented Apr 20, 2021

Copy link
Copy Markdown
Member

After checking the available packages for classic MinGW, I think there is no native OpenSSL package available. Just the msys1-environment specific msys-openssl package that won't work for native Windows builds and is most likely already present in the build environment due to being a dependency of other packages. So I guess we have 2 options now:

  1. remove the 3 superfluous builds as suggested in this PR
  2. turn them into builds without SSL since I guess we don't have any such builds on native Windows yet

@mback2k

mback2k commented Apr 20, 2021

Copy link
Copy Markdown
Member

While option 2 basically restores the previous CI situation. Another option could be to build OpenSSL for these CI variants, but I don't think it's worth the effort.

@bagder

bagder commented Apr 20, 2021

Copy link
Copy Markdown
Member Author

ok, let's switch off TLS in those builds for now

bagder added a commit that referenced this pull request Apr 20, 2021
configure no longer tries to find a TLS library by default, but all
libraries are now equal: the user needs to explicitly ask what TLS
library or libraries to use.

If no TLS library is selected, configure will error out unless
--without-ssl is explicitly used to request a built without TLS (as that
is very rare these days).

Removes: --with-winssl, --with-darwinssl and all --without-* options for
TLS libraries.

Closes #6897
@bagder
bagder force-pushed the bagder/configure-explicit-tls branch from dad89ce to 9ecbd08 Compare April 20, 2021 22:25
Comment thread .azure-pipelines.yml
Comment thread .azure-pipelines.yml Outdated
Comment thread .github/workflows/macos.yml Outdated
bagder added 4 commits April 22, 2021 14:55
Fixes test 1165 when functions are moved from configure.ac to files in
m4/
configure no longer tries to find a TLS library by default, but all
libraries are now equal: the user needs to explicitly ask what TLS
library or libraries to use.

If no TLS library is selected, configure will error out unless
--without-ssl is explicitly used to request a built without TLS (as that
is very rare these days).

Removes: --with-winssl, --with-darwinssl and all --without-* options for
TLS libraries.

Closes #6897
... and put those functions in separate m4 files per TLS library.
@bagder
bagder force-pushed the bagder/configure-explicit-tls branch from 48490b2 to 997ed8e Compare April 22, 2021 12:58
@bagder bagder closed this in 68d89f2 Apr 22, 2021
@bagder
bagder deleted the bagder/configure-explicit-tls branch April 22, 2021 21:22
TisVictress pushed a commit to cloudfoundry/buildpacks-ci that referenced this pull request May 26, 2021
- Related PR: curl/curl#6897

Co-authored-by: Brayan Henao <bhenao@vmware.com>
algitbot pushed a commit to alpinelinux/aports that referenced this pull request May 27, 2021
Contains fixes for the following vulnerabilities in 7.76.1:

* CVE-2021-22897
* CVE-2021-22898
* CVE-2021-22901

Also explicitly use OpenSSL as the TLS library, which is necessary
following the merge of curl/curl#6897.
algitbot pushed a commit to alpinelinux/aports that referenced this pull request May 27, 2021
Contains fixes for the following vulnerabilities in 7.76.1:

* CVE-2021-22897
* CVE-2021-22898
* CVE-2021-22901

Also explicitly use OpenSSL as the TLS library, which is necessary
following the merge of curl/curl#6897.
algitbot pushed a commit to alpinelinux/aports that referenced this pull request May 27, 2021
Contains fixes for the following vulnerabilities in 7.76.1:

* CVE-2021-22897
* CVE-2021-22898
* CVE-2021-22901

Also explicitly use OpenSSL as the TLS library, which is necessary
following the merge of curl/curl#6897.
@dscho

dscho commented May 27, 2021

Copy link
Copy Markdown
Contributor

why? this will break some builds and seems unnecessary

It's actually a bit worse: it does not break builds. At least here, I was building Git for Windows' cURL package using --with-winssl and it did not fail to build. What it failed was to tell me that I should fix by build script already ;-)

@bagder

bagder commented May 27, 2021

Copy link
Copy Markdown
Member Author

Oh, you mean when you actually wanted schannel and OpenSSL ... I didn't think about case that's true! 😞

@dscho

dscho commented May 27, 2021

Copy link
Copy Markdown
Contributor

Oh, you mean when you actually wanted schannel and OpenSSL ... I didn't think about case that's true! 😞

Not a big deal, but do you think there might be a way to error out upon unhandled --with-<something> options?

@MarcelRaad

Copy link
Copy Markdown
Member

It was similar for me: I had --without-ssl --win-winssl, which previously enabled schannel and now builds without SSL quietly.

@stanhu

stanhu commented Nov 12, 2021

Copy link
Copy Markdown
Contributor

#7994 should fix the handling of --without-* flags.

tdf-gerrit pushed a commit to LibreOffice/core that referenced this pull request Mar 11, 2026
See curl/curl#6897

Change-Id: I99013a9b646dbd317a6840c61939f97b256c25a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201447
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
vszakats added a commit that referenced this pull request May 27, 2026
Omit checking `OPT_<BACKEND>` against `no` twice.

Also:
- openssl: drop stray `OPT_OPENSSL=off` check.
  Follow-up to 68d89f2 #6897
- rustls: drop no-op line.
  Follow-up to 9c42098 #13202
- gnutls: fix casing in comment.
- merge `if` branches where possible after these changes.

Closes #21781
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
Omit checking `OPT_<BACKEND>` against `no` twice.

Also:
- openssl: drop stray `OPT_OPENSSL=off` check.
  Follow-up to 68d89f2 curl#6897
- rustls: drop no-op line.
  Follow-up to 9c42098 curl#13202
- gnutls: fix casing in comment.
- merge `if` branches where possible after these changes.

Closes curl#21781
tdf-gerrit pushed a commit to LibreOffice/core that referenced this pull request Jul 7, 2026
This commit contains:

curl: no longer necessary to use --without-[TLS library name] options

See curl/curl#6897

Change-Id: I99013a9b646dbd317a6840c61939f97b256c25a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201447
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit f946ee2)

curl: hyper support was dropped in 8.12

See curl/curl#15120

Change-Id: I78201cc07f5b74b039b78b7c168f2e2fe84766f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201459
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
(cherry picked from commit d881b75)

curl: migrate to CMake on Windows

it fails to build without WINBUILD_ACKNOWLEDGE_DEPRECATED with
WARNING:

The winbuild build system is deprecated and will be removed in
September 2025 in favor of the CMake build system.

curl dropped winbuild support in 8.17.
See https://curl.se/ch/8.17.0.html

Change-Id: I236414c670d1d62d82c5a430e2abdbf71a50a2ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201470
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
(cherry picked from commit 1ec1b40)

curl: drop leftover from 1ec1b40

Change-Id: I656a68ad489937baf37fe7d406861827bbff66f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201599
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
(cherry picked from commit 437f5e6)

use cmake from visual studio extensions in cygwin

Change-Id: Id3b895e8833dd65457f4c03791f2aa698c4a27ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201805
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit fd9058c)

fix typo from fd9058c

Change-Id: I86e5826efb598e61b2ae1d27bd1ec104d9302aac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201848
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
(cherry picked from commit 1f6847a)

use cmake from VS extensions in WSL too

See https://gerrit.libreoffice.org/c/core/+/201805/comment/bc56beb5_4fb2fc27/

Change-Id: I3203d620270035d21b57f1be497d851119c04b40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201890
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
(cherry picked from commit e403e84)

curl: upgrade to 8.19.0

--with-secure-transport was dropped in curl 8.15,
so replace it with --with-openssl --with-apple-sectrust,
which was added in curl 8.17

Remove all patches fixed upstream

Downloaded from https://curl.se/download/curl-8.19.0.tar.xz

Change-Id: Ic93d8e3ef637d2adf84454c4e0375d1bf4620870
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201850
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
(cherry picked from commit 8a9e4e8)

curl: upgrade to 8.20.0

Downloaded from https://curl.se/download/curl-8.20.0.tar.xz

Change-Id: I3a1e5f316a1d20565bb5da369b280c10ed5c2869
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204563
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit efddae2)

curl: upgrade to 8.21.0

Downloaded from https://curl.se/download/curl-8.21.0.tar.xz

Change-Id: Idbf678a0e00e2c7a802dbaad8439ec24b253ef57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207281
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
(cherry picked from commit 57d226b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207673
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
tdf-gerrit pushed a commit to LibreOffice/core that referenced this pull request Jul 7, 2026
This commit contains:

curl: no longer necessary to use --without-[TLS library name] options

See curl/curl#6897

Change-Id: I99013a9b646dbd317a6840c61939f97b256c25a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201447
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit f946ee2)

curl: hyper support was dropped in 8.12

See curl/curl#15120

Change-Id: I78201cc07f5b74b039b78b7c168f2e2fe84766f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201459
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
(cherry picked from commit d881b75)

curl: migrate to CMake on Windows

it fails to build without WINBUILD_ACKNOWLEDGE_DEPRECATED with
WARNING:

The winbuild build system is deprecated and will be removed in
September 2025 in favor of the CMake build system.

curl dropped winbuild support in 8.17.
See https://curl.se/ch/8.17.0.html

Change-Id: I236414c670d1d62d82c5a430e2abdbf71a50a2ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201470
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
(cherry picked from commit 1ec1b40)

curl: drop leftover from 1ec1b40

Change-Id: I656a68ad489937baf37fe7d406861827bbff66f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201599
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
(cherry picked from commit 437f5e6)

use cmake from visual studio extensions in cygwin

Change-Id: Id3b895e8833dd65457f4c03791f2aa698c4a27ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201805
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit fd9058c)

fix typo from fd9058c

Change-Id: I86e5826efb598e61b2ae1d27bd1ec104d9302aac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201848
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
(cherry picked from commit 1f6847a)

use cmake from VS extensions in WSL too

See https://gerrit.libreoffice.org/c/core/+/201805/comment/bc56beb5_4fb2fc27/

Change-Id: I3203d620270035d21b57f1be497d851119c04b40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201890
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
(cherry picked from commit e403e84)

curl: upgrade to 8.19.0

--with-secure-transport was dropped in curl 8.15,
so replace it with --with-openssl --with-apple-sectrust,
which was added in curl 8.17

Remove all patches fixed upstream

Downloaded from https://curl.se/download/curl-8.19.0.tar.xz

Change-Id: Ic93d8e3ef637d2adf84454c4e0375d1bf4620870
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201850
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
(cherry picked from commit 8a9e4e8)

curl: upgrade to 8.20.0

Downloaded from https://curl.se/download/curl-8.20.0.tar.xz

Change-Id: I3a1e5f316a1d20565bb5da369b280c10ed5c2869
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204563
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit efddae2)

curl: upgrade to 8.21.0

Downloaded from https://curl.se/download/curl-8.21.0.tar.xz

Change-Id: Idbf678a0e00e2c7a802dbaad8439ec24b253ef57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207281
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
(cherry picked from commit 57d226b)
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207689
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

6 participants