aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-09-13 15:11:26 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-09-13 15:11:26 +0200
commit7494f0f4981b2ccb55f1fc5aecad383a0d9a8569 (patch)
treee5a8ba622969e5213e2662c88fe809d4db14559e
parent4da70dea283ebffa6127b664c040e51393107554 (diff)
vtls: have the backend tell if it supports CERTINFO
-rw-r--r--lib/url.c7
-rw-r--r--lib/vtls/gskit.h3
-rw-r--r--lib/vtls/nssg.h3
-rw-r--r--lib/vtls/openssl.h3
-rw-r--r--lib/vtls/qssl.h3
5 files changed, 16 insertions, 3 deletions
diff --git a/lib/url.c b/lib/url.c
index b4d4a3919..3e90d4e30 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1977,12 +1977,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->set.ssl.fsslctxp = va_arg(param, void *);
break;
#endif
-#if defined(USE_SSLEAY) || defined(USE_QSOSSL) || defined(USE_GSKIT) || \
- defined(USE_NSS)
case CURLOPT_CERTINFO:
+#ifdef have_curlssl_certinfo
data->set.ssl.certinfo = (0 != va_arg(param, long))?TRUE:FALSE;
- break;
+#else
+ result = CURLE_NOT_BUILT_IN;
#endif
+ break;
case CURLOPT_CAINFO:
/*
* Set CA info for SSL connection. Specify file name of the CA certificate
diff --git a/lib/vtls/gskit.h b/lib/vtls/gskit.h
index a4caa6f23..7d1eb2282 100644
--- a/lib/vtls/gskit.h
+++ b/lib/vtls/gskit.h
@@ -42,6 +42,9 @@ int Curl_gskit_shutdown(struct connectdata * conn, int sockindex);
size_t Curl_gskit_version(char * buffer, size_t size);
int Curl_gskit_check_cxn(struct connectdata * cxn);
+/* this backend supports CURLOPT_CERTINFO */
+#define have_curlssl_certinfo 1
+
/* API setup for GSKit */
#define curlssl_init Curl_gskit_init
#define curlssl_cleanup Curl_gskit_cleanup
diff --git a/lib/vtls/nssg.h b/lib/vtls/nssg.h
index 311f873d7..81e794902 100644
--- a/lib/vtls/nssg.h
+++ b/lib/vtls/nssg.h
@@ -63,6 +63,9 @@ void Curl_nss_md5sum(unsigned char *tmp, /* input */
/* this backend provides these functions: */
#define have_curlssl_md5sum 1
+/* this backend supports CURLOPT_CERTINFO */
+#define have_curlssl_certinfo 1
+
/* API setup for NSS */
#define curlssl_init Curl_nss_init
#define curlssl_cleanup Curl_nss_cleanup
diff --git a/lib/vtls/openssl.h b/lib/vtls/openssl.h
index 6d6c75c82..e6f205170 100644
--- a/lib/vtls/openssl.h
+++ b/lib/vtls/openssl.h
@@ -79,6 +79,9 @@ void Curl_ossl_md5sum(unsigned char *tmp, /* input */
/* this backend supports the CAPATH option */
#define have_ca_path 1
+/* this backend supports CURLOPT_CERTINFO */
+#define have_curlssl_certinfo 1
+
/* API setup for OpenSSL */
#define curlssl_init Curl_ossl_init
#define curlssl_cleanup Curl_ossl_cleanup
diff --git a/lib/vtls/qssl.h b/lib/vtls/qssl.h
index 9764eecbe..07edb67e0 100644
--- a/lib/vtls/qssl.h
+++ b/lib/vtls/qssl.h
@@ -40,6 +40,9 @@ int Curl_qsossl_shutdown(struct connectdata * conn, int sockindex);
size_t Curl_qsossl_version(char * buffer, size_t size);
int Curl_qsossl_check_cxn(struct connectdata * cxn);
+/* this backend supports CURLOPT_CERTINFO */
+#define have_curlssl_certinfo 1
+
/* API setup for QsoSSL */
#define curlssl_init Curl_qsossl_init
#define curlssl_cleanup Curl_qsossl_cleanup