Unverified Commit b59288f8 authored by Johannes Schindelin's avatar Johannes Schindelin Committed by Daniel Stenberg
Browse files

vtls: refactor out essential information about the SSL backends



There is information about the compiled-in SSL backends that is really
no concern of any code other than the SSL backend itself, such as which
function (if any) implements SHA-256 summing.

And there is information that is really interesting to the user, such as
the name, or the curl_sslbackend value.

Let's factor out the latter into a publicly visible struct. This
information will be used in the upcoming API to set the SSL backend
globally.

Signed-off-by: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent b0989cd3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2540,6 +2540,11 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
#define CURLPAUSE_ALL       (CURLPAUSE_RECV|CURLPAUSE_SEND)
#define CURLPAUSE_CONT      (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)

typedef struct {
  curl_sslbackend id;
  const char *name;
} curl_ssl_backend;

#ifdef  __cplusplus
}
#endif
+1 −2
Original line number Diff line number Diff line
@@ -702,8 +702,7 @@ static void *Curl_axtls_get_internals(struct ssl_connect_data *connssl,
}

const struct Curl_ssl Curl_ssl_axtls = {
  "axtls",                        /* name */
  CURLSSLBACKEND_AXTLS,
  { CURLSSLBACKEND_AXTLS, "axtls" }, /* info */

  0, /* have_ca_path */
  0, /* have_certinfo */
+1 −2
Original line number Diff line number Diff line
@@ -978,8 +978,7 @@ static void *Curl_cyassl_get_internals(struct ssl_connect_data *connssl,
}

const struct Curl_ssl Curl_ssl_cyassl = {
  "cyassl",                        /* name */
  CURLSSLBACKEND_CYASSL,
  { CURLSSLBACKEND_CYASSL, "cyassl" }, /* info */

  0, /* have_ca_path */
  0, /* have_certinfo */
+1 −2
Original line number Diff line number Diff line
@@ -2890,8 +2890,7 @@ static void *Curl_darwinssl_get_internals(struct ssl_connect_data *connssl,
}

const struct Curl_ssl Curl_ssl_darwinssl = {
  "darwinssl",                        /* name */
  CURLSSLBACKEND_DARWINSSL,
  { CURLSSLBACKEND_DARWINSSL, "darwinssl" }, /* info */

  0, /* have_ca_path */
  0, /* have_certinfo */
+1 −2
Original line number Diff line number Diff line
@@ -1353,8 +1353,7 @@ static void *Curl_gskit_get_internals(struct ssl_connect_data *connssl,
}

const struct Curl_ssl Curl_ssl_gskit = {
  "gskit",                        /* name */
  CURLSSLBACKEND_GSKIT,
  { CURLSSLBACKEND_GSKIT, "gskit" }, /* info */

  0, /* have_ca_path */
  1, /* have_certinfo */
Loading