Repository navigation
Skip certificate verification when unsafe_https is set - #1263
Merged
Merged
Conversation
The `unsafe_https` config (`HEX_UNSAFE_HTTPS`) stopped having an effect when Hex.HTTP.SSL.secure_ssl?/0 was removed in #1086, so certificates were always verified. ssl_opts/1 now returns `verify: :verify_none` without cacerts, partial_chain or the hostname check when the config is set, as it did before #1086.
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.
The
unsafe_httpsconfig (HEX_UNSAFE_HTTPS) is still loaded intoHex.Stateand documented inmix hex.config, but nothing has read it since #1086 removedHex.HTTP.SSL.secure_ssl?/0. Certificates were always verified, whatever the setting.Hex.HTTP.SSL.ssl_opts/1now returnsverify: :verify_nonewhenunsafe_httpsis set. It keeps SNI,secure_renegotiate,reuse_sessions,versionsandciphers, and leaves outcacerts,partial_chainand the hostname check, which are the same options it returned before #1086. The OTP/ssl version check that #1086 removed isn't brought back.The code before #1086 didn't print a warning when verification was off, so this doesn't either.
ssl_opts/1keeps its signature, so the call in #1139 still works.