summaryrefslogtreecommitdiff
path: root/src/raptor_www.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2011-07-25 21:08:53 -0700
committerDave Beckett <dave@dajobe.org>2011-07-25 21:24:36 -0700
commit4fc7e3af62bd45018c0ce814990cf4c2843f8221 (patch)
treef392c497c03389cb1272c490d6cd22c4c0e7aad9 /src/raptor_www.c
parent8f572c2ed9b7671d037ac522ea564804c234980f (diff)
downloadraptor-4fc7e3af62bd45018c0ce814990cf4c2843f8221.tar.gz
Implement WWW feching SSL client certificate options
raptor_option gains: RAPTOR_OPTION_WWW_CERT_FILENAME, RAPTOR_OPTION_WWW_CERT_TYPE and RAPTOR_OPTION_WWW_CERT_PASSPHRASE (raptor_www_set_ssl_cert_options): Added public API to set SSL client certificates on WWW. (raptor_www_curl_set_ssl_cert_options): Added for libcurl to implement above. (raptor_parser_parse_uri_with_connection): Use raptor_www_set_ssl_cert_options() to turn the parser options into settings on the WWW object.
Diffstat (limited to 'src/raptor_www.c')
-rw-r--r--src/raptor_www.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/raptor_www.c b/src/raptor_www.c
index 74149e94..ed22fe27 100644
--- a/src/raptor_www.c
+++ b/src/raptor_www.c
@@ -468,6 +468,32 @@ raptor_www_set_uri_filter(raptor_www* www,
/**
+ * raptor_www_set_ssl_cert_options:
+ * @www: WWW object
+ * @cert_filename: SSL client certificate file
+ * @cert_type: SSL client certificate type (default is "PEM")
+ * @cert_passphrase: SSL client certificate password
+ *
+ * Set SSL client certificate options (where supported)
+ *
+ * Return value: non-0 when setting options is not supported
+ **/
+int
+raptor_www_set_ssl_cert_options(raptor_www* www,
+ const char* cert_filename,
+ const char* cert_type,
+ const char* cert_passphrase)
+{
+#ifdef RAPTOR_WWW_LIBCURL
+ return raptor_www_curl_set_ssl_cert_options(www, cert_filename, cert_type,
+ cert_passphrase);
+#else
+ return 1;
+#endif
+}
+
+
+/**
* raptor_www_get_connection:
* @www: #raptor_www object
*