Fix cipher_suite: :strong failing on OTP 28
#1292
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OTP 28 added stricter validation for SSL options. The
secure_renegotiateandreuse_sessionsoptions are only valid for TLS 1.2 and earlier (renegotiation was removed in TLS 1.3, replaced by key updates).The current code flow in
Plug.SSL.configure/1:set_secure_defaults/1runs first - addssecure_renegotiate: truebecause:ssl.versions()[:supported]includes TLS 1.2set_strong_tls_defaults/1runs second - setsversions: [:"tlsv1.3"]Result: Both
secure_renegotiate: trueANDversions: [:"tlsv1.3"]are set, which OTP 28 rejects as incompatible.To fix, after applying TLS version defaults in
set_strong_tls_defaults/1, check if the final versions list contains only TLS 1.3. If so, removesecure_renegotiateandreuse_sessions.ref: phoenixframework/phoenix#6557