From: Michael Wallner Date: Sun, 19 Nov 2006 14:34:23 +0000 (+0000) Subject: - check for curls bundled ca certs X-Git-Tag: RELEASE_1_4_0RC1~19 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=d886588e9d3193d182ee5ed82741aba45f028d52;p=m6w6%2Fext-http - check for curls bundled ca certs --- diff --git a/config9.m4 b/config9.m4 index 8bedac7..c154ed0 100644 --- a/config9.m4 +++ b/config9.m4 @@ -211,6 +211,21 @@ dnl ---- AC_MSG_RESULT([no]) fi + AC_MSG_CHECKING([for bundled SSL CA info]) + CURL_CAINFO= + for i in `$CURL_CONFIG --ca` "/etc/ssl/certs/ca-certificates.crt"; do + if test -f "$i"; then + CURL_CAINFO="$i" + break + fi + done + if test -z "$CURL_CAINFO"; then + AC_MSG_RESULT([not found]) + else + AC_MSG_RESULT([$CURL_CAINFO]) + AC_DEFINE_UNQUOTED([HTTP_CURL_CAINFO], ["$CURL_CAINFO"], [path to bundled SSL CA info]) + fi + PHP_ADD_INCLUDE($CURL_DIR/include) PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, HTTP_SHARED_LIBADD) PHP_EVAL_LIBLINE($CURL_LIBS, HTTP_SHARED_LIBADD) diff --git a/http_request_api.c b/http_request_api.c index 4fddd30..62b66bd 100644 --- a/http_request_api.c +++ b/http_request_api.c @@ -406,7 +406,11 @@ PHP_HTTP_API void _http_request_defaults(http_request *request) HTTP_CURL_OPT(CURLOPT_SSL_VERIFYPEER, 0L); HTTP_CURL_OPT(CURLOPT_SSL_VERIFYHOST, 0L); HTTP_CURL_OPT(CURLOPT_SSL_CIPHER_LIST, NULL); +#ifdef HTTP_CURL_CAINFO + HTTP_CURL_OPT(CURLOPT_CAINFO, HTTP_CURL_CAINFO); +#else HTTP_CURL_OPT(CURLOPT_CAINFO, NULL); +#endif HTTP_CURL_OPT(CURLOPT_CAPATH, NULL); HTTP_CURL_OPT(CURLOPT_RANDOM_FILE, NULL); HTTP_CURL_OPT(CURLOPT_EGDSOCKET, NULL);