The OpenSAML V2 software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only.

libcurl

libcurl is a client-side networking library with very extensive and robust HTTP client support.

Project website: http://curl.haxx.se/libcurl/

As a well-maintained project in C, libcurl generally builds cleanly on most platforms, and is usually included in a usable form with Linux. Other platforms may include it, but sometimes the version is too old to use with Shibboleth, which requires a version newer than approximately 7.10.0. There are frequent security updates available, so always verify that the version in use isn't superseded.

Non-Windows

If you're building from source on a non-Windows platform, a typically usable configure command would be:

./configure --disable-static --enable-thread --without-ca-bundle

Many different options are supported to enable/disable advanced features. Most are irrelevant to Shibboleth, but a few may add obscure capabilities that might be useful to some people.

Windows


For the SPV3 documentation. Go to the WindowsBuild page...


On Windows, building the curl utility is optional, but the libcurl library is required. It's located in the lib folder of the source tree and contains a decent makefile that works, more or less, on MS compilers. Makefile.vc10 is for VS 2010. The problem is that it doesn't know about the filename changes made to the OpenSSL and zlib builds, and we want to make our own filename adjustments to avoid conflicts with third-party installations of the same library.

First, we adjust the DLL and import library names by modifying Makefile.msvc.names in the winbuild directory:

Modify Library Names
LIB_NAME_DYN_REL = $(LIB_NAME)5

32-Bit

The following edits have to be made to correspond with the changes desribed in the OpenSSL and zlib topics and to adjust the library filenames.

  • Edit the OPENSSL_PATH macro to point at your OpenSSL source tree
  • Add a DSSLLIBS macro with the filenames of the debug OpenSSL libraries
  • Edit the ZLIBLIBSDLL macro with the zlib1.lib filename
  • Add a DZLIBLIBSDLL macro with the zlib1d.lib debug filename
  • Edit the release-dll-ssl-dll-zlib-dlltarget section:
    • Edit the LFLAGSZLIB path to the proper location by adding \Release to the end
  • Edit the debug-dll-ssl-dll-zlib-dll target section:
    • Change the out32dll path to out32dll.dbg
    • Edit the LFLAGSZLIB path to the proper location by adding \Debug to the end
    • Change the $(SSLLIBS) reference to $(DSSLLIBS)
    • Change the $(ZLIBLIBSDLL) reference to $(DZLIBLIBSDLL)

With those changes, the debug-dll-ssl-dll-zlib-dll and release-dll-ssl-dll-zlib-dll targets can be built using:

nmake /f Makefile.vc10 CFG=release-dll-ssl-dll-zlib-dll
nmake /f Makefile.vc10 CFG=debug-dll-ssl-dll-zlib-dll

64-Bit

After making the modifications above, copy Makefile.vc10 to Makefile.vc10.x64 and make these changes:

  • Change the MACHINE macro to x64
  • Change the OpenSSL include paths from inc32 to inc64
  • Edit the release-dll-ssl-dll-zlib-dll target section:
    • Edit the LFLAGSZLIB path to the proper location by adding \x64\Release to the end
    • Change the out32dll path to out64dll
    • Add .x64 to the end of the $(DIROBJ) macro
  • Edit the debug-dll-ssl-dll-zlib-dll target section:
    • Edit the LFLAGSZLIB path to the proper location by adding \x64\Debug to the end
    • Change the out32dll.dbg path to out64dll.dbg
    • Add .x64 to the end of the $(DIROBJ) macro
  • Add .x64 to the end of the hardwired output directories at the end of the file in the Windows resource compiler rules.

Using an x64 Tools command prompt:

nmake /f Makefile.vc10.x64 CFG=release-dll-ssl-dll-zlib-dll
nmake /f Makefile.vc10.x64 CFG=debug-dll-ssl-dll-zlib-dll

Building with the top level makefile

It turns out that the makefile described above is deprecated.  (I believe that) The top level makefile can be used on an clean curl source, and an OpenSSL distribution build "nmake install_sw".  


The following files dependencies subdirectory of the cpp-msbuild project can be used to automate the build:

  • config.bat to set up the environment
  • libcurl-new.bat and libcurl-new-x64  to compile (requires the appropriate VS command line)