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

Provide a way to disable tls12 feature for rustls #842

Closed
andylizi opened this issue Oct 7, 2024 · 4 comments
Closed

Provide a way to disable tls12 feature for rustls #842

andylizi opened this issue Oct 7, 2024 · 4 comments

Comments

@andylizi
Copy link

andylizi commented Oct 7, 2024

ureq is a lightweight HTTP client often used to communicate with one or a few hardcoded servers (e.g. making API calls). TLS 1.2 support is mostly unnecessary in those situations because we can know for sure if the hardcoded servers support TLS 1.31 or not.

TLS 1.2 in rustls often requires separate code paths to handle. Disabling the tls12 feature can reduce binary size by ~100kb. It'd be great if ureq can provide a way to do so.

Footnotes

  1. Which is also highly likely, as 70% of sites now support TLS 1.3 according to https://www.ssllabs.com/ssl-pulse/

@algesten
Copy link
Owner

algesten commented Oct 8, 2024

Good idea! Thanks!

@algesten
Copy link
Owner

algesten commented Oct 8, 2024

Me testing to do a simple binary with/without tls12 enabled.

-rwxr-xr-x   1 martin  staff  2714424 Oct  8 18:19 foo-no-tls12*
-rwxr-xr-x   1 martin  staff  2821384 Oct  8 18:21 foo-with-tls12*

@algesten
Copy link
Owner

algesten commented Oct 8, 2024

(2821384-2714424)/2821384 = 0.038

So tls12 takes 3.8% of a macOS binary. Now, the question is: the complication of having this as a separate feature, is it worth 3.8% potential reduction in size?

@algesten
Copy link
Owner

This complicates the feature flag situation for a rather small gain. I don't want this, for now.

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 a pull request may close this issue.

2 participants