summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e4e290)
raw | patch | inline | side by side (parent: 9e4e290)
author | octo <octo> | |
Tue, 25 Apr 2006 12:35:22 +0000 (12:35 +0000) | ||
committer | octo <octo> | |
Tue, 25 Apr 2006 12:35:22 +0000 (12:35 +0000) |
src/apache.c | patch | blob | history |
diff --git a/src/apache.c b/src/apache.c
index c731908a291cb05dfa75ce000c369892757baac7..c90213e7a72278e2ece3be650c53fdfee2af5446 100644 (file)
--- a/src/apache.c
+++ b/src/apache.c
# define APACHE_HAVE_READ 0
#endif
-static char *url = NULL;
-static char *user = NULL;
-static char *pass = NULL;
+static char *url = NULL;
+static char *user = NULL;
+static char *pass = NULL;
+static char *cacert = NULL;
#if HAVE_LIBCURL
static CURL *curl = NULL;
"URL",
"User",
"Password",
+ "CACert",
NULL
};
-static int config_keys_num = 3;
+static int config_keys_num = 4;
#if HAVE_LIBCURL
static size_t apache_curl_callback (void *buf, size_t size, size_t nmemb, void *stream)
return (config_set (&user, value));
else if (strcasecmp (key, "password") == 0)
return (config_set (&pass, value));
+ else if (strcasecmp (key, "cacert") == 0)
+ return (config_set (&cacert, value));
else
return (-1);
}
{
curl_easy_setopt (curl, CURLOPT_URL, url);
}
+
+ if (cacert != NULL)
+ {
+ curl_easy_setopt (curl, CURLOPT_CAINFO, cacert);
+ }
#endif /* HAVE_LIBCURL */
}