[cpp-opensaml] branch master updated: CPPXT-122 - Replace DateTime class with Xerces version

Scott Cantor cantor.2 at osu.edu
Mon Jan 8 20:58:36 EST 2018


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository cpp-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-opensaml.git;a=commit;h=6ee239a1c2fa37ca23f4f69981f6b65bcd12578d

The following commit(s) were added to refs/heads/master by this push:
       new  6ee239a   CPPXT-122 - Replace DateTime class with Xerces version
6ee239a is described below

commit 6ee239a1c2fa37ca23f4f69981f6b65bcd12578d
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Jan 8 20:58:34 2018 -0500

    CPPXT-122 - Replace DateTime class with Xerces version
    
    https://issues.shibboleth.net/jira/browse/CPPXT-122
---
 saml/RootObject.h                                     | 6 ++----
 saml/saml1/core/Assertions.h                          | 6 ++----
 saml/saml1/core/Protocols.h                           | 6 ++----
 saml/saml1/core/impl/AssertionsImpl.cpp               | 3 +--
 saml/saml1/core/impl/ProtocolsImpl.cpp                | 5 ++---
 saml/saml2/core/Assertions.h                          | 3 ++-
 saml/saml2/core/impl/Assertions20Impl.cpp             | 3 +--
 saml/saml2/core/impl/Protocols20Impl.cpp              | 5 ++---
 saml/saml2/metadata/impl/AbstractMetadataProvider.cpp | 3 +--
 saml/saml2/metadata/impl/MetadataImpl.cpp             | 1 -
 saml/saml2/metadata/impl/XMLMetadataProvider.cpp      | 3 +--
 11 files changed, 16 insertions(+), 28 deletions(-)

diff --git a/saml/RootObject.h b/saml/RootObject.h
index 4c50b45..5835505 100644
--- a/saml/RootObject.h
+++ b/saml/RootObject.h
@@ -29,9 +29,7 @@
 
 #include <saml/signature/SignableObject.h>
 
-namespace xmltooling {
-    class XMLTOOL_API DateTime;
-};
+#include <xercesc/util/XMLDateTime.hpp>
 
 namespace opensaml {
 
@@ -56,7 +54,7 @@ namespace opensaml {
          *
          * @return the timestamp
          */
-        virtual const xmltooling::DateTime* getIssueInstant() const=0;
+        virtual const xercesc::XMLDateTime* getIssueInstant() const=0;
 
         /**
          * Returns the timestamp of the object as an epoch
diff --git a/saml/saml1/core/Assertions.h b/saml/saml1/core/Assertions.h
index 6c5fa78..3b0a19d 100644
--- a/saml/saml1/core/Assertions.h
+++ b/saml/saml1/core/Assertions.h
@@ -33,13 +33,11 @@
 #include <xmltooling/ElementProxy.h>
 #include <xmltooling/ConcreteXMLObjectBuilder.h>
 
+#include <xercesc/util/XMLDateTime.hpp>
+
 #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;
diff --git a/saml/saml1/core/Protocols.h b/saml/saml1/core/Protocols.h
index 6f44fa9..918634f 100644
--- a/saml/saml1/core/Protocols.h
+++ b/saml/saml1/core/Protocols.h
@@ -33,13 +33,11 @@
 #include <xmltooling/ConcreteXMLObjectBuilder.h>
 #include <xmltooling/ElementExtensibleXMLObject.h>
 
+#include <xercesc/util/XMLDateTime.hpp>
+
 #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;
diff --git a/saml/saml1/core/impl/AssertionsImpl.cpp b/saml/saml1/core/impl/AssertionsImpl.cpp
index 55ea219..2547218 100644
--- a/saml/saml1/core/impl/AssertionsImpl.cpp
+++ b/saml/saml1/core/impl/AssertionsImpl.cpp
@@ -36,7 +36,6 @@
 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
 #include <xmltooling/signature/KeyInfo.h>
 #include <xmltooling/signature/Signature.h>
-#include <xmltooling/util/DateTime.h>
 #include <xmltooling/util/XMLHelper.h>
 
 #include <ctime>
@@ -968,7 +967,7 @@ namespace opensaml {
                 MARSHALL_STRING_ATTRIB(Issuer,ISSUER,nullptr);
                 if (!m_IssueInstant) {
                     const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<AssertionImpl*>(this)->m_IssueInstant=new XMLDateTime(m_IssueInstantEpoch, false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
             }
diff --git a/saml/saml1/core/impl/ProtocolsImpl.cpp b/saml/saml1/core/impl/ProtocolsImpl.cpp
index 4a35950..a39b81e 100644
--- a/saml/saml1/core/impl/ProtocolsImpl.cpp
+++ b/saml/saml1/core/impl/ProtocolsImpl.cpp
@@ -36,7 +36,6 @@
 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
 #include <xmltooling/signature/Signature.h>
-#include <xmltooling/util/DateTime.h>
 #include <xmltooling/util/XMLHelper.h>
 
 #include <ctime>
@@ -417,7 +416,7 @@ namespace opensaml {
                 }
                 if (!m_IssueInstant) {
                     const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new XMLDateTime(m_IssueInstantEpoch, false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
             }
@@ -771,7 +770,7 @@ namespace opensaml {
                 MARSHALL_STRING_ATTRIB(InResponseTo,INRESPONSETO,nullptr);
                 if (!m_IssueInstant) {
                     const_cast<ResponseAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<ResponseAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<ResponseAbstractTypeImpl*>(this)->m_IssueInstant=new XMLDateTime(m_IssueInstantEpoch, false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
                 MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,nullptr);
diff --git a/saml/saml2/core/Assertions.h b/saml/saml2/core/Assertions.h
index c878449..e431425 100644
--- a/saml/saml2/core/Assertions.h
+++ b/saml/saml2/core/Assertions.h
@@ -33,13 +33,14 @@
 #include <xmltooling/ConcreteXMLObjectBuilder.h>
 #include <xmltooling/ElementProxy.h>
 
+#include <xercesc/util/XMLDateTime.hpp>
+
 #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 {
diff --git a/saml/saml2/core/impl/Assertions20Impl.cpp b/saml/saml2/core/impl/Assertions20Impl.cpp
index efdb49f..e002e5b 100644
--- a/saml/saml2/core/impl/Assertions20Impl.cpp
+++ b/saml/saml2/core/impl/Assertions20Impl.cpp
@@ -37,7 +37,6 @@
 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
 #include <xmltooling/signature/KeyInfo.h>
 #include <xmltooling/signature/Signature.h>
-#include <xmltooling/util/DateTime.h>
 #include <xmltooling/util/XMLHelper.h>
 
 #include <ctime>
@@ -1426,7 +1425,7 @@ namespace opensaml {
                 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
                 if (!m_IssueInstant) {
                     const_cast<AssertionImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<AssertionImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<AssertionImpl*>(this)->m_IssueInstant=new XMLDateTime(m_IssueInstantEpoch, false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
             }
diff --git a/saml/saml2/core/impl/Protocols20Impl.cpp b/saml/saml2/core/impl/Protocols20Impl.cpp
index 95e75cd..85a5ec8 100644
--- a/saml/saml2/core/impl/Protocols20Impl.cpp
+++ b/saml/saml2/core/impl/Protocols20Impl.cpp
@@ -36,7 +36,6 @@
 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
 #include <xmltooling/signature/Signature.h>
-#include <xmltooling/util/DateTime.h>
 #include <xmltooling/util/XMLHelper.h>
 
 #include <ctime>
@@ -372,7 +371,7 @@ namespace opensaml {
                 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
                 if (!m_IssueInstant) {
                     const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<RequestAbstractTypeImpl*>(this)->m_IssueInstant=new XMLDateTime(m_IssueInstantEpoch, false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
                 MARSHALL_STRING_ATTRIB(Destination,DESTINATION,nullptr);
@@ -1072,7 +1071,7 @@ namespace opensaml {
                 MARSHALL_ID_ATTRIB(ID,ID,nullptr);
                 if (!m_IssueInstant) {
                     const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstantEpoch=time(nullptr);
-                    const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstant=new DateTime(m_IssueInstantEpoch);
+                    const_cast<StatusResponseTypeImpl*>(this)->m_IssueInstant=new XMLDateTime(m_IssueInstantEpoch, false);
                 }
                 MARSHALL_DATETIME_ATTRIB(IssueInstant,ISSUEINSTANT,nullptr);
                 MARSHALL_STRING_ATTRIB(Destination,DESTINATION,nullptr);
diff --git a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp
index 46c40bf..4fa8c05 100644
--- a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp
@@ -41,7 +41,6 @@
 #include <xmltooling/security/Credential.h>
 #include <xmltooling/security/KeyInfoResolver.h>
 #include <xmltooling/security/SecurityHelper.h>
-#include <xmltooling/util/DateTime.h>
 #include <xmltooling/util/Threads.h>
 #include <xmltooling/util/XMLHelper.h>
 
@@ -87,7 +86,7 @@ void AbstractMetadataProvider::outputStatus(ostream& os) const
     }
 
     if (m_lastUpdate > 0) {
-        DateTime ts(m_lastUpdate);
+        XMLDateTime ts(m_lastUpdate, false);
         ts.parseDateTime();
         auto_ptr_char timestamp(ts.getFormattedString());
         os << " lastUpdate='" << timestamp.get() << "'";
diff --git a/saml/saml2/metadata/impl/MetadataImpl.cpp b/saml/saml2/metadata/impl/MetadataImpl.cpp
index dfba13e..681f6a6 100644
--- a/saml/saml2/metadata/impl/MetadataImpl.cpp
+++ b/saml/saml2/metadata/impl/MetadataImpl.cpp
@@ -40,7 +40,6 @@
 #include <xmltooling/security/CredentialResolver.h>
 #include <xmltooling/signature/KeyInfo.h>
 #include <xmltooling/signature/Signature.h>
-#include <xmltooling/util/DateTime.h>
 #include <xmltooling/util/XMLHelper.h>
 
 #include <ctime>
diff --git a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp
index 4a0edd3..71b4504 100644
--- a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp
+++ b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp
@@ -34,7 +34,6 @@
 #include <fstream>
 #include <xmltooling/XMLToolingConfig.h>
 #include <xmltooling/io/HTTPResponse.h>
-#include <xmltooling/util/DateTime.h>
 #include <xmltooling/util/NDC.h>
 #include <xmltooling/util/PathResolver.h>
 #include <xmltooling/util/ReloadableXMLFile.h>
@@ -379,7 +378,7 @@ void XMLMetadataProvider::outputStatus(ostream& os) const
     }
 
     if (m_lastUpdate > 0) {
-        DateTime ts(m_lastUpdate);
+        XMLDateTime ts(m_lastUpdate, false);
         ts.parseDateTime();
         auto_ptr_char timestamp(ts.getFormattedString());
         os << " lastUpdate='" << timestamp.get() << "'";

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list