Skip to content

Fix overriding stricter configured TLS minimum version - #406

Open
markwinds wants to merge 2 commits into
an-tao:masterfrom
markwinds:fix-preserve-configured-min-tls-version
Open

Fix overriding stricter configured TLS minimum version#406
markwinds wants to merge 2 commits into
an-tao:masterfrom
markwinds:fix-preserve-configured-min-tls-version

Conversation

@markwinds

Copy link
Copy Markdown

Problem

SSL configuration commands are applied before the default minimum TLS
version is set.

When users configure:

{"MinProtocol", "TLSv1.3"}

the configured value is subsequently overwritten by:

SSL_CTX_set_min_proto_version(ctx_, TLS1_2_VERSION);

As a result, TLS 1.2 becomes enabled even though the user requested
TLS 1.3 as the minimum version.

Solution

Read the minimum protocol version after applying SSL configuration
commands. Set TLS 1.2 only when no minimum version was configured or
when the configured version is lower than TLS 1.2.

This preserves the existing secure default while respecting stricter
user configurations such as TLS 1.3.

Compatibility

The getter is used only for OpenSSL 1.1.1 and later under the existing
version guard. Older OpenSSL versions retain the existing behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant