Moved key/cred resolution classes out of xmlsig namespace, start cleaning up configure.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 2 Mar 2007 02:47:52 +0000 (02:47 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 2 Mar 2007 02:47:52 +0000 (02:47 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2180 cb58f699-b61c-0410-a6fe-9272a202ed29

configure.ac
shibsp/ServiceProvider.h
shibsp/binding/SOAPClient.h
shibsp/impl/XMLServiceProvider.cpp
shibsp/security/PKIXTrustEngine.cpp
shibsp/shibsp.vcproj
util/samlquery.cpp

index f716d0e..d872ba7 100644 (file)
@@ -46,7 +46,6 @@ AC_STRUCT_TM
 AC_FUNC_STRFTIME
 AC_FUNC_STRERROR_R
 AC_CHECK_FUNCS([strchr strdup strstr gmtime_r ctime_r strtok_r strcasecmp])
-AC_CHECK_HEADERS([dlfcn.h])
 
 # old_LIBS="$LIBS"
 # AC_SEARCH_LIBS(xdr_uint64_t,nsl,,
@@ -65,48 +64,6 @@ else
     CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
 fi
 
-AC_ARG_WITH(dmalloc,
-            AC_HELP_STRING([--with-dmalloc=PATH], [where dmalloc is installed]),
-            [if test x_$with_dmalloc != x_/usr; then
-                LDFLAGS="-L${with_dmalloc}/lib $LDFLAGS"
-                CPPFLAGS="-I${with_dmalloc}/include $CPPFLAGS"
-            fi
-           AC_CHECK_LIB(dmallocxx, dmalloc_shutdown,,
-                        AC_MSG_ERROR([unable to find dmallocxx library]))
-           ])
-
-# OpenSSL settings
-AC_PATH_PROG(PKG_CONFIG, pkg-config)
-if test "x$PKG_CONFIG" = x || test "x$PKG_CONFIG" = "xno" ; then
-    AC_ARG_WITH(openssl, 
-            AC_HELP_STRING([--with-openssl=PATH], [where openssl is installed]),
-            [if test x_$with_openssl != x_/usr; then
-           SSLLIBS="-L${with_openssl}/lib"
-           SSLFLAGS="-I${with_openssl}/include"
-            fi])
-    SSLLIBS="$SSLLIBS -lssl -lcrypto"
-else
-    SSLLIBS="`$PKG_CONFIG --libs openssl`"
-    SSLFLAGS="`$PKG_CONFIG --cflags openssl`"
-fi
-AC_MSG_CHECKING(for OpenSSL libraries)
-AC_MSG_RESULT($SSLLIBS)
-LIBS="$LIBS $SSLLIBS"
-AC_MSG_CHECKING(for OpenSSL cflags)
-AC_MSG_RESULT($SSLFLAGS)
-CPPFLAGS="$SSLFLAGS $CPPFLAGS"
-
-AC_CHECK_HEADER([openssl/ssl.h],,
-                AC_MSG_ERROR([unable to find openssl header files]))
-AC_MSG_CHECKING(for ERR_load_CRYPTO_string)
-AC_TRY_LINK_FUNC([ERR_load_CRYPTO_strings],,
-             AC_MSG_ERROR([unable to link with openssl libraries]))
-AC_MSG_RESULT(yes)
-AC_MSG_CHECKING(for SSL_library_init)
-AC_TRY_LINK_FUNC([SSL_library_init],, 
-             AC_MSG_ERROR([unable to link with openssl libraries]))
-AC_MSG_RESULT(yes)
-
 AC_LANG(C++)
 
 # log4cpp settings
@@ -140,14 +97,14 @@ AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,
                 AC_MSG_ERROR([unable to find xerces header files]))
 AC_MSG_CHECKING([Xerces version])
 AC_PREPROC_IFELSE(
-        [AC_LANG_PROGRAM([#include <xercesc/util/XercesVersion.hpp>],
-[#if  _XERCES_VERSION > 20200 && _XERCES_VERSION != 20600
+    [AC_LANG_PROGRAM([#include <xercesc/util/XercesVersion.hpp>],
+[#if  _XERCES_VERSION != 20600
 int i = 0;
 #else
-#error requires version > 2.2.0 but not 2.6.0
+#error cannot use version 2.6.0
 #endif])],
-        [AC_MSG_RESULT(OK)],
-        [AC_MSG_ERROR([Shibboleth requires patched Xerces version 2.6.1 (http://shibboleth.internet2.edu/downloads/)])])
+    [AC_MSG_RESULT(OK)],
+    [AC_MSG_FAILURE([Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use a newer version])])
 AC_TRY_LINK(
         [#include <xercesc/util/PlatformUtils.hpp>],
         [xercesc::XMLPlatformUtils::Initialize()],
@@ -157,18 +114,29 @@ AC_TRY_LINK(
 
 # XML-Security settings
 AC_ARG_WITH(xmlsec,
-            AC_HELP_STRING([--with-xmlsec=PATH], [where xmlsec is installed]),
-            [if test x_$with_xmlsec != x_/usr; then
-                LDFLAGS="-L${with_xmlsec}/lib $LDFLAGS"
-                CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
-            fi])
+            AC_HELP_STRING([--with-xmlsec=PATH], [where xmlsec is installed]),,
+            [with_xmlsec=/usr])
+
+if test x_$with_xmlsec != x_/usr; then
+    LDFLAGS="-L${with_xmlsec}/lib $LDFLAGS"
+    CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
+fi        
 LIBS="-lxml-security-c $LIBS"
-AC_CHECK_HEADER([xsec/xenc/XENCEncryptionMethod.hpp],,AC_MSG_ERROR([unable to find xml-security 1.1 header files]),[#include <xercesc/dom/DOM.hpp>])
+AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find XML-Security header files]))
+AC_MSG_CHECKING([XML-Security version])
+AC_PREPROC_IFELSE(
+    [AC_LANG_PROGRAM([#include <xsec/utils/XSECPlatformUtils.hpp>],
+    [#if XSEC_VERSION_MAJOR > 1 || XSEC_VERSION_MEDIUM >2 
+int i = 0;
+#else
+#error need version 1.3 or later
+#endif])],
+    [AC_MSG_RESULT(OK)],
+    [AC_MSG_FAILURE([XML-Security version 1.3 or greater is required.])])
 AC_TRY_LINK(
         [#include <xsec/utils/XSECPlatformUtils.hpp>],
-        [XSECPlatformUtils::Initialise()],
-        [AC_DEFINE(HAVE_LIBXSEC,1,[Define if XML-Sec library was found])],
-        [AC_MSG_ERROR([unable to link with xml-security])])
+        [XSECPlatformUtils::Initialise()],,
+        [AC_MSG_ERROR([unable to link with XML-Sec])])
 
 # OpenSAML settings
 AC_ARG_WITH(saml,
@@ -189,7 +157,7 @@ opensaml::SAMLConfig::getConfig();
 #error Need OpenSAML version 2.0 or higher
 #endif],
         [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])],
-        [AC_MSG_ERROR([unable to link with saml, or version too old])])
+        [AC_MSG_ERROR([unable to link with OpenSAML, or version was too old])])
 
 # output the underlying makefiles
 WANT_SUBDIRS="doc schemas configs shibsp shibd siterefresh test"
index 79cac91..45c76b3 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <shibsp/util/PropertySet.h>
 #include <saml/binding/SecurityPolicyRule.h>
-#include <xmltooling/signature/CredentialResolver.h>
+#include <xmltooling/security/CredentialResolver.h>
 #include <xmltooling/util/StorageService.h>
 
 namespace shibsp {
@@ -99,7 +99,7 @@ namespace shibsp {
          * @param id    a NULL-terminated key identifying the CredentialResolver to the configuration 
          * @return  a CredentialResolver if available, or NULL
          */
-        virtual xmlsignature::CredentialResolver* getCredentialResolver(const char* id) const=0;
+        virtual xmltooling::CredentialResolver* getCredentialResolver(const char* id) const=0;
 
         /**
                 * Returns the security policy settings for an identified policy.
index 6ca9064..5c284ee 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <shibsp/Application.h>
 #include <saml/binding/SOAPClient.h>
-#include <xmltooling/signature/CredentialResolver.h>
+#include <xmltooling/security/CredentialResolver.h>
 
 namespace shibsp {
 
@@ -77,7 +77,7 @@ namespace shibsp {
         const PropertySet* m_credUse;
 
         /** Locked CredentialResolver for transport, set after transport prep. */
-        xmlsignature::CredentialResolver* m_credResolver;
+        xmltooling::CredentialResolver* m_credResolver;
     };
 
 };
index 209b504..5715c60 100644 (file)
@@ -57,7 +57,6 @@ using namespace opensaml;
 using namespace xmltooling;\r
 using namespace log4cpp;\r
 using namespace std;\r
-using xmlsignature::CredentialResolver;\r
 \r
 namespace {\r
 \r
index 8a30696..2330e7c 100644 (file)
@@ -85,23 +85,23 @@ namespace shibsp {
         }
     };
 
-    class SHIBSP_DLLLOCAL PKIXTrustEngine : public xmltooling::AbstractPKIXTrustEngine
+    class SHIBSP_DLLLOCAL PKIXTrustEngine : public AbstractPKIXTrustEngine
     {
     public:
         PKIXTrustEngine(const DOMElement* e=NULL) : AbstractPKIXTrustEngine(e) {}
         virtual ~PKIXTrustEngine() {}
         
-        xmltooling::AbstractPKIXTrustEngine::PKIXValidationInfoIterator* getPKIXValidationInfoIterator(
-            const xmltooling::KeyInfoSource& pkixSource, const xmlsignature::KeyResolver& keyResolver
+        AbstractPKIXTrustEngine::PKIXValidationInfoIterator* getPKIXValidationInfoIterator(
+            const KeyInfoSource& pkixSource, const KeyResolver& keyResolver
             ) const;
     };
     
     SHIBSP_DLLLOCAL PluginManager<TrustEngine,const DOMElement*>::Factory PKIXTrustEngineFactory;
 
-    TrustEngine* SHIBSP_DLLLOCAL PKIXTrustEngineFactory(const DOMElement* const & e)\r
-    {\r
-        return new PKIXTrustEngine(e);\r
-    }\r
+    TrustEngine* SHIBSP_DLLLOCAL PKIXTrustEngineFactory(const DOMElement* const & e)
+    {
+        return new PKIXTrustEngine(e);
+    }
 };
 
 void shibsp::registerPKIXTrustEngine()
index 4701abe..0ef2a59 100644 (file)
@@ -60,7 +60,7 @@
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="log4cppD.lib xerces-c_2D.lib xsec_1D.lib saml2D.lib xmltooling1D.lib wsock32.lib libeay32_0_9_8D.lib ssleay32_0_9_8D.lib"\r
+                               AdditionalDependencies="log4cppD.lib xerces-c_2D.lib xsec_1D.lib saml2D.lib xmltooling1D.lib wsock32.lib"\r
                                OutputFile="$(OutDir)\$(ProjectName)1_0D.dll"\r
                                LinkIncremental="2"\r
                                AdditionalLibraryDirectories="&quot;..\..\cpp-opensaml1\saml\Debug&quot;;&quot;..\..\cpp-opensaml2\Debug&quot;;&quot;..\..\cpp-xmltooling\Debug&quot;"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalDependencies="log4cpp.lib xerces-c_2.lib xsec_1.lib saml2.lib xmltooling1.lib wsock32.lib libeay32_0_9_8.lib ssleay32_0_9_8.lib"\r
+                               AdditionalDependencies="log4cpp.lib xerces-c_2.lib xsec_1.lib saml2.lib xmltooling1.lib wsock32.lib"\r
                                OutputFile="$(OutDir)\$(ProjectName)1_0.dll"\r
                                LinkIncremental="1"\r
                                AdditionalLibraryDirectories="&quot;..\..\cpp-opensaml1\saml\Release&quot;;&quot;..\..\cpp-opensaml2\Release&quot;;&quot;..\..\cpp-xmltooling\Release&quot;"\r
index 13ccf86..bc9a103 100644 (file)
@@ -35,6 +35,7 @@
 #include <shibsp/exceptions.h>\r
 #include <shibsp/SPConfig.h>\r
 #include <shibsp/ServiceProvider.h>\r
+#include <shibsp/attribute/resolver/AttributeResolver.h>\r
 #include <shibsp/binding/SOAPClient.h>\r
 #include <shibsp/util/SPConstants.h>\r
 \r