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

Re: [PATCH 1/3] http: add support for selecting SSL backends at runtime

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Oct 15, 2018, 14:06 UTC
Message-ID
<CAPig+cT2K9hCTaLbTW-3ueKV6vaokkLiVSUvZ7yZ+sncZnjvNw@mail.gmail.com>
In-Reply-To
<8c5ecdb6c9a73405036672db8bc1e36c5c6c6951.1539598481.git.gitgitgadget@gmail.com>

On Mon, Oct 15, 2018 at 6:14 AM Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 22 quoted lines
> This patch adds the Git side of that feature: by setting http.sslBackend
> to "openssl" or "schannel", Git for Windows can now choose the SSL
> backend at runtime.
> [...]
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> diff --git a/http.c b/http.c
> @@ -995,6 +1003,33 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
> +#if LIBCURL_VERSION_NUM >= 0x073800
> +       if (http_ssl_backend) {
> +               const curl_ssl_backend **backends;
> +               struct strbuf buf = STRBUF_INIT;
> +               int i;
> +
> +               switch (curl_global_sslset(-1, http_ssl_backend, &backends)) {
> +               case CURLSSLSET_UNKNOWN_BACKEND:
> +                       strbuf_addf(&buf, _("Unsupported SSL backend '%s'. "
> +                                           "Supported SSL backends:"),
> +                                           http_ssl_backend);
> +                       for (i = 0; backends[i]; i++)
> +                               strbuf_addf(&buf, "\n\t%s", backends[i]->name);
> +                       die("%s", buf.buf);

This is the only 'case' arm which utilizes 'strbuf buf', and it die()s, so no leak despite a lack of strbuf_release(). Okay.

Show 12 quoted lines
> +               case CURLSSLSET_NO_BACKENDS:
> +                       die(_("Could not set SSL backend to '%s': "
> +                             "cURL was built without SSL backends"),
> +                           http_ssl_backend);
> +               case CURLSSLSET_TOO_LATE:
> +                       die(_("Could not set SSL backend to '%s': already set"),
> +                           http_ssl_backend);
> +               case CURLSSLSET_OK:
> +                       break; /* Okay! */
> +               }
> +       }
> +#endif
Previous: Johannes Schindelin via GitGitGadgetNext: Brendan Forster via GitGitGadget
Message 3 of 28 in “Allow choosing the SSL backend cURL uses (plus related patches)”
  1. 0/3 Allow choosing the SSL backend cURL uses (plus related patches)Johannes Schindelin via GitGitGadget, Oct 15, 2018
  2. 1/3 http: add support for selecting SSL backends at runtimeJohannes Schindelin via GitGitGadget, Oct 15, 2018
  3. Eric SunshineOct 15, 2018
  4. 2/3 http: add support for disabling SSL revocation checks in cURLBrendan Forster via GitGitGadget, Oct 15, 2018
  5. Eric SunshineOct 15, 2018
  6. Johannes SchindelinOct 16, 2018
  7. Junio C HamanoOct 25, 2018
  8. http: give curl version warnings consistentlyJunio C Hamano, Oct 25, 2018
  9. Jeff KingOct 25, 2018
  10. Johannes SchindelinOct 25, 2018
  11. Junio C HamanoOct 26, 2018
  12. Johannes SchindelinOct 25, 2018
  13. Junio C HamanoOct 16, 2018
  14. Jeff KingOct 16, 2018
  15. Johannes SchindelinOct 16, 2018
  16. Jeff KingOct 16, 2018
  17. Johannes SchindelinOct 16, 2018
  18. Junio C HamanoOct 18, 2018
  19. Johannes SchindelinOct 25, 2018
  20. Junio C HamanoOct 26, 2018
  21. 3/3 http: when using Secure Channel, ignore sslCAInfo by defaultJohannes Schindelin via GitGitGadget, Oct 15, 2018
  22. 0/3 Allow choosing the SSL backend cURL uses (plus related patches)Johannes Schindelin via GitGitGadget, Oct 25, 2018
  23. 1/3 http: add support for selecting SSL backends at runtimeJohannes Schindelin via GitGitGadget, Oct 25, 2018
  24. Ævar Arnfjörð BjarmasonDec 13, 2018
  25. Johannes SchindelinDec 13, 2018
  26. Johannes SchindelinDec 13, 2018
  27. 2/3 http: add support for disabling SSL revocation checks in cURLBrendan Forster via GitGitGadget, Oct 25, 2018
  28. 3/3 http: when using Secure Channel, ignore sslCAInfo by defaultJohannes Schindelin via GitGitGadget, Oct 25, 2018

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.