Fix cipher_suite: :strong failing on OTP 28#1292
Closed
chrismccord wants to merge 1 commit intoelixir-plug:mainfrom
Closed
Fix cipher_suite: :strong failing on OTP 28#1292chrismccord wants to merge 1 commit intoelixir-plug:mainfrom
cipher_suite: :strong failing on OTP 28#1292chrismccord wants to merge 1 commit intoelixir-plug:mainfrom
Conversation
OTP 28 added stricter validation for SSL options. The `secure_renegotiate` and `reuse_sessions` options 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`: 1. `set_secure_defaults/1` runs first - adds `secure_renegotiate: true` because `:ssl.versions()[:supported]` includes TLS 1.2 2. `set_strong_tls_defaults/1` runs second - sets `versions: [:"tlsv1.3"]` Result: Both `secure_renegotiate: true` AND `versions: [:"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, remove `secure_renegotiate` and `reuse_sessions`. ref: phoenixframework/phoenix#6557
Contributor
Author
|
note, this is a vibed starting point. Need more eyes on it as it involves SSL |
Contributor
Author
|
actaully looks like this is redundant with 7b778c2. Will await plug info versions from phoenix issue and reopen if necessary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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