XMLSEC_LIBS="-lxmltooling"
AC_CHECK_HEADER([xmltooling/base.h],,
AC_MSG_ERROR([unable to find xmltooling header files]))
+
+
+# save and append master libs
+save_LIBS="$LIBS"
+LIBS="$XMLSEC_LIBS $LIBS"
+
+AC_TRY_LINK(
+ [#include <xmltooling/io/HTTPResponse.h>],
+ [xmltooling::HTTPResponse::sanitizeURL("http://test")],
+ [AC_DEFINE(HAVE_XMLTOOLING,1,[Define if xmltooling library was found])],
+ [AC_MSG_ERROR([unable to link with XMLTooling, or version was too old])])
+
+# restore master libs
+LIBS="$save_LIBS"
# Establish location of xmltooling catalog.
XMLTOOLINGXMLDIR=""
const Application& application, HTTPResponse& httpResponse, const char* url, DDF& postData
) const
{
+ HTTPResponse::sanitizeURL(url);
+
const PropertySet* props=application.getPropertySet("Sessions");
pair<bool,const char*> postTemplate = props->getString("postTemplate");
if (!postTemplate.first)
# include <saml/saml2/metadata/MetadataProvider.h>
# include <saml/util/SAMLConstants.h>
# include <xmltooling/security/CredentialResolver.h>
+# include <xmltooling/security/SecurityHelper.h>
# include <xmltooling/security/TrustEngine.h>
# include <xmltooling/util/ReplayCache.h>
# include <xmltooling/util/StorageService.h>
index = props->getInt("artifactEndpointIndex");
if (!index.first)
index = getArtifactEndpointIndex();
- return new SAML2ArtifactType0004(SAMLConfig::getConfig().hashSHA1(props->getString("entityID").second),index.first ? index.second : 1);
+ pair<bool,const char*> entityID = props->getString("entityID");
+ return new SAML2ArtifactType0004(
+ SecurityHelper::doHash("SHA1", entityID.second, strlen(entityID.second), false),
+ index.first ? index.second : 1
+ );
}
MetadataProvider* getMetadataProvider(bool required=true) const {
if (unsafe.first)
TemplateEngine::unsafe_chars = unsafe.second;
+ unsafe = getString("allowedSchemes");
+ if (unsafe.first) {
+ HTTPResponse::getAllowedSchemes().clear();
+ string schemes=unsafe.second;
+ unsigned int j_sch=0;
+ for (unsigned int i_sch=0; i_sch < schemes.length(); i_sch++) {
+ if (schemes.at(i_sch)==' ') {
+ HTTPResponse::getAllowedSchemes().push_back(schemes.substr(j_sch, i_sch-j_sch));
+ j_sch = i_sch + 1;
+ }
+ }
+ HTTPResponse::getAllowedSchemes().push_back(schemes.substr(j_sch, schemes.length()-j_sch));
+ }
+
// Extensions
doExtensions(e, "global", log);
if (conf.isEnabled(SPConfig::OutOfProcess))