git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: http.sslVersion only specifies minimum TLS version, later versions are allowed

From
Jeff King <peff@peff.net>
Date
May 3, 2021, 20:46 UTC
Message-ID
<YJBhH0eLKRSpPFy3@coredump.intra.peff.net>
In-Reply-To
<ed63aa37ef0547bd97a5d965fb5e123f@ammonit.com>
On Mon, May 03, 2021 at 03:02:10PM +0000, Daniel Carpenter wrote:
Show 24 quoted lines
> > Just looking at how the curl binary does it, "--tlsv1.2" means "1.2 or
> > greater" (which is not at all surprising; the library interface tends to
> > mirror their command-line and vice versa, and our behavior is influenced
> > by the library interface here).  But that implies to me that curl folks
> > considered this and though the "or greater" behavior was useful (which
> > makes sense -- the main goal is probably to avoid insecurities in older
> > versions of the protocol).
> > 
> > Anyway, the binary also has --tls-max for capping the maximum version.
> > That seems more flexible in general than "use this version exactly" (if
> > you only care that 1.3 is broken, then setting "max=1.2" lets you talk
> > to servers that support 1.1 or 1.2).
> > 
> > -Peff
> 
> I agree that the current behaviour is better for most users, and that
> some kind of separate "max" config option would work for anyone in my
> situation.
> 
> Another idea would be to keep the current behaviour for
> `http.sslVersion`, but use an exact match with the environment
> variable only. That already takes priority, and I imagine its main
> appeal over the config option is for users that want to try something
> with a specific TLS version.

I think you're right that it may work for many people, but I'd shy away from it simply because it's subtle and hard to explain.

Adding config and environment variables for "max" is pretty straight-forward to explain. I think it would also make sense to improve the documentation for http.sslVersion to make it clear that this is a minimum (the current wording is quite misleading).

-Peff
Previous: Daniel CarpenterNext: Randall S. Becker
Message 5 of 9 in “http.sslVersion only specifies minimum TLS version, later versions are allowed”
  1. Daniel CarpenterMay 3, 2021
  2. Ævar Arnfjörð BjarmasonMay 3, 2021
  3. Jeff KingMay 3, 2021
  4. Daniel CarpenterMay 3, 2021
  5. Jeff KingMay 3, 2021
  6. Randall S. BeckerMay 3, 2021
  7. Daniel StenbergMay 3, 2021
  8. Randall S. BeckerMay 3, 2021
  9. Daniel StenbergMay 3, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.