#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
}
const struct Curl_ssl Curl_ssl_axtls = {
- "axtls", /* name */
- CURLSSLBACKEND_AXTLS,
+ { CURLSSLBACKEND_AXTLS, "axtls" }, /* info */
0, /* have_ca_path */
0, /* have_certinfo */
}
const struct Curl_ssl Curl_ssl_cyassl = {
- "cyassl", /* name */
- CURLSSLBACKEND_CYASSL,
+ { CURLSSLBACKEND_CYASSL, "cyassl" }, /* info */
0, /* have_ca_path */
0, /* have_certinfo */
}
const struct Curl_ssl Curl_ssl_darwinssl = {
- "darwinssl", /* name */
- CURLSSLBACKEND_DARWINSSL,
+ { CURLSSLBACKEND_DARWINSSL, "darwinssl" }, /* info */
0, /* have_ca_path */
0, /* have_certinfo */
}
const struct Curl_ssl Curl_ssl_gskit = {
- "gskit", /* name */
- CURLSSLBACKEND_GSKIT,
+ { CURLSSLBACKEND_GSKIT, "gskit" }, /* info */
0, /* have_ca_path */
1, /* have_certinfo */
}
const struct Curl_ssl Curl_ssl_gnutls = {
- "gnutls", /* name */
- CURLSSLBACKEND_GNUTLS,
+ { CURLSSLBACKEND_GNUTLS, "gnutls" }, /* info */
1, /* have_ca_path */
1, /* have_certinfo */
}
const struct Curl_ssl Curl_ssl_mbedtls = {
- "mbedtls", /* name */
- CURLSSLBACKEND_MBEDTLS,
+ { CURLSSLBACKEND_MBEDTLS, "mbedtls" }, /* info */
0, /* have_ca_path */
0, /* have_certinfo */
}
const struct Curl_ssl Curl_ssl_nss = {
- "nss", /* name */
- CURLSSLBACKEND_NSS,
+ { CURLSSLBACKEND_NSS, "nss" }, /* info */
1, /* have_ca_path */
1, /* have_certinfo */
}
const struct Curl_ssl Curl_ssl_openssl = {
- "openssl", /* name */
- CURLSSLBACKEND_OPENSSL,
+ { CURLSSLBACKEND_OPENSSL, "openssl" }, /* info */
1, /* have_ca_path */
1, /* have_certinfo */
}
const struct Curl_ssl Curl_ssl_polarssl = {
- "polarssl", /* name */
- CURLSSLBACKEND_POLARSSL,
+ { CURLSSLBACKEND_POLARSSL, "polarssl" }, /* info */
1, /* have_ca_path */
0, /* have_certinfo */
}
const struct Curl_ssl Curl_ssl_schannel = {
- "schannel", /* name */
- CURLSSLBACKEND_SCHANNEL,
+ { CURLSSLBACKEND_SCHANNEL, "schannel" }, /* info */
0, /* have_ca_path */
1, /* have_certinfo */
{
#ifdef USE_SSL
multissl_init();
- return Curl_ssl->id;
+ return Curl_ssl->info.id;
#else
return (int)CURLSSLBACKEND_NONE;
#endif
}
static const struct Curl_ssl Curl_ssl_multi = {
- "multi", /* name */
- CURLSSLBACKEND_NONE,
+ { CURLSSLBACKEND_NONE, "multi" }, /* info */
0, /* have_ca_path */
0, /* have_certinfo */
env = getenv("CURL_SSL_BACKEND");
if(env)
for(i = 0; available_backends[i]; i++)
- if(!strcmp(env, available_backends[i]->name)) {
+ if(!strcmp(env, available_backends[i]->info.name)) {
Curl_ssl = available_backends[i];
return 0;
}
struct ssl_connect_data;
struct Curl_ssl {
- const char *name;
- int id; /* one of the CURLSSLBACKEND_* constants */
+ /*
+ * This *must* be the first entry to allow returning the list of available
+ * backends in curl_global_sslset().
+ */
+ curl_ssl_backend info;
unsigned have_ca_path:1; /* supports CAPATH */
unsigned have_certinfo:1; /* supports CURLOPT_CERTINFO */