Skip to content

Make OpenSSL auto-enable by default#2407

Draft
yadij wants to merge 7 commits intosquid-cache:masterfrom
yadij:arc-openssl3-default
Draft

Make OpenSSL auto-enable by default#2407
yadij wants to merge 7 commits intosquid-cache:masterfrom
yadij:arc-openssl3-default

Conversation

@yadij
Copy link
Copy Markdown
Contributor

@yadij yadij commented Apr 14, 2026

Require OpenSSL v3 library minimum due to GPL license
compatibility with older OpenSSL versions.

Older versions still supported, but require
LIBOPENSSL_LIBS="-lssl -lcrypto"

yadij added 5 commits April 14, 2026 22:02
Require OpenSSL v3 library.

Older versions still supported, but require
  LIBOPENSSL_LIBS="-lssl -lcrypto"
Command:
  git grep -l USE_OPENSSL | while read f; do
   sed -i -e 's/[ ]USE_OPENSSL/ HAVE_LIBOPENSSL/g' \
       -e 's/!USE_OPENSSL/!HAVE_LIBOPENSSL/g' $f
  done

The prefix character is important to avoid changing
other macros which contain the substring verbatim.
OpenSSL library was the only use of this
autoconf macro. We can finally drop it.
This test case used to be folded into the layer-00-default
becasue OpenSSL was auto-disabled.

Now that OpenSSL is auto-enabled we need to check it
explicitly to ensure that GnuTLS-only environments
still build properly.
@yadij yadij added feature maintainer needs documentation updates for merge S-waiting-for-QA QA team action is needed (and usually required) labels Apr 14, 2026
@yadij
Copy link
Copy Markdown
Contributor Author

yadij commented Apr 14, 2026

See individual commit messages for details on the relevant step of the total upgrade.

Copy link
Copy Markdown
Contributor

@rousskov rousskov left a comment

Choose a reason for hiding this comment

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

I continue to beg you to stop posting new pull requests until the growing backlog is dealt with.


srcdir=`dirname $0`

# Everything is supposed to work when OpenSSL is not available.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree that "everything is supposed to work when OpenSSL is not available", but "everything but OpenSSL" case is not special enough to deserve adding a whole buildtest layer for it IMO. We do not have a layer dedicated to testing "everything but GnuTLS" builds. Same for all other optional libraries. Let's not start adding such layers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The "everything but GnuTLS" is folded into the maximus layer on our CI nodes - by way of how OpenSSL enabled overrides the #elif HAVE_LIBGNUTLS.

When OpenSSL is auto-enabled the "default" and "maximus" layers start doing the same things. We loose the "everything but OpenSSL" which was, until this PR, folded into "default". Thus the new layer.

Comment thread configure.ac
## For some OS pkg-config is broken or unavailable.
## Detect libraries the hard way.

PKG_CHECK_MODULES([LIBOPENSSL],[openssl >= 3],[:],[
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR description: Require OpenSSL v3 library minimum due to GPL license compatibility with older OpenSSL versions.

Regardless of whether there is such (in)compatibility, I do not see enough reasons to restrict OpenSSL version like this. If folks install OpenSSL v1 but do not want to build with it, they can use --without-openssl or equivalent. A simpler/less-restrictive default is better for developers and in most deployment cases.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I choose not to surprise our users with potential legal problems by default.

As mentioned in the PR description it is easy for the (few already and decreasing) builders who do not have v3 available to enable the legacy openssl support.

Comment thread src/errorpage.cc
#include "auth/UserRequest.h"
#endif
#if USE_OPENSSL
#if HAVE_LIBOPENSSL
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Modifying 80+ files to rename this frequently used macro is not a good idea, especially with our backlog of changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Meh. Everything you put off "because backlog" is just another entry on that backlog of yours.
I spent a few hours trying workarounds, but none worked well enough so I have left the collisions for a later pre-merge decision.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Meh. Everything you put off "because backlog" is just another entry on that backlog of yours.

"That backlog" is Squid Project backlog; it is not just "mine" or "yours". It has very serious negative effects on nearly all Squid development, by all core developers, including this pull request. My numerous attempts to resolve that problem have failed so far, but ignoring it and posting more pull requests like this one only makes things worse.

@yadij yadij requested a review from rousskov April 27, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature maintainer needs documentation updates for merge S-waiting-for-QA QA team action is needed (and usually required)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants