[xmltooling] 04/15: CPPXT-107 - Issues compiling with Boost and VC15

Ferenc Wágner wferi at moszumanska.debian.org
Fri Sep 8 22:04:27 UTC 2017


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

wferi pushed a commit to branch master
in repository xmltooling.

commit f685476136a3941272c695c91d72accaa65bdb71
Author: Scott Cantor <cantor.2 at osu.edu>
Date:   Tue Dec 20 14:23:49 2016 -0500

    CPPXT-107 - Issues compiling with Boost and VC15
    
    https://issues.shibboleth.net/jira/browse/CPPXT-107
---
 xmltooling/security/AbstractPKIXTrustEngine.h        |  5 +++--
 xmltooling/security/impl/AbstractPKIXTrustEngine.cpp | 11 ++++++-----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/xmltooling/security/AbstractPKIXTrustEngine.h b/xmltooling/security/AbstractPKIXTrustEngine.h
index 3666fb7..427904d 100644
--- a/xmltooling/security/AbstractPKIXTrustEngine.h
+++ b/xmltooling/security/AbstractPKIXTrustEngine.h
@@ -33,7 +33,8 @@
 
 #include <set>
 #include <string>
-#include <boost/ptr_container/ptr_vector.hpp>
+#include <vector>
+#include <boost/shared_ptr.hpp>
 
 namespace xmltooling {
 
@@ -66,7 +67,7 @@ namespace xmltooling {
         AbstractPKIXTrustEngine(const xercesc::DOMElement* e=nullptr);
 
         /** Plugins used to perform path validation. */
-        boost::ptr_vector<OpenSSLPathValidator> m_pathValidators;
+        std::vector< boost::shared_ptr<OpenSSLPathValidator> > m_pathValidators;
 
         /** Controls revocation checking, currently limited to CRLs and supports "off", "entityOnly", "fullChain". */
         std::string m_checkRevocation;
diff --git a/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp b/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp
index 5554fb9..54ceada 100644
--- a/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp
+++ b/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp
@@ -50,7 +50,6 @@ using namespace xmlsignature;
 using namespace xmltooling::logging;
 using namespace xmltooling;
 using namespace std;
-using boost::ptr_vector;
 
 namespace xmltooling {
     // Adapter between TrustEngine and PathValidator
@@ -162,7 +161,8 @@ AbstractPKIXTrustEngine::AbstractPKIXTrustEngine(const xercesc::DOMElement* e)
                         delete pv;
                         throw XMLSecurityException("PathValidator doesn't support OpenSSL interface.");
                     }
-                    m_pathValidators.push_back(ospv);
+                    boost::shared_ptr<OpenSSLPathValidator> ptr(ospv);
+                    m_pathValidators.push_back(ptr);
                 }
             }
             catch (exception& ex) {
@@ -175,11 +175,12 @@ AbstractPKIXTrustEngine::AbstractPKIXTrustEngine(const xercesc::DOMElement* e)
     }
 
     if (m_pathValidators.empty()) {
-        m_pathValidators.push_back(
+        boost::shared_ptr<OpenSSLPathValidator> ptr(
             dynamic_cast<OpenSSLPathValidator*>(
                 XMLToolingConfig::getConfig().PathValidatorManager.newPlugin(PKIX_PATHVALIDATOR, e)
                 )
             );
+        m_pathValidators.push_back(ptr);
     }
 }
 
@@ -377,8 +378,8 @@ bool AbstractPKIXTrustEngine::validateWithCRLs(
     auto_ptr<PKIXValidationInfoIterator> pkix(getPKIXValidationInfoIterator(credResolver, criteria));
     while (pkix->next()) {
         PKIXParams params(*this, *pkix.get(), inlineCRLs);
-        for (ptr_vector<OpenSSLPathValidator>::const_iterator v = m_pathValidators.begin(); v != m_pathValidators.end(); ++v) {
-            if (v->validate(certEE, certChain, params)) {
+        for (vector< boost::shared_ptr<OpenSSLPathValidator> >::const_iterator v = m_pathValidators.begin(); v != m_pathValidators.end(); ++v) {
+            if (v->get()->validate(certEE, certChain, params)) {
                 return true;
             }
         }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/xmltooling.git



More information about the Pkg-shibboleth-devel mailing list