Skip to content

Further tighten tlsserver context setup to fit modern ssl#502

Merged
jonasbardino merged 5 commits intonextfrom
fix/further-tighten-tlsserver-context-setup-to-fit-modern-ssl
Apr 14, 2026
Merged

Further tighten tlsserver context setup to fit modern ssl#502
jonasbardino merged 5 commits intonextfrom
fix/further-tighten-tlsserver-context-setup-to-fit-modern-ssl

Conversation

@jonasbardino
Copy link
Copy Markdown
Contributor

@jonasbardino jonasbardino commented Apr 4, 2026

Follow-up to tighten the default ssl context with unit tests for the tlsserver module in place (#491). Includes that PR and it should be rebased after merge.
Enforces minimum_version and now prevents anything below TLSv1_1 even if the allow_pre_tlsv12 is explicitly requested. The same is implemented for the pyOpenSSL version and the unit tests were adjusted to fit those changes.

NOTE: the code was tested for each of the openid, webdavs, ftps and sftp services in actual deployment. None of them regressed security-wise for the unchanged defaults allowing TLSv1.2+. It also works when toggling off the allow_pre_tls13 to drop TLSv1.2 and require at least TLSv1.3. Of course that limits support for old and outdated client platforms but we will probably want to do that sooner or later.

@jonasbardino jonasbardino self-assigned this Apr 4, 2026
@jonasbardino jonasbardino added the enhancement New feature or request label Apr 4, 2026
@jonasbardino jonasbardino marked this pull request as ready for review April 4, 2026 10:15
@jonasbardino jonasbardino requested a review from a team April 5, 2026 10:30
@jonasbardino jonasbardino force-pushed the fix/further-tighten-tlsserver-context-setup-to-fit-modern-ssl branch 2 times, most recently from 241947f to bf99da5 Compare April 9, 2026 21:28
…it tests

from #491 to fit.
Tighten default context to never allow TLSv1 but force at least TLSv1_1 if
`allow_pre_tlsv12` is explicitly requested.
@jonasbardino jonasbardino force-pushed the fix/further-tighten-tlsserver-context-setup-to-fit-modern-ssl branch from bf99da5 to 6d86183 Compare April 13, 2026 09:29
…of the

native ssl tests. pyOpenSSL does not implement a similar level of introspection
so a few workarounds are required in order to test what has actually been set.
Add DH params support for both wrappers and keep one test to check it still
works without one.
Eliminate the bogus OP_RENEGOTIATION attribute, which somehow made its way into
the tests.
Copy link
Copy Markdown
Contributor

@rasmunk rasmunk left a comment

Choose a reason for hiding this comment

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

Approved

@jonasbardino jonasbardino merged commit 6e86035 into next Apr 14, 2026
11 checks passed
@jonasbardino jonasbardino deleted the fix/further-tighten-tlsserver-context-setup-to-fit-modern-ssl branch April 14, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants