[mapserver-commits] r9017 - branches/branch-5-4/mapserver

svn at osgeo.org svn at osgeo.org
Fri May 15 07:43:56 EDT 2009


Author: dmorissette
Date: 2009-05-15 07:43:56 -0400 (Fri, 15 May 2009)
New Revision: 9017

Modified:
   branches/branch-5-4/mapserver/HISTORY.TXT
   branches/branch-5-4/mapserver/maphttp.c
Log:
Added CURL_CA_BUNDLE env. var. (#3007)

Modified: branches/branch-5-4/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-4/mapserver/HISTORY.TXT	2009-05-15 11:34:38 UTC (rev 9016)
+++ branches/branch-5-4/mapserver/HISTORY.TXT	2009-05-15 11:43:56 UTC (rev 9017)
@@ -14,6 +14,12 @@
 Current Version:
 ----------------
 
+- Added CURL_CA_BUNDLE env. var. to enable using HTTPS services in WMS/WFS
+  client connections (#3007)
+
+- Fixed a problem with an error message with mode=legendicon, wrong string 
+  being output.
+
 - Fixed detection of freetype when installed in non-system directory (#3008)
 
 - Fixed detection of libpng + zlib headers with experimental-png enabled (#3010)
@@ -30,7 +36,8 @@
 
 - Fix Getlegendgraphic when sizeunit is set (#2983)
 
-- Fix mapogcfilter.c not to cause syntax error if PROJ.4 is not compiled in (#2987)
+- Fix mapogcfilter.c not to cause syntax error if PROJ.4 is not compiled
+  in (#2987)
 
 Version 5.4.0 (2009-04-22):
 ---------------------------

Modified: branches/branch-5-4/mapserver/maphttp.c
===================================================================
--- branches/branch-5-4/mapserver/maphttp.c	2009-05-15 11:34:38 UTC (rev 9016)
+++ branches/branch-5-4/mapserver/maphttp.c	2009-05-15 11:43:56 UTC (rev 9017)
@@ -267,6 +267,7 @@
     CURLM   *multi_handle;
     CURLMsg *curl_msg;
     char     debug = MS_FALSE;
+    const char *pszCurlCABundle = NULL;
 
     if (numRequests == 0)
         return MS_SUCCESS;  /* Nothing to do */
@@ -291,9 +292,17 @@
     if (nTimeout <= 0)
         nTimeout = 30;
 
+    /* Check if we've got a CURL_CA_BUNDLE env. var.
+     * If set then the value is the full path to the ca-bundle.crt file
+     * e.g. CURL_CA_BUNDLE=/usr/local/share/curl/curl-ca-bundle.crt
+     */
+    pszCurlCABundle = getenv("CURL_CA_BUNDLE");
+
     if (debug)
     {
         msDebug("HTTP: Starting to prepare HTTP requests.\n");
+        if (pszCurlCABundle)
+            msDebug("Using CURL_CA_BUNDLE=%s\n", pszCurlCABundle);
     }
 
     /* Alloc a curl-multi handle, and add a curl-easy handle to it for each
@@ -394,7 +403,11 @@
 
         /* Set timeout.*/
         curl_easy_setopt(http_handle, CURLOPT_TIMEOUT, nTimeout );
-        
+
+        /* Pass CURL_CA_BUNDLE if set */
+        if (pszCurlCABundle)
+            curl_easy_setopt(http_handle, CURLOPT_CAINFO, pszCurlCABundle );
+
         /* Set proxying settings */
         if (pasReqInfo[i].pszProxyAddress != NULL
             && strlen(pasReqInfo[i].pszProxyAddress) > 0)



More information about the mapserver-commits mailing list