const struct Curl_ssl Curl_ssl_axtls = {
"axtls", /* name */
+ CURLSSLBACKEND_AXTLS,
0, /* have_ca_path */
0, /* have_certinfo */
extern const struct Curl_ssl Curl_ssl_axtls;
-/* Set the API backend definition to axTLS */
-#define CURL_SSL_BACKEND CURLSSLBACKEND_AXTLS
-
#endif /* USE_AXTLS */
#endif /* HEADER_CURL_AXTLS_H */
const struct Curl_ssl Curl_ssl_cyassl = {
"cyassl", /* name */
+ CURLSSLBACKEND_CYASSL,
0, /* have_ca_path */
0, /* have_certinfo */
extern const struct Curl_ssl Curl_ssl_cyassl;
-/* Set the API backend definition to CyaSSL */
-#define CURL_SSL_BACKEND CURLSSLBACKEND_CYASSL
-
#endif /* USE_CYASSL */
#endif /* HEADER_CURL_CYASSL_H */
const struct Curl_ssl Curl_ssl_darwinssl = {
"darwinssl", /* name */
+ CURLSSLBACKEND_DARWINSSL,
0, /* have_ca_path */
0, /* have_certinfo */
extern const struct Curl_ssl Curl_ssl_darwinssl;
-/* Set the API backend definition to SecureTransport */
-#define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL
-
#endif /* USE_DARWINSSL */
#endif /* HEADER_CURL_DARWINSSL_H */
const struct Curl_ssl Curl_ssl_gskit = {
"gskit", /* name */
+ CURLSSLBACKEND_GSKIT,
0, /* have_ca_path */
1, /* have_certinfo */
extern const struct Curl_ssl Curl_ssl_gskit;
-/* Set the API backend definition to GSKit */
-#define CURL_SSL_BACKEND CURLSSLBACKEND_GSKIT
-
#endif /* USE_GSKIT */
#endif /* HEADER_CURL_GSKIT_H */
const struct Curl_ssl Curl_ssl_gnutls = {
"gnutls", /* name */
+ CURLSSLBACKEND_GNUTLS,
1, /* have_ca_path */
1, /* have_certinfo */
Curl_gtls_get_internals, /* get_internals */
Curl_gtls_close, /* close */
Curl_none_close_all, /* close_all */
- Curl_glts_session_free, /* session_free */
+ Curl_gtls_session_free, /* session_free */
Curl_none_set_engine, /* set_engine */
Curl_none_set_engine_default, /* set_engine_default */
Curl_none_engines_list, /* engines_list */
extern const struct Curl_ssl Curl_ssl_gnutls;
-/* Set the API backend definition to GnuTLS */
-#define CURL_SSL_BACKEND CURLSSLBACKEND_GNUTLS
-
#endif /* USE_GNUTLS */
#endif /* HEADER_CURL_GTLS_H */
const struct Curl_ssl Curl_ssl_mbedtls = {
"mbedtls", /* name */
+ CURLSSLBACKEND_MBEDTLS,
0, /* have_ca_path */
0, /* have_certinfo */
extern const struct Curl_ssl Curl_ssl_mbedtls;
-#define CURL_SSL_BACKEND CURLSSLBACKEND_MBEDTLS
-
#endif /* USE_MBEDTLS */
#endif /* HEADER_CURL_MBEDTLS_H */
const struct Curl_ssl Curl_ssl_nss = {
"nss", /* name */
+ CURLSSLBACKEND_NSS,
1, /* have_ca_path */
1, /* have_certinfo */
extern const struct Curl_ssl Curl_ssl_nss;
-/* Set the API backend definition to NSS */
-#define CURL_SSL_BACKEND CURLSSLBACKEND_NSS
-
#endif /* USE_NSS */
#endif /* HEADER_CURL_NSSG_H */
const struct Curl_ssl Curl_ssl_openssl = {
"openssl", /* name */
+ CURLSSLBACKEND_OPENSSL,
1, /* have_ca_path */
1, /* have_certinfo */
extern const struct Curl_ssl Curl_ssl_openssl;
-/* Set the API backend definition to OpenSSL */
-#define CURL_SSL_BACKEND CURLSSLBACKEND_OPENSSL
-
#endif /* USE_OPENSSL */
#endif /* HEADER_CURL_SSLUSE_H */
const struct Curl_ssl Curl_ssl_polarssl = {
"polarssl", /* name */
+ CURLSSLBACKEND_POLARSSL,
1, /* have_ca_path */
0, /* have_certinfo */
extern const struct Curl_ssl Curl_ssl_polarssl;
-/* Set the API backend definition to PolarSSL */
-#define CURL_SSL_BACKEND CURLSSLBACKEND_POLARSSL
-
#endif /* USE_POLARSSL */
#endif /* HEADER_CURL_POLARSSL_H */
const struct Curl_ssl Curl_ssl_schannel = {
"schannel", /* name */
+ CURLSSLBACKEND_SCHANNEL,
0, /* have_ca_path */
1, /* have_certinfo */
extern const struct Curl_ssl Curl_ssl_schannel;
-/* Set the API backend definition to Schannel */
-#define CURL_SSL_BACKEND CURLSSLBACKEND_SCHANNEL
-
#endif /* USE_SCHANNEL */
#endif /* HEADER_CURL_SCHANNEL_H */
int Curl_ssl_backend(void)
{
- return (int)CURL_SSL_BACKEND;
+#ifdef USE_SSL
+ return Curl_ssl->id;
+#else
+ return (int)CURLSSLBACKEND_NONE;
+#endif
}
#ifdef USE_SSL
struct Curl_ssl {
const char *name;
+ int id; /* one of the CURLSSLBACKEND_* constants */
unsigned have_ca_path:1; /* supports CAPATH */
unsigned have_certinfo:1; /* supports CURLOPT_CERTINFO */
#define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
#else
-/* Set the API backend definition to none */
-#define CURL_SSL_BACKEND CURLSSLBACKEND_NONE
/* When SSL support is not present, just define away these function calls */
#define Curl_ssl_init() 1