openssl: bump minimum OpenSSL version to 3.0.0#18330
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Cherry-picked from curl#18330
2e6be13 to
3c4e38c
Compare
non-LibreSSL always includes BoringSSL and AWS-LC, no need to check for them explicitly. Follow-up to 69c89bf curl#18330
The macro has been deleted upstream and never defined in OpenSSL 1.1.0+: openssl/openssl@e481f9b BoringSSL and LibreSSL deleted the last uses in 2014: google/boringssl@6dbd73d libressl/openbsd@7b2f329 Also: - drop internal guard `HAS_ALPN_OPENSSL`. It's always set. Follow-up to 69c89bf #18330 Closes #20129
Macros have been deleted upstream and never defined in OpenSSL 1.1.0+: openssl/openssl@474e469 BoringSSL deleted the last internals uses in 2014: google/boringssl@457112e LibreSSL refers to them internally and in two public headers, but never set them via `openssl/opensslfeatures.h` / `openssl/opensslconf.h`. Follow-up to 69c89bf #18330 Closes #20130
|
is there a way to make easy local changes for those who prefer to stay with latest 1.1.1w? Any particular reason 1.1.1w misses something that's needed after this pr? |
We deliberately took away support for all OpenSSL versions before version 3 because OpenSSL themselves don't provide updates for those versions anymore, unless you are a paying customer of theirs. If you are using the free OpenSSL version, version 1.x.x is now a security risk. If you are paying OpenSSL for support for version 1 and thus not vulnerable, then I am happy to offer you a version of curl with support for OpenSSL 1.x - available with a support contract. So, to get OpenSSL 1.x support:
|
imo anything other than 1.1.1 is a trainwreck afaik. Also, using all those 3+ versions increases all my binaries way too much for no apparent reason. |
|
I tend to agree, but the v3 issues are OpenSSL's and the decision to drop v1 is also OpenSSL's. |
So, does forcing the use of OpenSSL 3.0 or later actually fix any security issues or improve the performance of curl? Or does it just:
Clearly, the performance issues with OpenSSL 3.0 are nothing new or secret; HAProxy has already published a very detailed report: The State of SSL Stacks. I hope you will conduct testing instead of blindly forcing upgrades, similar to how OpenSSL "not conducting testing itself due to a lack of hardware" (quoted from the report). |
|
I hope you will conduct testing instead of blindly forcing upgrades, similar to
how OpenSSL "not conducting testing itself due to a lack of hardware" (quoted
from the report).
Are you volunteering to maintain the OpenSSL 1.x code in curl?
|
|
The OpenSSL project does not ship security updates for v1 anymore, so sticking to that version will be insecure. That's a primary reason. |
After reading that report seems that openssl is a trainwreck project. That's probably the reason why there are a few major forks now maintained (libre, boring, aws). In my case I use libcurl for tiny small part (to make a few requests) and now I cannot update libcurl because my code will use whatever version of openssl is used. This seems like a common case imo Basically, openssl is part of project already, and will not be changed just because of libcurl thinks some version is insecure. |
This is incorrect; not only OpenSSL 1.0.2, but also OpenSSL 1.1.1 still receives security updates (but that's premium support): OpenSSL Release Announcement for 3.6.1, 3.5.5, 3.4.4, 3.3.6, 3.0.19, 1.1.1ze and 1.0.2zn. Generally, even without maintenance, curl should only be forced to use OpenSSL 3.0 if it has at least one of the following:
At least for now, there is no compelling reason for curl to force the use of OpenSSL 3.0. Without a specific benefit, commit 69c89bf is a premature step. |
As of curl version 8.17.0, curl hasn't had any conflicts with OpenSSL 1.x, right? If there are no benefits, improvements, or conflicts, then what reason is there to rush to force curl to use OpenSSL 3.0? |
I'm using OpenSSL 1.1.1 to compile Apache httpd, which is a required part of the process as stated on the homepage:
But in reality, according to the Complete ChangeLog for 2.4, it is still fully compatible and can be built using OpenSSL 1.0.x. (Although there is no concrete evidence,) I think one of the leading reasons why projects (especially large ones) hesitate to upgrade to OpenSSL 3.0 is due to two main reasons: The lack of specific benefits (such as performance) / impacts (such as security) and the poor performance of OpenSSL 3.0. |
well, so far I only have reasons not to switch to ossl3 even if it matches 1.1.1 perf wise: suddenly, all my builds (I use static openssl) are much bigger with whatever new things they added and it seems like I cannot remove that junk. That's based on my personal projects where I don't want to have huge fat builds for no reason for small utils
I'm not sure exactly what issue curl had with old one, but my guess is it's about http3/qic stuff. Afaik there was lots of work related to that in openssl3 and most of the work in curl seems to be happening in http3 (sorry if I'm wrong, just my casual opinion). |
wow, EDIT: doesn't seem like it's on github. Weird, imo it's an extra effort not to tag that 1.1.1ze and not push to public repo. Crazy |
|
The size reductions are stats I found interesting and included in the It wasn't a coincidence that they worked previously, but the result of Fact is, OpenSSL solely supports specific versions of v3+, without According to the page you linked: curl supports a list of other TLS-backends, including 3 forks. None For the state of OpenSSL and its forks, this page offers more links and To remove bloat from OpenSSL 3, this talk gave some hints I've found |
From a quick look imo these guys intentionally create APIs that make it impossible to make small builds:
it would be For this reason you need to pass that giant list of options at build time to disable all the junk that gets pulled in due to such API design: all that is ok for a single all-included build of openssl that's installed once system wide. Not so great if you use static build for some tiny thing.
from that list aws looks something I should switch to imo |
|
> Are you volunteering to maintain the OpenSSL 1.x code in curl?
As of curl version 8.17.0, curl hasn't had any conflicts with OpenSSL 1.x,
right? If there are no benefits, improvements, or conflicts, then what reason
is there to rush to force curl to use OpenSSL 3.0?
Lack of conflicts is only a tiny part of an excuse to support something.
Keeping support around means more convoluted code that affects anyone trying to
work and understand the source. It also means more effort in testing and
chasing flaky tests that inevitably result. And to what effort? The only people
who benefit are either running insecure software (which we actively
discourage), spending effort in backporting security fixes themselves (and
could do the same for curl), or are paying for extended support.
I don't known which category you're in, but you're not volunteering to help
to maintain that support in curl yet you expect us to do it for you, for free,
something that, as far as we can tell, only helps you and your curl-using
device/product/application and nobody else. At the same time, this would make
our own work in maintaining curl for everyone else that much more difficult.
That doesn't make much sense to me.
|
Does curl work with aws-lc? it supports only ossl-3, but aws-lc is 1.1 based API. Do they identify as openssl-3, or curl won't work with them either? |
I tried building curl 8.18.0 with aws-lc, and it compiled normally. Curl seems to be hardcoded for openssl. |
As many other researchers/feedback have shown, size is only a small part of the problem; it's not even as important as the fact that OpenSSL 3 uses more resources than OpenSSL 1.1.1 for the same operation. The main problem with OpenSSL 3 is performance. Of course, with some simple/single-threaded operational checks, the performance degradation won't be obvious. While both curl and OpenSSL are optional dependencies when compiling Apache, OpenSSL is more important and mandatory for using SSL/TLS. For now, I will stick with curl 8.17.0 for compatibility with OpenSSL 1.1.1. There's no reason for me to "snag myself" (switch to OpenSSL 3) only to pay extra for something that was "originally free" (besides paying extra for OpenSSL premium support, now I need to pay even more for curl premium support - if I want to use OpenSSL 1.1.1 on the latest curl version, or pay extra to expand my server to meet the performance "expansion" of OpenSSL 3). In short, the balance between cost, support, security, and performance is a "difficult" problem, but currently, for me, curl security < cost + support + performance. Curl 8.17.0 currently has no serious security vulnerabilities, while OpenSSL's premium support has addressed all security vulnerabilities. |
AWS-LC works, yes. It identifies as AWS-LC: https://github.com/curl/curl/actions/runs/22185835526/job/64159205992#step:44:32 |


It also means that all supported OpenSSL versions and forks support
TLSv1.3 after this patch.
It reduces
openssl.csize by more than 10%, or 400 LOC.Ref: #18822
HAVE_BORINGSSL_LIKEinternal macro #18358 openssl: drop more legacy cruft #18359 openssl: add and useHAVE_OPENSSL3internal macro #18360HAVE_OPENSSL_VERSIONmacro #18367, drop pre-OpenSSL 3 non-fork logic.#ifblocks #18370.