]> granicus.if.org Git - curl/commitdiff
vtls: convert the have_curlssl_* constants to runtime flags
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Tue, 20 Jun 2017 09:32:53 +0000 (11:32 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 28 Aug 2017 12:56:56 +0000 (14:56 +0200)
The entire idea of introducing the Curl_ssl struct to describe SSL
backends is to prepare for choosing the SSL backend at runtime.

To that end, convert all the #ifdef have_curlssl_* style conditionals
to use bit flags instead.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
21 files changed:
lib/url.c
lib/vtls/axtls.c
lib/vtls/cyassl.c
lib/vtls/cyassl.h
lib/vtls/darwinssl.c
lib/vtls/darwinssl.h
lib/vtls/gskit.c
lib/vtls/gskit.h
lib/vtls/gtls.c
lib/vtls/gtls.h
lib/vtls/mbedtls.c
lib/vtls/mbedtls.h
lib/vtls/nss.c
lib/vtls/nssg.h
lib/vtls/openssl.c
lib/vtls/openssl.h
lib/vtls/polarssl.c
lib/vtls/polarssl.h
lib/vtls/schannel.c
lib/vtls/schannel.h
lib/vtls/vtls.h

index 32623abe59721a7866db1f6596fe4013bf07f238..dd254af541169533022934a5ab0ba57b9d937e5c 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2179,24 +2179,26 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
                                          TRUE : FALSE;
     break;
   case CURLOPT_SSL_CTX_FUNCTION:
-#ifdef have_curlssl_ssl_ctx
     /*
      * Set a SSL_CTX callback
      */
-    data->set.ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback);
-#else
-    result = CURLE_NOT_BUILT_IN;
+#ifdef USE_SSL
+    if(Curl_ssl->have_ssl_ctx)
+      data->set.ssl.fsslctx = va_arg(param, curl_ssl_ctx_callback);
+    else
 #endif
+      result = CURLE_NOT_BUILT_IN;
     break;
   case CURLOPT_SSL_CTX_DATA:
-#ifdef have_curlssl_ssl_ctx
     /*
      * Set a SSL_CTX callback parameter pointer
      */
-    data->set.ssl.fsslctxp = va_arg(param, void *);
-#else
-    result = CURLE_NOT_BUILT_IN;
+#ifdef USE_SSL
+    if(Curl_ssl->have_ssl_ctx)
+      data->set.ssl.fsslctxp = va_arg(param, void *);
+    else
 #endif
+      result = CURLE_NOT_BUILT_IN;
     break;
   case CURLOPT_SSL_FALSESTART:
     /*
@@ -2210,35 +2212,38 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
     data->set.ssl.falsestart = (0 != va_arg(param, long)) ? TRUE : FALSE;
     break;
   case CURLOPT_CERTINFO:
-#ifdef have_curlssl_certinfo
-    data->set.ssl.certinfo = (0 != va_arg(param, long)) ? TRUE : FALSE;
-#else
-    result = CURLE_NOT_BUILT_IN;
+#ifdef USE_SSL
+    if(Curl_ssl->have_certinfo)
+      data->set.ssl.certinfo = (0 != va_arg(param, long)) ? TRUE : FALSE;
+    else
 #endif
+      result = CURLE_NOT_BUILT_IN;
     break;
   case CURLOPT_PINNEDPUBLICKEY:
-#ifdef have_curlssl_pinnedpubkey /* only by supported backends */
     /*
      * Set pinned public key for SSL connection.
      * Specify file name of the public key in DER format.
      */
-    result = setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG],
-                       va_arg(param, char *));
-#else
-    result = CURLE_NOT_BUILT_IN;
+#ifdef USE_SSL
+    if(Curl_ssl->have_pinnedpubkey)
+      result = setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG],
+                         va_arg(param, char *));
+    else
 #endif
+      result = CURLE_NOT_BUILT_IN;
     break;
   case CURLOPT_PROXY_PINNEDPUBLICKEY:
-#ifdef have_curlssl_pinnedpubkey /* only by supported backends */
     /*
      * Set pinned public key for SSL connection.
      * Specify file name of the public key in DER format.
      */
-    result = setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY],
-                       va_arg(param, char *));
-#else
-    result = CURLE_NOT_BUILT_IN;
+#ifdef USE_SSL
+    if(Curl_ssl->have_pinnedpubkey)
+      result = setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY],
+                         va_arg(param, char *));
+    else
 #endif
+      result = CURLE_NOT_BUILT_IN;
     break;
   case CURLOPT_CAINFO:
     /*
@@ -2256,30 +2261,32 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option,
                        va_arg(param, char *));
     break;
   case CURLOPT_CAPATH:
-#ifdef have_curlssl_ca_path /* not supported by all backends */
     /*
      * Set CA path info for SSL connection. Specify directory name of the CA
      * certificates which have been prepared using openssl c_rehash utility.
      */
-    /* This does not work on windows. */
-    result = setstropt(&data->set.str[STRING_SSL_CAPATH_ORIG],
-                       va_arg(param, char *));
-#else
-    result = CURLE_NOT_BUILT_IN;
+#ifdef USE_SSL
+    if(Curl_ssl->have_ca_path)
+      /* This does not work on windows. */
+      result = setstropt(&data->set.str[STRING_SSL_CAPATH_ORIG],
+                         va_arg(param, char *));
+    else
 #endif
+      result = CURLE_NOT_BUILT_IN;
     break;
   case CURLOPT_PROXY_CAPATH:
-#ifdef have_curlssl_ca_path /* not supported by all backends */
     /*
      * Set CA path info for SSL connection proxy. Specify directory name of the
      * CA certificates which have been prepared using openssl c_rehash utility.
      */
-    /* This does not work on windows. */
-    result = setstropt(&data->set.str[STRING_SSL_CAPATH_PROXY],
-                       va_arg(param, char *));
-#else
-    result = CURLE_NOT_BUILT_IN;
+#ifdef USE_SSL
+    if(Curl_ssl->have_ca_path)
+      /* This does not work on windows. */
+      result = setstropt(&data->set.str[STRING_SSL_CAPATH_PROXY],
+                         va_arg(param, char *));
+    else
 #endif
+      result = CURLE_NOT_BUILT_IN;
     break;
   case CURLOPT_CRLFILE:
     /*
index 3446dac446d4fb8e373269bed8de4aef30c0ce9a..885cbf53223468c03360516c4e6a13c7b077ce95 100644 (file)
@@ -705,6 +705,11 @@ CURLcode Curl_axtls_random(struct Curl_easy *data,
 const struct Curl_ssl Curl_ssl_axtls = {
   "axtls",                        /* name */
 
+  0, /* have_ca_path */
+  0, /* have_certinfo */
+  0, /* have_pinnedpubkey */
+  0, /* have_ssl_ctx */
+
   Curl_axtls_init,                /* init */
   Curl_axtls_cleanup,             /* cleanup */
   Curl_axtls_version,             /* version */
index 62db13c1beaa33c80b9d4469322f5a1ac2e60576..7f90e913fa258c09f9ffdd1546bf374eb55868e6 100644 (file)
@@ -110,6 +110,18 @@ and that's a problem since options.h hasn't been included yet. */
 #define CYASSL_MAX_ERROR_SZ 80
 #endif
 
+/* KEEP_PEER_CERT is a product of the presence of build time symbol
+   OPENSSL_EXTRA without NO_CERTS, depending on the version. KEEP_PEER_CERT is
+   in wolfSSL's settings.h, and the latter two are build time symbols in
+   options.h. */
+#ifndef KEEP_PEER_CERT
+#if defined(HAVE_CYASSL_GET_PEER_CERTIFICATE) || \
+    defined(HAVE_WOLFSSL_GET_PEER_CERTIFICATE) || \
+    (defined(OPENSSL_EXTRA) && !defined(NO_CERTS))
+#define KEEP_PEER_CERT
+#endif
+#endif
+
 static Curl_recv cyassl_recv;
 static Curl_send cyassl_send;
 
@@ -954,6 +966,15 @@ static void Curl_cyassl_sha256sum(const unsigned char *tmp, /* input */
 const struct Curl_ssl Curl_ssl_cyassl = {
   "cyassl",                        /* name */
 
+  0, /* have_ca_path */
+  0, /* have_certinfo */
+#ifdef KEEP_PEER_CERT
+  1, /* have_pinnedpubkey */
+#else
+  0, /* have_pinnedpubkey */
+#endif
+  1, /* have_ssl_ctx */
+
   Curl_cyassl_init,                /* init */
   Curl_none_cleanup,               /* cleanup */
   Curl_cyassl_version,             /* version */
index abee7cf80455fea6b45844963de442d71a38028f..423fdc0bff0a34aa858bf0ec03062adbe497c617 100644 (file)
 
 #ifdef USE_CYASSL
 
-/* KEEP_PEER_CERT is a product of the presence of build time symbol
-   OPENSSL_EXTRA without NO_CERTS, depending on the version. KEEP_PEER_CERT is
-   in wolfSSL's settings.h, and the latter two are build time symbols in
-   options.h. */
-#ifndef KEEP_PEER_CERT
-#if defined(HAVE_CYASSL_GET_PEER_CERTIFICATE) || \
-    defined(HAVE_WOLFSSL_GET_PEER_CERTIFICATE) || \
-    (defined(OPENSSL_EXTRA) && !defined(NO_CERTS))
-#define KEEP_PEER_CERT
-#endif
-#endif
-
 CURLcode Curl_cyassl_connect(struct connectdata *conn, int sockindex);
 bool Curl_cyassl_data_pending(const struct connectdata* conn, int connindex);
 int Curl_cyassl_shutdown(struct connectdata* conn, int sockindex);
@@ -60,13 +48,5 @@ extern const struct Curl_ssl Curl_ssl_cyassl;
 /* Set the API backend definition to CyaSSL */
 #define CURL_SSL_BACKEND CURLSSLBACKEND_CYASSL
 
-/* this backend supports CURLOPT_SSL_CTX_* */
-#define have_curlssl_ssl_ctx 1
-
-#ifdef KEEP_PEER_CERT
-/* this backend supports CURLOPT_PINNEDPUBLICKEY */
-#define have_curlssl_pinnedpubkey 1
-#endif
-
 #endif /* USE_CYASSL */
 #endif /* HEADER_CURL_CYASSL_H */
index 23be96a20f0ba08deafc230d304e8c5da9e13f03..4d755d6b6b1cd648143f67871c7a002a676d30d4 100644 (file)
 #define ioErr -36
 #define paramErr -50
 
+/* pinned public key support tests */
+
+/* version 1 supports macOS 10.12+ and iOS 10+ */
+#if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) || \
+    (!TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED  >= 101200))
+#define DARWIN_SSL_PINNEDPUBKEY_V1 1
+#endif
+
+/* version 2 supports MacOSX 10.7+ */
+#if (!TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
+#define DARWIN_SSL_PINNEDPUBKEY_V2 1
+#endif
+
+#if defined(DARWIN_SSL_PINNEDPUBKEY_V1) || defined(DARWIN_SSL_PINNEDPUBKEY_V2)
+/* this backend supports CURLOPT_PINNEDPUBLICKEY */
+#define DARWIN_SSL_PINNEDPUBKEY 1
+#endif /* DARWIN_SSL_PINNEDPUBKEY */
+
 #ifdef DARWIN_SSL_PINNEDPUBKEY
 /* both new and old APIs return rsa keys missing the spki header (not DER) */
 static const unsigned char rsa4096SpkiHeader[] = {
@@ -2860,6 +2878,15 @@ static ssize_t darwinssl_recv(struct connectdata *conn,
 const struct Curl_ssl Curl_ssl_darwinssl = {
   "darwinssl",                        /* name */
 
+  0, /* have_ca_path */
+  0, /* have_certinfo */
+#ifdef DARWIN_SSL_PINNEDPUBKEY
+  1, /* have_pinnedpubkey */
+#else
+  0, /* have_pinnedpubkey */
+#endif /* DARWIN_SSL_PINNEDPUBKEY */
+  0, /* have_ssl_ctx */
+
   Curl_none_init,                     /* init */
   Curl_none_cleanup,                  /* cleanup */
   Curl_darwinssl_version,             /* version */
index 37fe8164f115b5596fdd524cc2cc057ba953b95a..9c46119885087571ebce71aa302bbd644a4de2b6 100644 (file)
@@ -51,24 +51,5 @@ extern const struct Curl_ssl Curl_ssl_darwinssl;
 /* Set the API backend definition to SecureTransport */
 #define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL
 
-/* pinned public key support tests */
-
-/* version 1 supports macOS 10.12+ and iOS 10+ */
-#if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) || \
-    (!TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED  >= 101200))
-#define DARWIN_SSL_PINNEDPUBKEY_V1 1
-#endif
-
-/* version 2 supports MacOSX 10.7+ */
-#if (!TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
-#define DARWIN_SSL_PINNEDPUBKEY_V2 1
-#endif
-
-#if defined(DARWIN_SSL_PINNEDPUBKEY_V1) || defined(DARWIN_SSL_PINNEDPUBKEY_V2)
-/* this backend supports CURLOPT_PINNEDPUBLICKEY */
-#define DARWIN_SSL_PINNEDPUBKEY 1
-#define have_curlssl_pinnedpubkey 1
-#endif /* DARWIN_SSL_PINNEDPUBKEY */
-
 #endif /* USE_DARWINSSL */
 #endif /* HEADER_CURL_DARWINSSL_H */
index d82f658fd66805c0e5e539b7a83c3f1633fea251..dc24f044bb312efec3e3273c4c2c4a6bebf7bd86 100644 (file)
@@ -1337,6 +1337,11 @@ int Curl_gskit_check_cxn(struct connectdata *cxn)
 const struct Curl_ssl Curl_ssl_gskit = {
   "gskit",                        /* name */
 
+  0, /* have_ca_path */
+  1, /* have_certinfo */
+  0, /* have_pinnedpubkey */
+  0, /* have_ssl_ctx */
+
   Curl_gskit_init,                /* init */
   Curl_gskit_cleanup,             /* cleanup */
   Curl_gskit_version,             /* version */
index 42856d329182e64ead9032529ac26e5031a271bf..f2f5eb89aa72359110d8f71bbd2468dd085b2265 100644 (file)
@@ -49,9 +49,6 @@ extern const struct Curl_ssl Curl_ssl_gskit;
 /* Set the API backend definition to GSKit */
 #define CURL_SSL_BACKEND CURLSSLBACKEND_GSKIT
 
-/* this backend supports CURLOPT_CERTINFO */
-#define have_curlssl_certinfo 1
-
 #endif /* USE_GSKIT */
 
 #endif /* HEADER_CURL_GSKIT_H */
index 3105a4b13aff5968d8ab235b6dec43fbf8aa1e96..fbbcdf334d2d0f8c25afb5bc9138cf098ce98da5 100644 (file)
@@ -1789,6 +1789,11 @@ bool Curl_gtls_cert_status_request(void)
 const struct Curl_ssl Curl_ssl_gnutls = {
   "gnutls",                      /* name */
 
+  1, /* have_ca_path */
+  1, /* have_certinfo */
+  1, /* have_pinnedpubkey */
+  0, /* have_ssl_ctx */
+
   Curl_gtls_init,                /* init */
   Curl_gtls_cleanup,             /* cleanup */
   Curl_gtls_version,             /* version */
index 05bd834f2974622753cd3707a5a0b512d0319426..d393b889d599e7e44afda60c1f8ec64e49a64e3b 100644 (file)
@@ -57,14 +57,5 @@ extern const struct Curl_ssl Curl_ssl_gnutls;
 /* Set the API backend definition to GnuTLS */
 #define CURL_SSL_BACKEND CURLSSLBACKEND_GNUTLS
 
-/* this backend supports the CAPATH option */
-#define have_curlssl_ca_path 1
-
-/* this backend supports CURLOPT_CERTINFO */
-#define have_curlssl_certinfo 1
-
-/* this backend supports CURLOPT_PINNEDPUBLICKEY */
-#define have_curlssl_pinnedpubkey 1
-
 #endif /* USE_GNUTLS */
 #endif /* HEADER_CURL_GTLS_H */
index 0ab471306fea0af45bf83719feb230ba0f8b148c..c925ea93c560ac38d3d70cf1598e2127404dd7b3 100644 (file)
@@ -1018,6 +1018,11 @@ static void Curl_mbedtls_sha256sum(const unsigned char *input,
 const struct Curl_ssl Curl_ssl_mbedtls = {
   "mbedtls",                        /* name */
 
+  0, /* have_ca_path */
+  0, /* have_certinfo */
+  1, /* have_pinnedpubkey */
+  1, /* have_ssl_ctx */
+
   Curl_mbedtls_init,                /* init */
   Curl_mbedtls_cleanup,             /* cleanup */
   Curl_mbedtls_version,             /* version */
index 39e64c350ecbe106c16b9811962b3377b164c12e..aaf84bd54a7ff8d239b525441e0a107599b6f40c 100644 (file)
@@ -51,12 +51,6 @@ int Curl_mbedtls_shutdown(struct connectdata *conn, int sockindex);
 CURLcode Curl_mbedtls_random(struct Curl_easy *data, unsigned char *entropy,
                      size_t length);
 
-/* this backends supports CURLOPT_PINNEDPUBLICKEY */
-#define have_curlssl_pinnedpubkey 1
-
-/* this backend supports CURLOPT_SSL_CTX_* */
-#define have_curlssl_ssl_ctx 1
-
 extern const struct Curl_ssl Curl_ssl_mbedtls;
 
 #define CURL_SSL_BACKEND CURLSSLBACKEND_MBEDTLS
index 603601b55171b4e600e842407e657b06118aa005..ff338940c730bf1a4f8265ab205215b2ca4a5907 100644 (file)
@@ -2327,6 +2327,11 @@ bool Curl_nss_false_start(void)
 const struct Curl_ssl Curl_ssl_nss = {
   "nss",                        /* name */
 
+  1, /* have_ca_path */
+  1, /* have_certinfo */
+  1, /* have_pinnedpubkey */
+  0, /* have_ssl_ctx */
+
   Curl_nss_init,                /* init */
   Curl_nss_cleanup,             /* cleanup */
   Curl_nss_version,             /* version */
index 37c4b5b7110efb2effa6e8f09f16dc79d66c0bd8..222c6e28e5db637ec9e364dcdc567503ad196711 100644 (file)
@@ -64,14 +64,5 @@ extern const struct Curl_ssl Curl_ssl_nss;
 /* Set the API backend definition to NSS */
 #define CURL_SSL_BACKEND CURLSSLBACKEND_NSS
 
-/* this backend supports the CAPATH option */
-#define have_curlssl_ca_path 1
-
-/* this backend supports CURLOPT_CERTINFO */
-#define have_curlssl_certinfo 1
-
-/* this backends supports CURLOPT_PINNEDPUBLICKEY */
-#define have_curlssl_pinnedpubkey 1
-
 #endif /* USE_NSS */
 #endif /* HEADER_CURL_NSSG_H */
index eeecd9da61d8594f8b84579fc4def842f71e4fed..7376588c3824dece983088adbf6ce1c136238222 100644 (file)
@@ -3390,6 +3390,11 @@ bool Curl_ossl_cert_status_request(void)
 const struct Curl_ssl Curl_ssl_openssl = {
   "openssl",                     /* name */
 
+  1, /* have_ca_path */
+  1, /* have_certinfo */
+  1, /* have_pinnedpubkey */
+  1, /* have_ssl_ctx */
+
   Curl_ossl_init,                /* init */
   Curl_ossl_cleanup,             /* cleanup */
   Curl_ossl_version,             /* version */
index 8e14f45492368e6c928d4ba261271a7ff09b3bce..c17dff28471ef8e9d6de2c9d5c2609e28df7b004 100644 (file)
@@ -79,18 +79,6 @@ extern const struct Curl_ssl Curl_ssl_openssl;
 /* Set the API backend definition to OpenSSL */
 #define CURL_SSL_BACKEND CURLSSLBACKEND_OPENSSL
 
-/* this backend supports the CAPATH option */
-#define have_curlssl_ca_path 1
-
-/* this backend supports CURLOPT_CERTINFO */
-#define have_curlssl_certinfo 1
-
-/* this backend supports CURLOPT_SSL_CTX_* */
-#define have_curlssl_ssl_ctx 1
-
-/* this backend supports CURLOPT_PINNEDPUBLICKEY */
-#define have_curlssl_pinnedpubkey 1
-
 #define DEFAULT_CIPHER_SELECTION \
   "ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH"
 
index 5b48945a625fcd83df6f480b600fca27912d5898..4d8db72d8b63a4827eb2eef86caeb97e9fec2ca4 100644 (file)
@@ -881,6 +881,11 @@ static void Curl_polarssl_sha256sum(const unsigned char *input,
 const struct Curl_ssl Curl_ssl_polarssl = {
   "polarssl",                        /* name */
 
+  1, /* have_ca_path */
+  0, /* have_certinfo */
+  1, /* have_pinnedpubkey */
+  0, /* have_ssl_ctx */
+
   Curl_polarssl_init,                /* init */
   Curl_polarssl_cleanup,             /* cleanup */
   Curl_polarssl_version,             /* version */
index 7109fe5ba85c91f6f254c2bfe7bbbccbbffb4fca..b2560ddb17cbd25fc86680743d404f24fb29237b 100644 (file)
@@ -50,11 +50,5 @@ extern const struct Curl_ssl Curl_ssl_polarssl;
 /* Set the API backend definition to PolarSSL */
 #define CURL_SSL_BACKEND CURLSSLBACKEND_POLARSSL
 
-/* this backend supports the CAPATH option */
-#define have_curlssl_ca_path 1
-
-/* this backends supports CURLOPT_PINNEDPUBLICKEY */
-#define have_curlssl_pinnedpubkey 1
-
 #endif /* USE_POLARSSL */
 #endif /* HEADER_CURL_POLARSSL_H */
index 6ee707b0d4da379678c17d942cacd69a48e633d6..fe7ec47b8f65c589fa168275b33cb6c560df3eb4 100644 (file)
@@ -1729,6 +1729,11 @@ static CURLcode verify_certificate(struct connectdata *conn, int sockindex)
 const struct Curl_ssl Curl_ssl_schannel = {
   "schannel",                        /* name */
 
+  0, /* have_ca_path */
+  1, /* have_certinfo */
+  0, /* have_pinnedpubkey */
+  0, /* have_ssl_ctx */
+
   Curl_schannel_init,                /* init */
   Curl_schannel_cleanup,             /* cleanup */
   Curl_schannel_version,             /* version */
index 1314445c0f42d408e3508515f850b29e015e8b56..aaf253a6bbeea51881e1b9eadfc839dc9236ad8f 100644 (file)
@@ -100,8 +100,5 @@ extern const struct Curl_ssl Curl_ssl_schannel;
 /* Set the API backend definition to Schannel */
 #define CURL_SSL_BACKEND CURLSSLBACKEND_SCHANNEL
 
-/* this backend supports CURLOPT_CERTINFO */
-#define have_curlssl_certinfo 1
-
 #endif /* USE_SCHANNEL */
 #endif /* HEADER_CURL_SCHANNEL_H */
index d42422d118319c7d0436ec07d7aa16ed6719ac0b..8b3ff05ae26cd8596eb21d0e4eb0c966e115b0b3 100644 (file)
@@ -28,6 +28,11 @@ struct connectdata;
 struct Curl_ssl {
   const char *name;
 
+  unsigned have_ca_path:1;      /* supports CAPATH */
+  unsigned have_certinfo:1;     /* supports CURLOPT_CERTINFO */
+  unsigned have_pinnedpubkey:1; /* supports CURLOPT_PINNEDPUBLICKEY */
+  unsigned have_ssl_ctx:1;      /* supports CURLOPT_SSL_CTX_* */
+
   int (*init)(void);
   void (*cleanup)(void);