From: Scott Cantor Date: Fri, 2 Oct 2009 23:00:16 +0000 (+0000) Subject: Reducing header overuse, non-inlining selected methods (CPPOST-35). X-Git-Tag: 2.3~22 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=commitdiff_plain;h=5697d9abd4e6d149bbc6153acde26c3f0a5d4859 Reducing header overuse, non-inlining selected methods (CPPOST-35). --- diff --git a/saml/binding/SecurityPolicy.h b/saml/binding/SecurityPolicy.h index cb05450..670b47e 100644 --- a/saml/binding/SecurityPolicy.h +++ b/saml/binding/SecurityPolicy.h @@ -27,6 +27,7 @@ #include #include +#include #if defined (_MSC_VER) #pragma warning( push ) @@ -208,10 +209,7 @@ namespace opensaml { * * @param role the peer role element/type or NULL */ - void setRole(const xmltooling::QName* role) { - delete m_role; - m_role = role ? new xmltooling::QName(*role) : NULL; - } + void setRole(const xmltooling::QName* role); /** * Sets a TrustEngine for the policy. diff --git a/saml/binding/impl/SecurityPolicy.cpp b/saml/binding/impl/SecurityPolicy.cpp index 540cdae..4886905 100644 --- a/saml/binding/impl/SecurityPolicy.cpp +++ b/saml/binding/impl/SecurityPolicy.cpp @@ -115,6 +115,12 @@ void SecurityPolicy::_reset(bool messageOnly) } } +void SecurityPolicy::setRole(const xmltooling::QName* role) +{ + delete m_role; + m_role = role ? new xmltooling::QName(*role) : NULL; +} + MetadataProvider::Criteria& SecurityPolicy::getMetadataProviderCriteria() const { if (!m_metadataCriteria) diff --git a/saml/binding/impl/SimpleSigningRule.cpp b/saml/binding/impl/SimpleSigningRule.cpp index a48f040..59cd3d6 100644 --- a/saml/binding/impl/SimpleSigningRule.cpp +++ b/saml/binding/impl/SimpleSigningRule.cpp @@ -17,7 +17,7 @@ /** * SimpleSigningRule.cpp * - * Blob-oriented signature checking SecurityPolicyRule + * Blob-oriented signature checking SecurityPolicyRule. */ #include "internal.h" @@ -34,6 +34,8 @@ #include #include #include +#include +#include using namespace opensaml::saml2md; using namespace opensaml; diff --git a/saml/binding/impl/XMLSigningRule.cpp b/saml/binding/impl/XMLSigningRule.cpp index 12f459d..3ab67a5 100644 --- a/saml/binding/impl/XMLSigningRule.cpp +++ b/saml/binding/impl/XMLSigningRule.cpp @@ -32,6 +32,7 @@ #include #include +#include using namespace opensaml::saml2md; using namespace opensaml; diff --git a/saml/saml1/binding/impl/SAML1POSTEncoder.cpp b/saml/saml1/binding/impl/SAML1POSTEncoder.cpp index 600cd4b..42f9c55 100644 --- a/saml/saml1/binding/impl/SAML1POSTEncoder.cpp +++ b/saml/saml1/binding/impl/SAML1POSTEncoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ /** * SAML1POSTEncoder.cpp * - * SAML 1.x POST binding/profile message encoder + * SAML 1.x POST binding/profile message encoder. */ #include "internal.h" @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include diff --git a/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp b/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp index a036dd3..7066055 100644 --- a/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp +++ b/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ /** * SAML1SOAPEncoder.cpp * - * SAML 1.x SOAP binding message encoder + * SAML 1.x SOAP binding message encoder. */ #include "internal.h" @@ -29,6 +29,7 @@ #include #include #include +#include #include #include diff --git a/saml/saml1/core/Assertions.h b/saml/saml1/core/Assertions.h index dc7c6c3..c74e8b9 100644 --- a/saml/saml1/core/Assertions.h +++ b/saml/saml1/core/Assertions.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ /** * @file saml/saml1/core/Assertions.h * - * XMLObjects representing the SAML 1.x Assertions schema + * XMLObjects representing the SAML 1.x Assertions schema. */ #ifndef __saml1_assertions_h__ @@ -27,14 +27,20 @@ #include #include -#include -#include -#include -#include +#include #define DECL_SAML1OBJECTBUILDER(cname) \ DECL_XMLOBJECTBUILDER(SAML_API,cname,samlconstants::SAML1_NS,samlconstants::SAML1_PREFIX) +namespace xmltooling { + class XMLTOOL_API DateTime; +}; + +namespace xmlsignature { + class XMLTOOL_API KeyInfo; + class XMLTOOL_API Signature; +}; + namespace opensaml { /** diff --git a/saml/saml1/core/Protocols.h b/saml/saml1/core/Protocols.h index 5731522..10fc9c7 100644 --- a/saml/saml1/core/Protocols.h +++ b/saml/saml1/core/Protocols.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ /** * @file saml/saml1/core/Protocols.h * - * XMLObjects representing the SAML 1.x Protocols schema + * XMLObjects representing the SAML 1.x Protocols schema. */ #ifndef __saml1_protocols_h__ @@ -26,14 +26,21 @@ #include #include -#include -#include -#include -#include +#include +#include #define DECL_SAML1POBJECTBUILDER(cname) \ DECL_XMLOBJECTBUILDER(SAML_API,cname,samlconstants::SAML1P_NS,samlconstants::SAML1P_PREFIX) +namespace xmltooling { + class XMLTOOL_API DateTime; +}; + +namespace xmlsignature { + class XMLTOOL_API KeyInfo; + class XMLTOOL_API Signature; +}; + namespace opensaml { namespace saml1 { diff --git a/saml/saml1/core/impl/AssertionsImpl.cpp b/saml/saml1/core/impl/AssertionsImpl.cpp index ac0fde1..cf7a4ee 100644 --- a/saml/saml1/core/impl/AssertionsImpl.cpp +++ b/saml/saml1/core/impl/AssertionsImpl.cpp @@ -17,18 +17,21 @@ /** * AssertionsImpl.cpp * - * Implementation classes for SAML 1.x Assertions schema + * Implementation classes for SAML 1.x Assertions schema. */ #include "internal.h" #include "exceptions.h" #include "saml1/core/Assertions.h" +#include "signature/ContentReference.h" #include #include #include #include #include +#include +#include #include #include @@ -1064,9 +1067,9 @@ namespace opensaml { const_cast(this)->m_AssertionID=SAMLConfig::getConfig().generateIdentifier(); domElement->setAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME, m_AssertionID); if (*m_MinorVersion!=chDigit_0) { -#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE +#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE domElement->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME, true); -#else +#else domElement->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME); #endif } @@ -1094,9 +1097,9 @@ namespace opensaml { // Standard processing, but then we check IDness. AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement); if (m_AssertionID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0)) { -#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE +#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE const_cast(domElement)->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME, true); -#else +#else const_cast(domElement)->setIdAttributeNS(NULL, ASSERTIONID_ATTRIB_NAME); #endif } diff --git a/saml/saml1/core/impl/ProtocolsImpl.cpp b/saml/saml1/core/impl/ProtocolsImpl.cpp index 6d8bb4e..abcaa77 100644 --- a/saml/saml1/core/impl/ProtocolsImpl.cpp +++ b/saml/saml1/core/impl/ProtocolsImpl.cpp @@ -17,19 +17,21 @@ /** * ProtocolsImpl.cpp * - * Implementation classes for SAML 1.x Protocols schema + * Implementation classes for SAML 1.x Protocols schema. */ #include "internal.h" #include "exceptions.h" #include "saml1/core/Assertions.h" #include "saml1/core/Protocols.h" +#include "signature/ContentReference.h" #include #include #include #include #include +#include #include #include @@ -390,7 +392,7 @@ namespace opensaml { const_cast(this)->m_RequestID=SAMLConfig::getConfig().generateIdentifier(); domElement->setAttributeNS(NULL, REQUESTID_ATTRIB_NAME, m_RequestID); if (*m_MinorVersion!=chDigit_0) { -#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE +#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE domElement->setIdAttributeNS(NULL, REQUESTID_ATTRIB_NAME, true); #else domElement->setIdAttributeNS(NULL, REQUESTID_ATTRIB_NAME); @@ -413,7 +415,7 @@ namespace opensaml { // Standard processing, but then we check IDness. AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement); if (m_RequestID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0)) { -#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE +#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE const_cast(domElement)->setIdAttributeNS(NULL, REQUESTID_ATTRIB_NAME, true); #else const_cast(domElement)->setIdAttributeNS(NULL, REQUESTID_ATTRIB_NAME); @@ -729,7 +731,7 @@ namespace opensaml { const_cast(this)->m_ResponseID=SAMLConfig::getConfig().generateIdentifier(); domElement->setAttributeNS(NULL, RESPONSEID_ATTRIB_NAME, m_ResponseID); if (*m_MinorVersion!=chDigit_0) { -#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE +#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE domElement->setIdAttributeNS(NULL, RESPONSEID_ATTRIB_NAME, true); #else domElement->setIdAttributeNS(NULL, RESPONSEID_ATTRIB_NAME); @@ -753,7 +755,7 @@ namespace opensaml { // Standard processing, but then we check IDness. AbstractXMLObjectUnmarshaller::unmarshallAttributes(domElement); if (m_ResponseID && (!m_MinorVersion || *m_MinorVersion!=chDigit_0)) { -#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE +#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE const_cast(domElement)->setIdAttributeNS(NULL, RESPONSEID_ATTRIB_NAME, true); #else const_cast(domElement)->setIdAttributeNS(NULL, RESPONSEID_ATTRIB_NAME); diff --git a/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp b/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp index 9ac6dea..7c4d16f 100644 --- a/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp @@ -17,7 +17,7 @@ /** * SAML2ArtifactEncoder.cpp * - * SAML 2.0 HTTP-Artifact binding message encoder + * SAML 2.0 HTTP-Artifact binding message encoder. */ #include "internal.h" @@ -27,12 +27,14 @@ #include "saml2/binding/SAML2Artifact.h" #include "saml2/core/Protocols.h" #include "saml2/metadata/Metadata.h" +#include "signature/ContentReference.h" #include #include #include #include #include +#include #include #include #include diff --git a/saml/saml2/binding/impl/SAML2ECPEncoder.cpp b/saml/saml2/binding/impl/SAML2ECPEncoder.cpp index a869598..a6adf4b 100644 --- a/saml/saml2/binding/impl/SAML2ECPEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2ECPEncoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ /** * SAML2ECPEncoder.cpp * - * SAML 2.0 ECP profile message encoder + * SAML 2.0 ECP profile message encoder. */ #include "internal.h" @@ -32,6 +32,7 @@ #include #include #include +#include #include using namespace samlconstants; diff --git a/saml/saml2/binding/impl/SAML2POSTEncoder.cpp b/saml/saml2/binding/impl/SAML2POSTEncoder.cpp index e4cdc92..f2f7714 100644 --- a/saml/saml2/binding/impl/SAML2POSTEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2POSTEncoder.cpp @@ -17,7 +17,7 @@ /** * SAML2POSTEncoder.cpp * - * SAML 2.0 HTTP-POST binding message encoder + * SAML 2.0 HTTP-POST binding message encoder. */ #include "internal.h" @@ -34,6 +34,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp b/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp index f6e1214..1af4dc2 100644 --- a/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp @@ -17,7 +17,7 @@ /** * SAML2RedirectEncoder.cpp * - * SAML 2.0 HTTP-POST binding message encoder + * SAML 2.0 HTTP-POST binding message encoder. */ #include "internal.h" @@ -34,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp b/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp index a4aa894..4de8b7f 100644 --- a/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ /** * SAML2SOAPEncoder.cpp * - * SAML 2.0 SOAP binding message encoder + * SAML 2.0 SOAP binding message encoder. */ #include "internal.h" @@ -30,6 +30,7 @@ #include #include #include +#include #include using namespace opensaml::saml2p; diff --git a/saml/saml2/core/Assertions.h b/saml/saml2/core/Assertions.h index 4b2b896..94f4c53 100644 --- a/saml/saml2/core/Assertions.h +++ b/saml/saml2/core/Assertions.h @@ -17,7 +17,7 @@ /** * @file saml/saml2/core/Assertions.h * - * XMLObjects representing the SAML 2.0 Assertions schema + * XMLObjects representing the SAML 2.0 Assertions schema. */ #ifndef __saml2_assertions_h__ @@ -26,16 +26,28 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include #define DECL_SAML2OBJECTBUILDER(cname) \ DECL_XMLOBJECTBUILDER(SAML_API,cname,samlconstants::SAML20_NS,samlconstants::SAML20_PREFIX) +namespace xmltooling { + class XMLTOOL_API CredentialCriteria; + class XMLTOOL_API CredentialResolver; + class XMLTOOL_API DateTime; +}; + +namespace xmlencryption { + class XMLTOOL_API EncryptedData; + class XMLTOOL_API EncryptedKey; +}; + +namespace xmlsignature { + class XMLTOOL_API KeyInfo; + class XMLTOOL_API Signature; +}; + namespace opensaml { namespace saml2md { diff --git a/saml/saml2/core/impl/Assertions20Impl.cpp b/saml/saml2/core/impl/Assertions20Impl.cpp index d7a5481..fdeb98e 100644 --- a/saml/saml2/core/impl/Assertions20Impl.cpp +++ b/saml/saml2/core/impl/Assertions20Impl.cpp @@ -17,19 +17,21 @@ /** * Assertions20Impl.cpp * - * Implementation classes for SAML 2.0 Assertions schema + * Implementation classes for SAML 2.0 Assertions schema. */ #include "internal.h" #include "exceptions.h" #include "saml/encryption/EncryptedKeyResolver.h" #include "saml2/core/Assertions.h" +#include "signature/ContentReference.h" #include #include #include #include #include +#include #include #include diff --git a/saml/saml2/core/impl/Protocols20Impl.cpp b/saml/saml2/core/impl/Protocols20Impl.cpp index a34993d..9e4f671 100644 --- a/saml/saml2/core/impl/Protocols20Impl.cpp +++ b/saml/saml2/core/impl/Protocols20Impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,21 @@ /** * Protocols20Impl.cpp * - * Implementation classes for SAML 2.0 Protocols schema + * Implementation classes for SAML 2.0 Protocols schema. */ #include "internal.h" #include "exceptions.h" #include "saml2/core/Protocols.h" +#include "signature/ContentReference.h" #include #include +#include #include #include #include +#include #include #include diff --git a/saml/saml2/metadata/AbstractMetadataProvider.h b/saml/saml2/metadata/AbstractMetadataProvider.h index 723da5d..6a757ce 100644 --- a/saml/saml2/metadata/AbstractMetadataProvider.h +++ b/saml/saml2/metadata/AbstractMetadataProvider.h @@ -25,12 +25,11 @@ #include -#include -#include -#include - namespace xmltooling { + class XMLTOOL_API Credential; + class XMLTOOL_API CredentialCriteria; class XMLTOOL_API KeyInfoResolver; + class XMLTOOL_API Mutex; }; namespace opensaml { @@ -38,6 +37,11 @@ namespace opensaml { class SAML_API MetadataFilter; +#if defined (_MSC_VER) + #pragma warning( push ) + #pragma warning( disable : 4251 ) +#endif + /** * Base class for caching metadata providers. */ @@ -117,6 +121,11 @@ namespace opensaml { mutable credmap_t m_credentialMap; const credmap_t::mapped_type& resolveCredentials(const RoleDescriptor& role) const; }; + +#if defined (_MSC_VER) + #pragma warning( pop ) + #pragma warning( disable : 4251 ) +#endif }; }; diff --git a/saml/saml2/metadata/DynamicMetadataProvider.h b/saml/saml2/metadata/DynamicMetadataProvider.h index 21c3d10..cd627bb 100644 --- a/saml/saml2/metadata/DynamicMetadataProvider.h +++ b/saml/saml2/metadata/DynamicMetadataProvider.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,10 @@ #include +namespace xmltooling { + class XMLTOOL_API RWLock; +}; + namespace opensaml { namespace saml2md { @@ -43,22 +47,10 @@ namespace opensaml { virtual ~DynamicMetadataProvider(); - xmltooling::Lockable* lock() { - m_lock->rdlock(); - return this; - } - - void unlock() { - m_lock->unlock(); - } - - void init() { - } - - const xmltooling::XMLObject* getMetadata() const { - throw MetadataException("getMetadata operation not implemented on this provider."); - } - + void init(); + xmltooling::Lockable* lock(); + void unlock(); + const xmltooling::XMLObject* getMetadata() const; std::pair getEntityDescriptor(const Criteria& criteria) const; protected: diff --git a/saml/saml2/metadata/Metadata.h b/saml/saml2/metadata/Metadata.h index 5d16df0..bbc097e 100644 --- a/saml/saml2/metadata/Metadata.h +++ b/saml/saml2/metadata/Metadata.h @@ -17,7 +17,7 @@ /** * @file saml/saml2/metadata/Metadata.h * - * XMLObjects representing the SAML 2.0 Metadata schema + * XMLObjects representing the SAML 2.0 Metadata schema. */ #ifndef __saml2_metadata_h__ @@ -31,6 +31,10 @@ #define DECL_SAML2MDOBJECTBUILDER(cname) \ DECL_XMLOBJECTBUILDER(SAML_API,cname,samlconstants::SAML20MD_NS,samlconstants::SAML20MD_PREFIX) +namespace xmlencryption { + class XMLTOOL_API EncryptionMethod; +}; + namespace opensaml { /** diff --git a/saml/saml2/metadata/MetadataFilter.h b/saml/saml2/metadata/MetadataFilter.h index 305f9da..84e8080 100644 --- a/saml/saml2/metadata/MetadataFilter.h +++ b/saml/saml2/metadata/MetadataFilter.h @@ -20,12 +20,8 @@ * Processes metadata after it's been unmarshalled. */ -#include -#include #include -#include - #ifndef __saml2_metadatafilt_h__ #define __saml2_metadatafilt_h__ diff --git a/saml/saml2/metadata/MetadataProvider.h b/saml/saml2/metadata/MetadataProvider.h index 1f9e2be..20bdc0f 100644 --- a/saml/saml2/metadata/MetadataProvider.h +++ b/saml/saml2/metadata/MetadataProvider.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,9 +25,13 @@ #include #include -#include #include +namespace xmltooling { + class XMLTOOL_API QName; + class XMLTOOL_API XMLObject; +}; + namespace opensaml { class SAML_API SAMLArtifact; diff --git a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp index 2852bb6..441adb5 100644 --- a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ #include #include +#include #include #include diff --git a/saml/saml2/metadata/impl/DynamicMetadataProvider.cpp b/saml/saml2/metadata/impl/DynamicMetadataProvider.cpp index 350eca6..91e4ad0 100644 --- a/saml/saml2/metadata/impl/DynamicMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/DynamicMetadataProvider.cpp @@ -73,6 +73,26 @@ DynamicMetadataProvider::~DynamicMetadataProvider() delete m_lock; } +const XMLObject* DynamicMetadataProvider::getMetadata() const +{ + throw MetadataException("getMetadata operation not implemented on this provider."); +} + +Lockable* DynamicMetadataProvider::lock() +{ + m_lock->rdlock(); + return this; +} + +void DynamicMetadataProvider::unlock() +{ + m_lock->unlock(); +} + +void DynamicMetadataProvider::init() +{ +} + pair DynamicMetadataProvider::getEntityDescriptor(const Criteria& criteria) const { // Check cache while holding the read lock. diff --git a/saml/saml2/metadata/impl/MetadataImpl.cpp b/saml/saml2/metadata/impl/MetadataImpl.cpp index 9ebad0f..89102c7 100644 --- a/saml/saml2/metadata/impl/MetadataImpl.cpp +++ b/saml/saml2/metadata/impl/MetadataImpl.cpp @@ -17,18 +17,22 @@ /** * MetadataImpl.cpp * - * Implementation classes for SAML 2.0 Metadata schema + * Implementation classes for SAML 2.0 Metadata schema. */ #include "internal.h" #include "exceptions.h" #include "saml2/metadata/Metadata.h" +#include "signature/ContentReference.h" #include #include +#include #include #include #include +#include +#include #include #include diff --git a/saml/saml2/metadata/impl/MetadataProvider.cpp b/saml/saml2/metadata/impl/MetadataProvider.cpp index e0efc7a..c3015c5 100644 --- a/saml/saml2/metadata/impl/MetadataProvider.cpp +++ b/saml/saml2/metadata/impl/MetadataProvider.cpp @@ -17,15 +17,17 @@ /** * MetadataProvider.cpp * - * Registration of factories for built-in providers + * Registration of factories for built-in providers. */ #include "internal.h" #include "saml2/metadata/MetadataFilter.h" #include "saml2/metadata/MetadataProvider.h" +#include #include #include +#include #include #include diff --git a/saml/saml2/metadata/impl/MetadataSchemaValidators.cpp b/saml/saml2/metadata/impl/MetadataSchemaValidators.cpp index 8a5f2f2..156b733 100644 --- a/saml/saml2/metadata/impl/MetadataSchemaValidators.cpp +++ b/saml/saml2/metadata/impl/MetadataSchemaValidators.cpp @@ -17,13 +17,14 @@ /** * MetadataSchemaValidators.cpp * - * Schema-based validators for SAML 2.0 Metadata classes + * Schema-based validators for SAML 2.0 Metadata classes. */ #include "internal.h" #include "exceptions.h" #include "saml2/metadata/Metadata.h" +#include #include using namespace opensaml::saml2md; diff --git a/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp b/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp index ea8f0f4..ce80fe9 100644 --- a/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp +++ b/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include diff --git a/saml/signature/ContentReference.h b/saml/signature/ContentReference.h index 1a197e8..5c0550c 100644 --- a/saml/signature/ContentReference.h +++ b/saml/signature/ContentReference.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,25 @@ /** * @file saml/signature/ContentReference.h * - * SAML-specific signature reference profile + * SAML-specific signature reference profile. */ #ifndef __saml_sigref_h__ #define __saml_sigref_h__ #include -#include -#include #include #include +#ifdef HAVE_GOOD_STL +# include +#endif +#include + +namespace xmltooling { + class XMLTOOL_API Namespace; + class XMLTOOL_API XMLObject; +}; namespace opensaml { diff --git a/saml/signature/SignableObject.h b/saml/signature/SignableObject.h index 2e27dc9..56e6d17 100644 --- a/saml/signature/SignableObject.h +++ b/saml/signature/SignableObject.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,9 +24,12 @@ #define __saml_signable_h__ #include -#include #include +namespace xmlsignature { + class XMLTOOL_API Signature; +}; + namespace opensaml { /** diff --git a/saml/signature/SignatureProfileValidator.cpp b/saml/signature/SignatureProfileValidator.cpp index a261dc2..e6f214c 100644 --- a/saml/signature/SignatureProfileValidator.cpp +++ b/saml/signature/SignatureProfileValidator.cpp @@ -17,11 +17,12 @@ /** * SignatureProfileValidator.cpp * - * SAML-specific signature verification + * SAML-specific signature verification. */ #include "internal.h" #include "exceptions.h" +#include "signature/SignableObject.h" #include "signature/SignatureProfileValidator.h" #include diff --git a/saml/signature/SignatureProfileValidator.h b/saml/signature/SignatureProfileValidator.h index 6e1a8f2..0a592e0 100644 --- a/saml/signature/SignatureProfileValidator.h +++ b/saml/signature/SignatureProfileValidator.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,16 +17,19 @@ /** * @file saml/signature/SignatureProfileValidator.h * - * SAML-specific signature profile validator + * SAML-specific signature profile validator. */ #ifndef __saml_sigval_h__ #define __saml_sigval_h__ #include -#include #include +namespace xmlsignature { + class XMLTOOL_API Signature; +}; + namespace opensaml { /** diff --git a/saml/util/SAMLConstants.h b/saml/util/SAMLConstants.h index 618ae34..50f1778 100644 --- a/saml/util/SAMLConstants.h +++ b/saml/util/SAMLConstants.h @@ -17,13 +17,14 @@ /** * @file saml/util/SAMLConstants.h * - * SAML XML namespace constants + * SAML XML namespace constants. */ #ifndef __saml_xmlconstants_h__ #define __saml_xmlconstants_h__ -#include +#include +#include /** * SAML related constants. diff --git a/samltest/binding.h b/samltest/binding.h index 95f5905..214a770 100644 --- a/samltest/binding.h +++ b/samltest/binding.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ #include #include #include +#include #include #include diff --git a/samltest/internal.h b/samltest/internal.h index d7c3ea2..e3f3b31 100644 --- a/samltest/internal.h +++ b/samltest/internal.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,12 +21,14 @@ #include -#include #include #include + +#include #include #include #include +#include #include using namespace xmltooling; diff --git a/samltest/saml1/binding/SAML1ArtifactTest.h b/samltest/saml1/binding/SAML1ArtifactTest.h index 18cc7b8..1449fdb 100644 --- a/samltest/saml1/binding/SAML1ArtifactTest.h +++ b/samltest/saml1/binding/SAML1ArtifactTest.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ #include #include #include +#include #include using namespace opensaml::saml1p; diff --git a/samltest/saml2/core/impl/KeyInfoConfirmationDataType20Test.h b/samltest/saml2/core/impl/KeyInfoConfirmationDataType20Test.h index 5115704..f8b6eac 100644 --- a/samltest/saml2/core/impl/KeyInfoConfirmationDataType20Test.h +++ b/samltest/saml2/core/impl/KeyInfoConfirmationDataType20Test.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,9 +17,10 @@ #include "internal.h" #include #include +#include using namespace opensaml::saml2; -using namespace xmlsignature; +using xmlsignature::KeyInfoBuilder; //TODO need testing for ElementProxy and wildcard attributes/elements diff --git a/samltest/saml2/core/impl/Response20Test.h b/samltest/saml2/core/impl/Response20Test.h index 44ddeb7..967c320 100644 --- a/samltest/saml2/core/impl/Response20Test.h +++ b/samltest/saml2/core/impl/Response20Test.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ #include "internal.h" #include #include +#include using namespace opensaml::saml2p; using namespace opensaml::saml2; diff --git a/samltest/signature/SAMLSignatureTestBase.h b/samltest/signature/SAMLSignatureTestBase.h index eaba637..67f4304 100644 --- a/samltest/signature/SAMLSignatureTestBase.h +++ b/samltest/signature/SAMLSignatureTestBase.h @@ -22,6 +22,7 @@ #include #include #include +#include #include using namespace xmlsignature;