Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates the ssl option to add settings rather than replace them #466

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

ShahneRodgers
Copy link
Contributor

As per issue #458, passing the ssl option completely overrides all settings, rather than just overwriting the "sub"-setting that was specified. Eg ssl: [{:verions, [:'tlsv1.2']}] disabled all TLS settings rather than just requiring TLSv1.2.

This commit changes HTTPoison's behaviour to merge the ssl settings with my best-guess at what the defaults are. Since it may be a breaking change, it also adds a new ssl_override option that can be used by anyone wishing to maintain the existing behaviour.

This resolves #458.

Copy link
Owner

@edgurgel edgurgel left a comment

Choose a reason for hiding this comment

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

This is great! Thanks! 🎉

I wonder how hard it would be to run badssl.com locally 🤔

@ShahneRodgers
Copy link
Contributor Author

This is great! Thanks! 🎉

I wonder how hard it would be to run badssl.com locally 🤔

It should be pretty simple - the only question is whether to use the genuine Chromium version that seems to require building from scratch 😞 (and thus keeping copies of everything) , or one of the random copies that may or may not be/continue to be legitimate / present.

@edgurgel
Copy link
Owner

LGTM! Do you want to autosquash those fixups? :bowtie:

As per issue edgurgel#458, passing the `ssl` option completely overrides
all settings, rather than just overwriting the "sub"-setting that
was specified. Eg `ssl: [{:verions, [:'tlsv1.2']}]` disabled all
TLS settings rather than just requiring TLSv1.2.

This commit changes HTTPoison's behaviour to merge the `ssl` settings
with my best-guess at what the defaults are. Since it may be a breaking
change, it also adds a new `ssl_override` option that can be used by
anyone wishing to maintain the existing behaviour.

This resolves edgurgel#458.
@edgurgel edgurgel merged commit fa2238c into edgurgel:main Nov 2, 2022
@ShahneRodgers ShahneRodgers deleted the ssl-merge-options branch July 5, 2024 02:41
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.

SSL options replace default options (instead of just being added to them)
2 participants