<listOptionValue builtIn="false" value="XMLTOOLING_LOGCAT="XMLTooling""/>\r
</option>\r
<option id="org.eclipse.linuxtools.cdt.autotools.option.configure.includes.959417153" name="includes" superClass="org.eclipse.linuxtools.cdt.autotools.option.configure.includes" valueType="includePath">\r
-<listOptionValue builtIn="false" value=""C:\openssl-0.9.8k\inc32""/>\r
<listOptionValue builtIn="false" value=""C:\curl-7.19.6\include""/>\r
-<listOptionValue builtIn="false" value=""C:\log4shib-1.0.3\include""/>\r
-<listOptionValue builtIn="false" value=""C:\xerces-c-3.0.1-x86-windows-vc-9.0\include""/>\r
<listOptionValue builtIn="false" value=""C:\xml-security-c-1.5.1\include""/>\r
-<listOptionValue builtIn="false" value=""C:\Program Files\Microsoft Visual Studio 9.0\VC\include""/>\r
<listOptionValue builtIn="false" value=""C:\cxxtest""/>\r
+<listOptionValue builtIn="false" value=""C:\openssl-1.0.0\inc32""/>\r
+<listOptionValue builtIn="false" value=""C:\log4shib-1.0.5\include""/>\r
+<listOptionValue builtIn="false" value=""C:\Program Files\Microsoft Visual Studio 10.0\VC\include""/>\r
+<listOptionValue builtIn="false" value=""C:\xerces-c-3.1.1-x86-windows-vc-10.0\include""/>\r
</option>\r
<inputType id="org.eclipse.linuxtools.cdt.autotools.inputType.configure.387715961" superClass="org.eclipse.linuxtools.cdt.autotools.inputType.configure"/>\r
<inputType id="org.eclipse.linuxtools.cdt.autotools.inputType.configure1.2086982536" superClass="org.eclipse.linuxtools.cdt.autotools.inputType.configure1"/>\r
<tool id="org.eclipse.linuxtools.cdt.autotools.toolchain.tool.autogen.414704866" name="autogen.sh" superClass="org.eclipse.linuxtools.cdt.autotools.toolchain.tool.autogen"/>\r
</toolChain>\r
</folderInfo>\r
+<folderInfo id="org.eclipse.linuxtools.cdt.autotools.configuration.build.1769801814.68494947" name="/" resourcePath="xmltooling/util">\r
+<toolChain id="org.eclipse.linuxtools.cdt.autotools.toolChain.1207226177" name="GNU Autotools Toolchain" superClass="org.eclipse.linuxtools.cdt.autotools.toolChain" unusedChildren="">\r
+<targetPlatform id="org.eclipse.linuxtools.cdt.autotools.toolchain.targetPlatform" isAbstract="false" name="GNU Autotools Target Platform" superClass="org.eclipse.linuxtools.cdt.autotools.toolchain.targetPlatform"/>\r
+<tool id="org.eclipse.linuxtools.cdt.autotools.gnu.toolchain.tool.configure.1263593738" name="configure" superClass="org.eclipse.linuxtools.cdt.autotools.gnu.toolchain.tool.configure.837026680">\r
+<option id="org.eclipse.linuxtools.cdt.autotools.option.configure.includes.856260599" name="includes" superClass="org.eclipse.linuxtools.cdt.autotools.option.configure.includes" valueType="includePath">\r
+<listOptionValue builtIn="false" value=""C:\curl-7.19.6\include""/>\r
+<listOptionValue builtIn="false" value=""C:\xml-security-c-1.5.1\include""/>\r
+<listOptionValue builtIn="false" value=""C:\cxxtest""/>\r
+<listOptionValue builtIn="false" value=""C:\openssl-1.0.0\inc32""/>\r
+<listOptionValue builtIn="false" value=""C:\log4shib-1.0.5\include""/>\r
+<listOptionValue builtIn="false" value=""C:\xerces-c-3.1.1-x86-windows-vc-10.0\include""/>\r
+<listOptionValue builtIn="false" value=""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include""/>\r
+</option>\r
+<inputType id="org.eclipse.linuxtools.cdt.autotools.inputType.configure.762316423" superClass="org.eclipse.linuxtools.cdt.autotools.inputType.configure"/>\r
+<inputType id="org.eclipse.linuxtools.cdt.autotools.inputType.configure1.278384716" superClass="org.eclipse.linuxtools.cdt.autotools.inputType.configure1"/>\r
+</tool>\r
+<tool id="org.eclipse.linuxtools.cdt.autotools.toolchain.tool.autogen.1798255406" name="autogen.sh" superClass="org.eclipse.linuxtools.cdt.autotools.toolchain.tool.autogen.414704866"/>\r
+</toolChain>\r
+</folderInfo>\r
<sourceEntries>\r
<entry excluding="xmltooling|xmltoolingtest|debug/|release/|x64/" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>\r
<entry excluding="encryption|security|signature|soap|io|util|impl|validation|Debug/|Release/|x64/|xmltooling-lite-Debug/|xmltooling-lite-Release/" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="xmltooling"/>\r
<parser enabled="false"/>\r
</scannerInfoProvider>\r
</profile>\r
+<scannerConfigBuildInfo instanceId="org.eclipse.linuxtools.cdt.autotools.configuration.build.1769801814;org.eclipse.linuxtools.cdt.autotools.configuration.build.1769801814.68494947;org.eclipse.linuxtools.cdt.autotools.gnu.toolchain.tool.configure.1263593738;org.eclipse.linuxtools.cdt.autotools.inputType.configure.762316423">\r
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"/>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+</scannerConfigBuildInfo>\r
<scannerConfigBuildInfo instanceId="org.eclipse.linuxtools.cdt.autotools.configuration.build.1769801814;org.eclipse.linuxtools.cdt.autotools.configuration.build.1769801814.;org.eclipse.linuxtools.cdt.autotools.gnu.toolchain.tool.configure.837026680;org.eclipse.linuxtools.cdt.autotools.inputType.configure1.2086982536">\r
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"/>\r
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
</scannerInfoProvider>\r
</profile>\r
</scannerConfigBuildInfo>\r
+<scannerConfigBuildInfo instanceId="org.eclipse.linuxtools.cdt.autotools.configuration.build.1769801814;org.eclipse.linuxtools.cdt.autotools.configuration.build.1769801814.68494947;org.eclipse.linuxtools.cdt.autotools.gnu.toolchain.tool.configure.1263593738;org.eclipse.linuxtools.cdt.autotools.inputType.configure1.278384716">\r
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"/>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="true" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="true"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="makefileGenerator">\r
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="false"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-c 'g++ -E -P -v -dD "${plugin_state_location}/specs.cpp"'" command="sh" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">\r
+<buildOutputProvider>\r
+<openAction enabled="false" filePath=""/>\r
+<parser enabled="true"/>\r
+</buildOutputProvider>\r
+<scannerInfoProvider id="specsFile">\r
+<runAction arguments="-c 'gcc -E -P -v -dD "${plugin_state_location}/specs.c"'" command="sh" useDefault="true"/>\r
+<parser enabled="false"/>\r
+</scannerInfoProvider>\r
+</profile>\r
+</scannerConfigBuildInfo>\r
<scannerConfigBuildInfo instanceId="org.eclipse.linuxtools.cdt.autotools.configuration.build.1769801814;org.eclipse.linuxtools.cdt.autotools.configuration.build.1769801814.;org.eclipse.linuxtools.cdt.autotools.gnu.toolchain.tool.configure.837026680;org.eclipse.linuxtools.cdt.autotools.inputType.configure.387715961">\r
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"/>\r
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">\r
/* Define if C++ compiler supports covariant virtual methods. */
#define HAVE_COVARIANT_RETURNS 1
+/* Define to 1 if C++ compiler supports nullptr keyword. */
+#if _MSC_VER >= 1600
+# define HAVE_NULLPTR 1
+#endif
+
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef HAVE_DLFCN_H */
AC_CXX_NAMESPACES
# are covariant methods allowed?
-AC_TRY_LINK(
- [ class base { public: virtual base *GetPtr( void ) { return this; } }; ],
- [ class derived: virtual public base { public: virtual derived *GetPtr( void ) { return this; } }; ],
- [AC_DEFINE([HAVE_COVARIANT_RETURNS], [1], [Define to 1 if C++ compiler supports covariant virtual methods.])])
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[
+ class base { public: virtual base *GetPtr( void ) { return this; } };
+ class derived: virtual public base { public: virtual derived *GetPtr( void ) { return this; } };
+ ]])],
+ [AC_DEFINE([HAVE_COVARIANT_RETURNS], [1], [Define to 1 if C++ compiler supports covariant virtual methods.])]
+ )
+
+# is nullptr supported?
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[
+ const char* ptr = nullptr;
+ ]])],
+ [AC_DEFINE([HAVE_NULLPTR], [1], [Define to 1 if C++ compiler supports nullptr keyword.])]
+ )
# log4shib settings (favor this version over the log4cpp code)
AC_PATH_PROG(LOG4SHIB_CONFIG,log4shib-config)
const XMLCh* AbstractAttributeExtensibleXMLObject::getAttribute(const QName& qualifiedName) const
{
map<QName,XMLCh*>::const_iterator i=m_attributeMap.find(qualifiedName);
- return (i==m_attributeMap.end()) ? NULL : i->second;
+ return (i==m_attributeMap.end()) ? nullptr : i->second;
}
void AbstractAttributeExtensibleXMLObject::setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID)
}
const XMLCh* AbstractAttributeExtensibleXMLObject::getXMLID() const
{
- return (m_idAttribute == m_attributeMap.end()) ? NULL : m_idAttribute->second;
+ return (m_idAttribute == m_attributeMap.end()) ? nullptr : m_idAttribute->second;
}
void AbstractAttributeExtensibleXMLObject::unmarshallExtensionAttribute(const DOMAttr* attribute)
/*
-* Copyright 2001-2009 Internet2
+* Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace {
bool _nonnull(const XMLObject* ptr) {
- return (ptr!=NULL);
+ return (ptr!=nullptr);
}
}
const XMLCh* AbstractComplexElement::getTextContent(unsigned int position) const
{
- return (m_text.size() > position) ? m_text[position] : NULL;
+ return (m_text.size() > position) ? m_text[position] : nullptr;
}
void AbstractComplexElement::setTextContent(const XMLCh* value, unsigned int position)
throw XMLObjectException("Can't set text content relative to non-existent child position.");
vector<XMLCh*>::size_type size = m_text.size();
while (position >= size) {
- m_text.push_back(NULL);
+ m_text.push_back(nullptr);
++size;
}
m_text[position]=prepareForAssignment(m_text[position],value);
using namespace xercesc;
using namespace std;
-AbstractDOMCachingXMLObject::AbstractDOMCachingXMLObject() : m_dom(NULL), m_document(NULL)
+AbstractDOMCachingXMLObject::AbstractDOMCachingXMLObject() : m_dom(nullptr), m_document(nullptr)
{
}
AbstractDOMCachingXMLObject::AbstractDOMCachingXMLObject(const AbstractDOMCachingXMLObject& src)
- : AbstractXMLObject(src), m_dom(NULL), m_document(NULL)
+ : AbstractXMLObject(src), m_dom(nullptr), m_document(nullptr)
{
}
string qname=getElementQName().toString();
m_log.debug("releasing cached DOM representation for (%s)", qname.empty() ? "unknown" : qname.c_str());
}
- setDOM(NULL);
+ setDOM(nullptr);
}
}
if (getDOM()) {
DOMDocument* cloneDoc = doc;
if (!cloneDoc)
- cloneDoc=DOMImplementationRegistry::getDOMImplementation(NULL)->createDocument();
+ cloneDoc=DOMImplementationRegistry::getDOMImplementation(nullptr)->createDocument();
try {
return static_cast<DOMElement*>(cloneDoc->importNode(getDOM(),true));
}
m_log.error("DOM clone failed: %s", temp.get());
}
}
- return NULL;
+ return nullptr;
}
XMLObject* AbstractDOMCachingXMLObject::clone() const
janitor.release(); // safely transferred
return ret;
}
- return NULL;
+ return nullptr;
}
void AbstractDOMCachingXMLObject::detach()
if (parent && parent->m_document) {
// Transfer control of document to me...
setDocument(parent->m_document);
- parent->m_document = NULL;
+ parent->m_document = nullptr;
}
// The rest is done by the base.
AbstractXMLObject::detach();
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* @file xmltooling/AbstractDOMCachingXMLObject.h
*
- * AbstractXMLObject mixin that implements DOM caching
+ * AbstractXMLObject mixin that implements DOM caching.
*/
#ifndef __xmltooling_abstractdomxmlobj_h__
/**
* If a DOM representation exists, this clones it into a new document.
*
- * @param doc the document to clone into, or NULL, in which case a new document is created
+ * @param doc the document to clone into, or nullptr, in which case a new document is created
* @return the cloned DOM
*/
- xercesc::DOMElement* cloneDOM(xercesc::DOMDocument* doc=NULL) const;
+ xercesc::DOMElement* cloneDOM(xercesc::DOMDocument* doc=nullptr) const;
private:
mutable xercesc::DOMElement* m_dom;
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* AbstractSimpleElement.cpp
*
- * Extension of AbstractXMLObject that implements simple elements
+ * Extension of AbstractXMLObject that implements simple elements.
*/
#include "internal.h"
list<XMLObject*> AbstractSimpleElement::m_no_children;
-AbstractSimpleElement::AbstractSimpleElement() : m_value(NULL)
+AbstractSimpleElement::AbstractSimpleElement() : m_value(nullptr)
{
}
const XMLCh* AbstractSimpleElement::getTextContent(unsigned int position) const
{
- return (position==0) ? m_value : NULL;
+ return (position==0) ? m_value : nullptr;
}
void AbstractSimpleElement::setTextContent(const XMLCh* value, unsigned int position)
AbstractXMLObject::AbstractXMLObject(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
: m_log(logging::Category::getInstance(XMLTOOLING_LOGCAT".XMLObject")),
- m_schemaLocation(NULL), m_noNamespaceSchemaLocation(NULL), m_nil(xmlconstants::XML_BOOL_NULL),
- m_parent(NULL), m_elementQname(nsURI, localName, prefix), m_typeQname(NULL)
+ m_schemaLocation(nullptr), m_noNamespaceSchemaLocation(nullptr), m_nil(xmlconstants::XML_BOOL_NULL),
+ m_parent(nullptr), m_elementQname(nsURI, localName, prefix), m_typeQname(nullptr)
{
addNamespace(Namespace(nsURI, prefix, false, Namespace::VisiblyUsed));
if (schemaType) {
AbstractXMLObject::AbstractXMLObject(const AbstractXMLObject& src)
: m_namespaces(src.m_namespaces), m_log(src.m_log), m_schemaLocation(XMLString::replicate(src.m_schemaLocation)),
m_noNamespaceSchemaLocation(XMLString::replicate(src.m_noNamespaceSchemaLocation)), m_nil(src.m_nil),
- m_parent(NULL), m_elementQname(src.m_elementQname), m_typeQname(NULL)
+ m_parent(nullptr), m_elementQname(src.m_elementQname), m_typeQname(nullptr)
{
if (src.m_typeQname)
m_typeQname=new QName(*src.m_typeQname);
// Pull ourselves out of the parent and then blast him.
getParent()->removeChild(this);
delete m_parent;
- m_parent = NULL;
+ m_parent = nullptr;
}
const QName& AbstractXMLObject::getElementQName() const
const XMLCh* AbstractXMLObject::getXMLID() const
{
- return NULL;
+ return nullptr;
}
xmlconstants::xmltooling_bool_t AbstractXMLObject::getNil() const
bool AbstractXMLObject::hasParent() const
{
- return m_parent != NULL;
+ return m_parent != nullptr;
}
XMLObject* AbstractXMLObject::getParent() const
addNamespace(Namespace(newValue->getNamespaceURI(), newValue->getPrefix(), false, Namespace::NonVisiblyUsed));
return new QName(*newValue);
}
- return NULL;
+ return nullptr;
}
delete oldValue;
addNamespace(Namespace(newValue->getNamespaceURI(), newValue->getPrefix(), false, Namespace::NonVisiblyUsed));
return new QName(*newValue);
}
- return NULL;
+ return nullptr;
}
DateTime* AbstractXMLObject::prepareForAssignment(DateTime* oldValue, const DateTime* newValue)
releaseThisandParentDOM();
return new DateTime(*newValue);
}
- return NULL;
+ return nullptr;
}
delete oldValue;
releaseThisandParentDOM();
- return newValue ? new DateTime(*newValue) : NULL;
+ return newValue ? new DateTime(*newValue) : nullptr;
}
DateTime* AbstractXMLObject::prepareForAssignment(DateTime* oldValue, time_t newValue, bool duration)
delete oldValue;
releaseThisandParentDOM();
if (!newValue || !*newValue)
- return NULL;
+ return nullptr;
DateTime* ret = new DateTime(newValue);
if (duration)
ret->parseDuration();
/*
-* Copyright 2001-2009 Internet2
+* Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param schemaType the xsi:type to use
*/
AbstractXMLObject(
- const XMLCh* nsURI=NULL, const XMLCh* localName=NULL, const XMLCh* prefix=NULL, const QName* schemaType=NULL
+ const XMLCh* nsURI=nullptr, const XMLCh* localName=nullptr, const XMLCh* prefix=nullptr, const QName* schemaType=nullptr
);
/** Copy constructor. */
*
* It is indifferent to whether either the old or the new version of the value is null.
* This method will do a safe compare of the objects and will also invalidate the DOM if appropriate.
- * Note that since the new value (even if NULL) is always returned, it may be more efficient
+ * Note that since the new value (even if nullptr) is always returned, it may be more efficient
* to discard the return value and just assign independently if a dynamic cast would be involved.
*
* @param oldValue current value
* Gets the value of an XML attribute of the object.
*
* @param qualifiedName qualified name of the attribute
- * @return the attribute value, or NULL
+ * @return the attribute value, or nullptr
*/
virtual const XMLCh* getAttribute(const QName& qualifiedName) const=0;
* Sets (or clears) an XML attribute of the object.
*
* @param qualifiedName qualified name of the attribute
- * @param value value to set, or NULL to clear
+ * @param value value to set, or nullptr to clear
* @param ID true iff the attribute is an XML ID
*/
virtual void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false)=0;
/*
- * Copyright 2009 Internet2
+ * Copyright 2009-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Locker::Locker(Lockable* lockee, bool lock)
{
if (lockee && lock)
- m_lockee=lockee->lock();
+ m_lockee = lockee->lock();
else
- m_lockee=lockee;
+ m_lockee = lockee;
}
void Locker::assign(Lockable* lockee, bool lock)
{
if (m_lockee)
m_lockee->unlock();
- m_lockee=NULL;
+ m_lockee = nullptr;
if (lockee && lock)
- m_lockee=lockee->lock();
+ m_lockee = lockee->lock();
else
- m_lockee=lockee;
+ m_lockee = lockee;
}
Locker::~Locker()
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param lockee pointer to an object to hold, and optionally lock
* @param lock true iff object is not yet locked
*/
- Locker(Lockable* lockee=NULL, bool lock=true);
+ Locker(Lockable* lockee=nullptr, bool lock=true);
/**
* Optionally locks an object and stores it for later release.
* @param lockee pointer to an object to hold, and optionally lock
* @param lock true iff object is not yet locked
*/
- void assign(Lockable* lockee=NULL, bool lock=true);
+ void assign(Lockable* lockee=nullptr, bool lock=true);
/**
* Destructor releases lock on held pointer, if any.
* @param alwaysDeclare true iff the namespace should always be declared regardless of in-scope declarations
* @param usage indicates usage of namespace in the context of an XMLObject
*/
- Namespace(const XMLCh* uri=NULL, const XMLCh* prefix=NULL, bool alwaysDeclare=false, namespace_usage_t usage=Indeterminate);
+ Namespace(const XMLCh* uri=nullptr, const XMLCh* prefix=nullptr, bool alwaysDeclare=false, namespace_usage_t usage=Indeterminate);
~Namespace();
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param localPart local name
* @param prefix namespace prefix (without the colon)
*/
- QName(const XMLCh* uri=NULL, const XMLCh* localPart=NULL, const XMLCh* prefix=NULL);
+ QName(const XMLCh* uri=nullptr, const XMLCh* localPart=nullptr, const XMLCh* prefix=nullptr);
/**
* Constructor
* @param localPart local name
* @param prefix namespace prefix (without the colon)
*/
- QName(const char* uri, const char* localPart, const char* prefix=NULL);
+ QName(const char* uri, const char* localPart, const char* prefix=nullptr);
~QName();
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Gets the value of the ID attribute set on this object, if any.
*
- * @return an ID value or NULL
+ * @return an ID value or nullptr
*/
virtual const XMLCh* getXMLID() const=0;
/**
* Sets (or clears) text content relative to a child element's position.
*
- * @param value value to set, or NULL to clear
+ * @param value value to set, or nullptr to clear
* @param position position relative to child element
*/
virtual void setTextContent(const XMLCh* value, unsigned int position=0)=0;
* a new document will be created and bound to the lifetime of the root object being
* marshalled, unless an existing DOM can be reused without creating a new document.
*
- * @param document the DOM document the marshalled element will be placed in, or NULL
+ * @param document the DOM document the marshalled element will be placed in, or nullptr
* @param sigs ordered array of signatures to create after marshalling is complete
* @param credential optional credential to supply signing key and related info
* @return the DOM element representing this XMLObject
* @throws SignatureException thrown if a problem occurs during signature creation
*/
virtual xercesc::DOMElement* marshall(
- xercesc::DOMDocument* document=NULL
+ xercesc::DOMDocument* document=nullptr
#ifndef XMLTOOLING_NO_XMLSEC
- ,const std::vector<xmlsignature::Signature*>* sigs=NULL
- ,const Credential* credential=NULL
+ ,const std::vector<xmlsignature::Signature*>* sigs=nullptr
+ ,const Credential* credential=nullptr
#endif
) const=0;
virtual xercesc::DOMElement* marshall(
xercesc::DOMElement* parentElement
#ifndef XMLTOOLING_NO_XMLSEC
- ,const std::vector<xmlsignature::Signature*>* sigs=NULL
- ,const Credential* credential=NULL
+ ,const std::vector<xmlsignature::Signature*>* sigs=nullptr
+ ,const Credential* credential=nullptr
#endif
) const=0;
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
using xercesc::DOMElement;
map<QName,XMLObjectBuilder*> XMLObjectBuilder::m_map;
-XMLObjectBuilder* XMLObjectBuilder::m_default=NULL;
+XMLObjectBuilder* XMLObjectBuilder::m_default = nullptr;
XMLObjectBuilder::XMLObjectBuilder()
{
XMLObject* XMLObjectBuilder::buildOneFromElement(xercesc::DOMElement* element, bool bindDocument)
{
const XMLObjectBuilder* b=getBuilder(element);
- return b ? b->buildFromElement(element,bindDocument) : NULL;
+ return b ? b->buildFromElement(element,bindDocument) : nullptr;
}
const XMLObjectBuilder* XMLObjectBuilder::getBuilder(const QName& key)
{
map<QName,XMLObjectBuilder*>::const_iterator i=m_map.find(key);
- return (i==m_map.end()) ? NULL : i->second;
+ return (i==m_map.end()) ? nullptr : i->second;
}
const XMLObjectBuilder* XMLObjectBuilder::getBuilder(const DOMElement* domElement)
Category& log=Category::getInstance(XMLTOOLING_LOGCAT".XMLObject.Builder");
auto_ptr<QName> schemaType(XMLHelper::getXSIType(domElement));
- const XMLObjectBuilder* xmlObjectBuilder = schemaType.get() ? getBuilder(*(schemaType.get())) : NULL;
+ const XMLObjectBuilder* xmlObjectBuilder = schemaType.get() ? getBuilder(*(schemaType.get())) : nullptr;
if (xmlObjectBuilder) {
if (log.isDebugEnabled()) {
log.debug("located XMLObjectBuilder for schema type: %s", schemaType->toString().c_str());
void XMLObjectBuilder::deregisterDefaultBuilder()
{
delete m_default;
- m_default=NULL;
+ m_default = nullptr;
}
void XMLObjectBuilder::destroyBuilders()
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Creates an empty XMLObject with a particular element name.
- * <p>The results are undefined if localName is NULL or empty.
+ * <p>The results are undefined if localName is nullptr or empty.
*
* @param nsURI namespace URI for element
* @param localName local name of element
* @return the empty XMLObject
*/
virtual XMLObject* buildObject(
- const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL, const QName* schemaType=NULL
+ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const QName* schemaType=nullptr
) const=0;
/**
*
* @param element the unmarshalling source
* @param bindDocument true iff the new XMLObject should take ownership of the DOM Document
- * @return the unmarshalled object or NULL if no builder is available
+ * @return the unmarshalled object or nullptr if no builder is available
*/
static XMLObject* buildOneFromElement(xercesc::DOMElement* element, bool bindDocument=false);
* Retrieves an XMLObjectBuilder using the key it was registered with.
*
* @param key the key used to register the builder
- * @return the builder or NULL
+ * @return the builder or nullptr
*/
static const XMLObjectBuilder* getBuilder(const QName& key);
* If no match is found, the default builder is returned, if any.
*
* @param element the element for which to locate a builder
- * @return the builder or NULL
+ * @return the builder or nullptr
*/
static const XMLObjectBuilder* getBuilder(const xercesc::DOMElement* element);
/**
* Retrieves the default XMLObjectBuilder for DOM elements
*
- * @return the default builder or NULL
+ * @return the default builder or nullptr
*/
static const XMLObjectBuilder* getDefaultBuilder();
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
PSID lpUserSid,
LPCSTR message)
{
- LPCSTR messages[] = {message, NULL};
+ LPCSTR messages[] = {message, nullptr};
HANDLE hElog = RegisterEventSource(lpUNCServerName, "OpenSAML XMLTooling Library");
- BOOL res = ReportEvent(hElog, wType, 0, dwEventID, lpUserSid, 1, 0, messages, NULL);
+ BOOL res = ReportEvent(hElog, wType, 0, dwEventID, lpUserSid, 1, 0, messages, nullptr);
return (DeregisterEventSource(hElog) && res);
}
#endif
#ifndef XMLTOOLING_NO_XMLSEC
XMLToolingConfig::XMLToolingConfig()
- : m_keyInfoResolver(NULL), m_replayCache(NULL), m_pathResolver(NULL), m_templateEngine(NULL), m_urlEncoder(NULL), clock_skew_secs(180)
+ : m_keyInfoResolver(nullptr), m_replayCache(nullptr), m_pathResolver(nullptr), m_templateEngine(nullptr), m_urlEncoder(nullptr), clock_skew_secs(180)
#else
XMLToolingConfig::XMLToolingConfig()
- : m_pathResolver(NULL), m_templateEngine(NULL), m_urlEncoder(NULL), clock_skew_secs(180)
+ : m_pathResolver(nullptr), m_templateEngine(nullptr), m_urlEncoder(nullptr), clock_skew_secs(180)
#endif
{
}
string msg = string("failed to configure logging: ") + e.what();
Category::getInstance(XMLTOOLING_LOGCAT".Logging").crit(msg);
#ifdef WIN32
- LogEvent(NULL, EVENTLOG_ERROR_TYPE, 2100, NULL, msg.c_str());
+ LogEvent(nullptr, EVENTLOG_ERROR_TYPE, 2100, nullptr, msg.c_str());
#endif
return false;
}
// Load catalogs from path.
if (!catalog_path.empty()) {
char* catpath=strdup(catalog_path.c_str());
- char* sep=NULL;
+ char* sep=nullptr;
char* start=catpath;
while (start && *start) {
sep=strchr(start,PATH_SEPARATOR_CHAR);
*sep=0;
auto_ptr_XMLCh temp(start);
m_validatingPool->loadCatalog(temp.get());
- start = sep ? sep + 1 : NULL;
+ start = sep ? sep + 1 : nullptr;
}
free(catpath);
}
registerSOAPTransports();
initSOAPTransports();
registerStorageServices();
- m_keyInfoResolver = KeyInfoResolverManager.newPlugin(INLINE_KEYINFO_RESOLVER,NULL);
+ m_keyInfoResolver = KeyInfoResolverManager.newPlugin(INLINE_KEYINFO_RESOLVER,nullptr);
#endif
m_pathResolver = new PathResolver();
void XMLToolingInternalConfig::term()
{
#ifndef XMLTOOLING_NO_XMLSEC
- CRYPTO_set_locking_callback(NULL);
+ CRYPTO_set_locking_callback(nullptr);
for_each(g_openssl_locks.begin(), g_openssl_locks.end(), xmltooling::cleanup<Mutex>());
g_openssl_locks.clear();
#endif
m_algorithmMap.clear();
delete m_keyInfoResolver;
- m_keyInfoResolver = NULL;
+ m_keyInfoResolver = nullptr;
delete m_replayCache;
- m_replayCache = NULL;
+ m_replayCache = nullptr;
#endif
delete m_pathResolver;
- m_pathResolver = NULL;
+ m_pathResolver = nullptr;
delete m_templateEngine;
- m_templateEngine = NULL;
+ m_templateEngine = nullptr;
delete m_urlEncoder;
- m_urlEncoder = NULL;
+ m_urlEncoder = nullptr;
for (vector<void*>::reverse_iterator i=m_libhandles.rbegin(); i!=m_libhandles.rend(); i++) {
#if defined(WIN32)
m_libhandles.clear();
delete m_parserPool;
- m_parserPool=NULL;
+ m_parserPool=nullptr;
delete m_validatingPool;
- m_validatingPool=NULL;
+ m_validatingPool=nullptr;
#ifndef XMLTOOLING_NO_XMLSEC
delete m_xsecProvider;
- m_xsecProvider=NULL;
+ m_xsecProvider=nullptr;
XSECPlatformUtils::Terminate();
#endif
XMLPlatformUtils::closeMutex(m_lock);
- m_lock=NULL;
+ m_lock=nullptr;
XMLPlatformUtils::Terminate();
#ifndef XMLTOOLING_NO_XMLSEC
m_pathResolver->resolve(resolved, PathResolver::XMLTOOLING_LIB_FILE);
#if defined(WIN32)
- HMODULE handle=NULL;
+ HMODULE handle=nullptr;
for (string::iterator i = resolved.begin(); i != resolved.end(); ++i)
if (*i == '/')
*i = '\\';
UINT em=SetErrorMode(SEM_FAILCRITICALERRORS);
try {
- handle=LoadLibraryEx(resolved.c_str(),NULL,LOAD_WITH_ALTERED_SEARCH_PATH);
+ handle=LoadLibraryEx(resolved.c_str(),nullptr,LOAD_WITH_ALTERED_SEARCH_PATH);
if (!handle)
- handle=LoadLibraryEx(resolved.c_str(),NULL,0);
+ handle=LoadLibraryEx(resolved.c_str(),nullptr,0);
if (!handle)
throw runtime_error(string("unable to load extension library: ") + resolved);
FARPROC fn=GetProcAddress(handle,"xmltooling_extension_init");
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param context arbitrary data to pass to library initialization hook
* @return true iff library was loaded successfully
*/
- virtual bool load_library(const char* path, void* context=NULL)=0;
+ virtual bool load_library(const char* path, void* context=nullptr)=0;
/**
* Configure logging system.
* (DEBUG, INFO, NOTICE, WARN, ERROR, CRIT, ALERT, FATAL, EMERG)
* @return true iff configuration was successful
*/
- virtual bool log_config(const char* config=NULL)=0;
+ virtual bool log_config(const char* config=nullptr)=0;
/**
* Obtains a non-validating parser pool.
/**
* Returns the global KeyInfoResolver instance.
*
- * @return global KeyInfoResolver or NULL
+ * @return global KeyInfoResolver or nullptr
*/
const KeyInfoResolver* getKeyInfoResolver() const;
/**
* Returns the global ReplayCache instance.
*
- * @return global ReplayCache or NULL
+ * @return global ReplayCache or nullptr
*/
ReplayCache* getReplayCache() const;
/**
* Returns the global PathResolver instance.
*
- * @return global PathResolver or NULL
+ * @return global PathResolver or nullptr
*/
PathResolver* getPathResolver() const;
/**
* Returns the global TemplateEngine instance.
*
- * @return global TemplateEngine or NULL
+ * @return global TemplateEngine or nullptr
*/
TemplateEngine* getTemplateEngine() const;
/**
* Returns the global URLEncoder instance.
*
- * @return global URLEncoder or NULL
+ * @return global URLEncoder or nullptr
*/
const URLEncoder* getURLEncoder() const;
/*
- * Copyright 2001-2008 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* @file xmltooling/base.h
*
- * Base header file definitions
- * Must be included prior to including any other header
+ * Base header file definitions.
+ * Must be included prior to including any other header.
*/
#ifndef __xmltooling_base_h__
# define XMLTOOLING_NO_XMLSEC 1
#endif
+#ifndef HAVE_NULLPTR
+# define nullptr 0
+#endif
+
#if defined(XMLTOOLING_NO_XMLSEC) || !defined(HAVE_XSECSIZE_T)
# ifdef XMLTOOLING_XERCESC_64BITSAFE
# include <xercesc/util/XercesDefs.hpp>
XMLCh* m_##proper; \
public: \
pair<bool,int> get##proper() const { \
- return make_pair((m_##proper!=NULL),(m_##proper!=NULL ? xercesc::XMLString::parseInt(m_##proper): 0)); \
+ return make_pair((m_##proper!=nullptr),(m_##proper!=nullptr ? xercesc::XMLString::parseInt(m_##proper): 0)); \
} \
void set##proper(const XMLCh* proper) { \
m_##proper = prepareForAssignment(m_##proper,proper); \
void set##proper(const type* proper) { \
m_##proper = prepareForAssignment(m_##proper,proper); \
XMLString::release(&m_##proper##Prefix); \
- m_##proper##Prefix = NULL; \
+ m_##proper##Prefix = nullptr; \
}
/**
#define DECL_INTEGER_CONTENT(proper) \
XMLTOOLING_DOXYGEN(Returns proper in integer form after a NULL indicator.) \
std::pair<bool,int> get##proper() const { \
- return std::make_pair((getTextContent()!=NULL), (getTextContent()!=NULL ? xercesc::XMLString::parseInt(getTextContent()) : 0)); \
+ return std::make_pair((getTextContent()!=nullptr), (getTextContent()!=nullptr ? xercesc::XMLString::parseInt(getTextContent()) : 0)); \
} \
XMLTOOLING_DOXYGEN(Sets proper.) \
void set##proper(int proper) { \
} \
XMLTOOLING_DOXYGEN(Builder that allows element/type override.) \
virtual cname* buildObject( \
- const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL, const xmltooling::QName* schemaType=NULL \
+ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const xmltooling::QName* schemaType=nullptr \
) const
/**
} \
XMLTOOLING_DOXYGEN(Builder that allows element/type override.) \
virtual xmltooling::XMLObject* buildObject( \
- const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL, const xmltooling::QName* schemaType=NULL \
+ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const xmltooling::QName* schemaType=nullptr \
) const
/**
*/
#define XMLOBJECTVALIDATOR_ONLYONEOF3(cname,proper1,proper2,proper3) \
int c##proper1##proper2##proper3=0; \
- if (ptr->get##proper1()!=NULL) \
+ if (ptr->get##proper1()!=nullptr) \
c##proper1##proper2##proper3++; \
- if (ptr->get##proper2()!=NULL) \
+ if (ptr->get##proper2()!=nullptr) \
c##proper1##proper2##proper3++; \
- if (ptr->get##proper3()!=NULL) \
+ if (ptr->get##proper3()!=nullptr) \
c##proper1##proper2##proper3++; \
if (c##proper1##proper2##proper3 != 1) \
throw xmltooling::ValidationException(#cname" must have only one of "#proper1", "#proper2", or "#proper3".")
/* Define if C++ compiler supports covariant virtual methods. */
#undef HAVE_COVARIANT_RETURNS
+/* Define to 1 if C++ compiler supports nullptr keyword. */
+#undef HAVE_NULLPTR
+
/* Define to 1 if you have an STL implementation that supports useful string
specialization. */
#undef HAVE_GOOD_STL
/* Define if C++ compiler supports covariant virtual methods. */
#define HAVE_COVARIANT_RETURNS 1
+/* Define to 1 if C++ compiler supports nullptr keyword. */
+#if _MSC_VER >= 1600
+# define HAVE_NULLPTR 1
+#endif
+
/* Define to 1 if you have an STL implementation that supports useful string
specialization. */
#define HAVE_GOOD_STL 1
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param EKResolver locates an EncryptedKey pertaining to the EncryptedData
*/
Decrypter(
- const xmltooling::CredentialResolver* credResolver=NULL,
- xmltooling::CredentialCriteria* criteria=NULL,
- const EncryptedKeyResolver* EKResolver=NULL
+ const xmltooling::CredentialResolver* credResolver=nullptr,
+ xmltooling::CredentialCriteria* criteria=nullptr,
+ const EncryptedKeyResolver* EKResolver=nullptr
);
virtual ~Decrypter();
/**
* Replace the current CredentialResolver interface, if any, with a new one.
*
- * @param resolver the locked CredentialResolver to attach, or NULL to clear
+ * @param resolver the locked CredentialResolver to attach, or nullptr to clear
* @param criteria optional external criteria to use with resolver
*/
void setKEKResolver(const xmltooling::CredentialResolver* resolver, xmltooling::CredentialCriteria* criteria);
* @param recipient identifier of decrypting entity for use in identifying multi-cast keys
* @return the decrypted DOM fragment
*/
- xercesc::DOMDocumentFragment* decryptData(const EncryptedData& encryptedData, const XMLCh* recipient=NULL);
+ xercesc::DOMDocumentFragment* decryptData(const EncryptedData& encryptedData, const XMLCh* recipient=nullptr);
/**
* Decrypts the supplied information to an output stream.
* @param encryptedData the data to decrypt
* @param recipient identifier of decrypting entity for use in identifying multi-cast keys
*/
- void decryptData(std::ostream& out, const EncryptedData& encryptedData, const XMLCh* recipient=NULL);
+ void decryptData(std::ostream& out, const EncryptedData& encryptedData, const XMLCh* recipient=nullptr);
/**
* Decrypts the supplied information and returns the resulting key.
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param recipient identifier of recipient of encrypted key
* @return the resolved EncryptedKey object
*/
- virtual const EncryptedKey* resolveKey(const EncryptedData& encryptedData, const XMLCh* recipient=NULL) const;
+ virtual const EncryptedKey* resolveKey(const EncryptedData& encryptedData, const XMLCh* recipient=nullptr) const;
};
};
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
EncryptionParams(
const XMLCh* algorithm=DSIGConstants::s_unicodeStrURIAES128_CBC,
- const unsigned char* keyBuffer=NULL,
+ const unsigned char* keyBuffer=nullptr,
unsigned int keyBufferSize=0,
- const xmltooling::Credential* credential=NULL,
+ const xmltooling::Credential* credential=nullptr,
bool compact=false
);
* @param recipient optional name of recipient of encrypted key
*/
KeyEncryptionParams(
- const xmltooling::Credential& credential, const XMLCh* algorithm=NULL, const XMLCh* recipient=NULL
+ const xmltooling::Credential& credential, const XMLCh* algorithm=nullptr, const XMLCh* recipient=nullptr
);
~KeyEncryptionParams();
*
* @param element the DOM element to encrypt
* @param encParams primary encryption settings
- * @param kencParams key encryption settings, or NULL
+ * @param kencParams key encryption settings, or nullptr
* @return a stand-alone EncryptedData object, unconnected to the source DOM
*/
EncryptedData* encryptElement(
- xercesc::DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams=NULL
+ xercesc::DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams=nullptr
);
/**
*
* @param element parent element of children to encrypt
* @param encParams primary encryption settings
- * @param kencParams key encryption settings, or NULL
+ * @param kencParams key encryption settings, or nullptr
* @return a stand-alone EncryptedData object, unconnected to the source DOM
*/
EncryptedData* encryptElementContent(
- xercesc::DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams=NULL
+ xercesc::DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams=nullptr
);
/**
*
* @param input the stream to encrypt
* @param encParams primary encryption settings
- * @param kencParams key encryption settings, or NULL
+ * @param kencParams key encryption settings, or nullptr
* @return a stand-alone EncryptedData object, unconnected to any DOM
*/
- EncryptedData* encryptStream(std::istream& input, EncryptionParams& encParams, KeyEncryptionParams* kencParams=NULL);
+ EncryptedData* encryptStream(std::istream& input, EncryptionParams& encParams, KeyEncryptionParams* kencParams=nullptr);
/**
* Encrypts the supplied key and returns the resulting object.
using namespace std;
Decrypter::Decrypter(const CredentialResolver* credResolver, CredentialCriteria* criteria, const EncryptedKeyResolver* EKResolver)
- : m_cipher(NULL), m_credResolver(credResolver), m_criteria(criteria), m_EKResolver(EKResolver)
+ : m_cipher(nullptr), m_credResolver(credResolver), m_criteria(criteria), m_EKResolver(EKResolver)
{
}
DOMDocumentFragment* Decrypter::decryptData(const EncryptedData& encryptedData, XSECCryptoKey* key)
{
- if (encryptedData.getDOM()==NULL)
+ if (encryptedData.getDOM()==nullptr)
throw DecryptionException("The object must be marshalled before decryption.");
// We can reuse the cipher object if the document hasn't changed.
if (m_cipher && m_cipher->getDocument()!=encryptedData.getDOM()->getOwnerDocument()) {
XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher);
- m_cipher=NULL;
+ m_cipher=nullptr;
}
if (!m_cipher)
// We need to find an encrypted decryption key somewhere. We'll need the underlying algorithm...
const XMLCh* algorithm=
- encryptedData.getEncryptionMethod() ? encryptedData.getEncryptionMethod()->getAlgorithm() : NULL;
+ encryptedData.getEncryptionMethod() ? encryptedData.getEncryptionMethod()->getAlgorithm() : nullptr;
if (!algorithm)
throw DecryptionException("No EncryptionMethod/@Algorithm set, key decryption cannot proceed.");
// Check for external resolver.
- const EncryptedKey* encKey=NULL;
+ const EncryptedKey* encKey=nullptr;
if (m_EKResolver)
encKey = m_EKResolver->resolveKey(encryptedData, recipient);
else {
void Decrypter::decryptData(ostream& out, const EncryptedData& encryptedData, XSECCryptoKey* key)
{
- if (encryptedData.getDOM()==NULL)
+ if (encryptedData.getDOM()==nullptr)
throw DecryptionException("The object must be marshalled before decryption.");
// We can reuse the cipher object if the document hasn't changed.
if (m_cipher && m_cipher->getDocument()!=encryptedData.getDOM()->getOwnerDocument()) {
XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher);
- m_cipher=NULL;
+ m_cipher=nullptr;
}
if (!m_cipher)
// We need to find an encrypted decryption key somewhere. We'll need the underlying algorithm...
const XMLCh* algorithm=
- encryptedData.getEncryptionMethod() ? encryptedData.getEncryptionMethod()->getAlgorithm() : NULL;
+ encryptedData.getEncryptionMethod() ? encryptedData.getEncryptionMethod()->getAlgorithm() : nullptr;
if (!algorithm)
throw DecryptionException("No EncryptionMethod/@Algorithm set, key decryption cannot proceed.");
// Check for external resolver.
- const EncryptedKey* encKey=NULL;
+ const EncryptedKey* encKey=nullptr;
if (m_EKResolver)
encKey = m_EKResolver->resolveKey(encryptedData, recipient);
else {
if (!m_credResolver)
throw DecryptionException("No CredentialResolver supplied to provide decryption keys.");
- if (encryptedKey.getDOM()==NULL)
+ if (encryptedKey.getDOM()==nullptr)
throw DecryptionException("The object must be marshalled before decryption.");
XSECAlgorithmHandler* handler;
if (m_cipher && m_cipher->getDocument()!=encryptedKey.getDOM()->getOwnerDocument()) {
XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher);
- m_cipher=NULL;
+ m_cipher=nullptr;
}
if (!m_cipher)
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
const EncryptedKey* EncryptedKeyResolver::resolveKey(const EncryptedData& encryptedData, const XMLCh* recipient) const
{
if (!encryptedData.getKeyInfo())
- return NULL;
+ return nullptr;
const vector<XMLObject*>& others=const_cast<const KeyInfo*>(encryptedData.getKeyInfo())->getUnknownXMLObjects();
for (vector<XMLObject*>::const_iterator i=others.begin(); i!=others.end(); i++) {
return encKey;
}
- return NULL;
+ return nullptr;
}
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
}
-Encrypter::Encrypter() : m_cipher(NULL)
+Encrypter::Encrypter() : m_cipher(nullptr)
{
}
}
}
- XSECCryptoKey* key=NULL;
+ XSECCryptoKey* key=nullptr;
if (encParams.m_credential) {
key = encParams.m_credential->getPrivateKey();
if (!key)
else {
// We have to have a raw key now, so we need to build a wrapper around it.
XSECAlgorithmHandler* handler =XSECPlatformUtils::g_algorithmMapper->mapURIToHandler(encParams.m_algorithm);
- if (handler != NULL)
+ if (handler != nullptr)
key = handler->createKeyForURI(
encParams.m_algorithm,const_cast<unsigned char*>(encParams.m_keyBuffer),encParams.m_keyBufferSize
);
if (m_cipher && m_cipher->getDocument()!=element->getOwnerDocument()) {
XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher);
- m_cipher=NULL;
+ m_cipher=nullptr;
}
if (!m_cipher) {
if (m_cipher && m_cipher->getDocument()!=element->getOwnerDocument()) {
XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher);
- m_cipher=NULL;
+ m_cipher=nullptr;
}
if (!m_cipher) {
if (m_cipher) {
XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher);
- m_cipher=NULL;
+ m_cipher=nullptr;
}
- DOMDocument* doc=NULL;
+ DOMDocument* doc=nullptr;
try {
doc=XMLToolingConfig::getConfig().getParser().newDocument();
XercesJanitor<DOMDocument> janitor(doc);
throw EncryptionException("No EncryptedData element found?");
// Unmarshall a tooling version of EncryptedData around the DOM.
- EncryptedData* xmlEncData=NULL;
+ EncryptedData* xmlEncData=nullptr;
auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(encData->getElement()));
if (!(xmlObject.get()) || !(xmlEncData=dynamic_cast<EncryptedData*>(xmlObject.get())))
throw EncryptionException("Unable to unmarshall into EncryptedData object.");
xmlEncData->releaseThisAndChildrenDOM();
// KeyInfo?
- KeyInfo* kinfo = encParams.m_credential ? encParams.m_credential->getKeyInfo(encParams.m_compact) : NULL;
+ KeyInfo* kinfo = encParams.m_credential ? encParams.m_credential->getKeyInfo(encParams.m_compact) : nullptr;
if (kinfo)
xmlEncData->setKeyInfo(kinfo);
auto_ptr<XENCEncryptedKey> encKey(
m_cipher->encryptKey(encParams.m_keyBuffer, encParams.m_keyBufferSize, ENCRYPT_NONE, kencParams->m_algorithm)
);
- EncryptedKey* xmlEncKey=NULL;
+ EncryptedKey* xmlEncKey=nullptr;
auto_ptr<XMLObject> xmlObjectKey(XMLObjectBuilder::buildOneFromElement(encKey->getElement()));
if (!(xmlObjectKey.get()) || !(xmlEncKey=dynamic_cast<EncryptedKey*>(xmlObjectKey.get())))
throw EncryptionException("Unable to unmarshall into EncryptedKey object.");
if (m_cipher) {
XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseCipher(m_cipher);
- m_cipher=NULL;
+ m_cipher=nullptr;
}
XSECCryptoKey* kek = kencParams.m_credential.getPublicKey();
if (!kek)
throw EncryptionException("Credential in KeyEncryptionParams structure did not supply a public key.");
- DOMDocument* doc=NULL;
+ DOMDocument* doc=nullptr;
try {
doc=XMLToolingConfig::getConfig().getParser().newDocument();
XercesJanitor<DOMDocument> janitor(doc);
m_cipher->setKEK(kek->clone());
auto_ptr<XENCEncryptedKey> encKey(m_cipher->encryptKey(keyBuffer, keyBufferSize, ENCRYPT_NONE, kencParams.m_algorithm));
- EncryptedKey* xmlEncKey=NULL;
+ EncryptedKey* xmlEncKey=nullptr;
auto_ptr<XMLObject> xmlObjectKey(XMLObjectBuilder::buildOneFromElement(encKey->getElement()));
if (!(xmlObjectKey.get()) || !(xmlEncKey=dynamic_cast<EncryptedKey*>(xmlObjectKey.get())))
throw EncryptionException("Unable to unmarshall into EncryptedKey object.");
return DSIGConstants::s_unicodeStrURIKW_3DES;
}
- return NULL;
+ return nullptr;
}
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Algorithm=NULL;
- m_KeySize=NULL;
- m_OAEPparams=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_Algorithm=nullptr;
+ m_KeySize=nullptr;
+ m_OAEPparams=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_KeySize=m_children.begin();
m_pos_OAEPparams=m_pos_KeySize;
++m_pos_OAEPparams;
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,NULL);
+ MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_STRING_ATTRIB(Algorithm,ALGORITHM,NULL);
+ PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_URI=NULL;
- m_Transforms=NULL;
- m_children.push_back(NULL);
+ m_URI=nullptr;
+ m_Transforms=nullptr;
+ m_children.push_back(nullptr);
m_pos_Transforms=m_children.begin();
}
public:
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(URI,URI,NULL);
+ MARSHALL_STRING_ATTRIB(URI,URI,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_STRING_ATTRIB(URI,URI,NULL);
+ PROC_STRING_ATTRIB(URI,URI,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_CipherValue=NULL;
- m_CipherReference=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_CipherValue=nullptr;
+ m_CipherReference=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_CipherValue=m_children.begin();
m_pos_CipherReference=m_pos_CipherValue;
++m_pos_CipherReference;
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Id=m_Target=NULL;
+ m_Id=m_Target=nullptr;
}
public:
virtual ~EncryptionPropertyImpl() {
}
IMPL_XMLOBJECT_CLONE(EncryptionProperty);
- IMPL_ID_ATTRIB_EX(Id,ID,NULL);
+ IMPL_ID_ATTRIB_EX(Id,ID,nullptr);
IMPL_STRING_ATTRIB(Target);
IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject, m_children.end());
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_ID_ATTRIB(Id,ID,NULL);
- MARSHALL_STRING_ATTRIB(Target,TARGET,NULL);
+ MARSHALL_ID_ATTRIB(Id,ID,nullptr);
+ MARSHALL_STRING_ATTRIB(Target,TARGET,nullptr);
marshallExtensionAttributes(domElement);
}
}
void processAttribute(const DOMAttr* attribute) {
- PROC_ID_ATTRIB(Id,ID,NULL);
+ PROC_ID_ATTRIB(Id,ID,nullptr);
unmarshallExtensionAttribute(attribute);
}
};
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Id=NULL;
+ m_Id=nullptr;
}
public:
virtual ~EncryptionPropertiesImpl() {
}
IMPL_XMLOBJECT_CLONE(EncryptionProperties);
- IMPL_ID_ATTRIB_EX(Id,ID,NULL);
+ IMPL_ID_ATTRIB_EX(Id,ID,nullptr);
IMPL_TYPED_CHILDREN(EncryptionProperty,m_children.end());
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_ID_ATTRIB(Id,ID,NULL);
+ MARSHALL_ID_ATTRIB(Id,ID,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_ID_ATTRIB(Id,ID,NULL);
+ PROC_ID_ATTRIB(Id,ID,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_URI=NULL;
+ m_URI=nullptr;
}
protected:
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(URI,URI,NULL);
+ MARSHALL_STRING_ATTRIB(URI,URI,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_STRING_ATTRIB(URI,URI,NULL);
+ PROC_STRING_ATTRIB(URI,URI,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Id=m_Type=m_MimeType=m_Encoding=NULL;
- m_EncryptionMethod=NULL;
- m_KeyInfo=NULL;
- m_CipherData=NULL;
- m_EncryptionProperties=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_Id=m_Type=m_MimeType=m_Encoding=nullptr;
+ m_EncryptionMethod=nullptr;
+ m_KeyInfo=nullptr;
+ m_CipherData=nullptr;
+ m_EncryptionProperties=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_EncryptionMethod=m_children.begin();
m_pos_KeyInfo=m_pos_EncryptionMethod;
++m_pos_KeyInfo;
}
IMPL_XMLOBJECT_CLONE(EncryptedType);
- IMPL_ID_ATTRIB_EX(Id,ID,NULL);
+ IMPL_ID_ATTRIB_EX(Id,ID,nullptr);
IMPL_STRING_ATTRIB(Type);
IMPL_STRING_ATTRIB(MimeType);
IMPL_STRING_ATTRIB(Encoding);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_ID_ATTRIB(Id,ID,NULL);
- MARSHALL_STRING_ATTRIB(Type,TYPE,NULL);
- MARSHALL_STRING_ATTRIB(MimeType,MIMETYPE,NULL);
- MARSHALL_STRING_ATTRIB(Encoding,ENCODING,NULL);
+ MARSHALL_ID_ATTRIB(Id,ID,nullptr);
+ MARSHALL_STRING_ATTRIB(Type,TYPE,nullptr);
+ MARSHALL_STRING_ATTRIB(MimeType,MIMETYPE,nullptr);
+ MARSHALL_STRING_ATTRIB(Encoding,ENCODING,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_ID_ATTRIB(Id,ID,NULL);
- PROC_STRING_ATTRIB(Type,TYPE,NULL);
- PROC_STRING_ATTRIB(MimeType,MIMETYPE,NULL);
- PROC_STRING_ATTRIB(Encoding,ENCODING,NULL);
+ PROC_ID_ATTRIB(Id,ID,nullptr);
+ PROC_STRING_ATTRIB(Type,TYPE,nullptr);
+ PROC_STRING_ATTRIB(MimeType,MIMETYPE,nullptr);
+ PROC_STRING_ATTRIB(Encoding,ENCODING,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
class XMLTOOL_DLLLOCAL EncryptedKeyImpl : public virtual EncryptedKey, public EncryptedTypeImpl
{
void init() {
- m_Recipient=NULL;
- m_ReferenceList=NULL;
- m_CarriedKeyName=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_Recipient=nullptr;
+ m_ReferenceList=nullptr;
+ m_CarriedKeyName=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_ReferenceList=m_pos_EncryptionProperties;
++m_pos_ReferenceList;
m_pos_CarriedKeyName=m_pos_ReferenceList;
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
+ MARSHALL_STRING_ATTRIB(Recipient,RECIPIENT,nullptr);
EncryptedTypeImpl::marshallAttributes(domElement);
}
}
void processAttribute(const DOMAttr* attribute) {
- PROC_STRING_ATTRIB(Recipient,RECIPIENT,NULL);
+ PROC_STRING_ATTRIB(Recipient,RECIPIENT,nullptr);
EncryptedTypeImpl::processAttribute(attribute);
}
};
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
char buf[20];
map<string,string>::const_iterator i=m_params.find(unsigned_integer_to_string(buf,sizeof(buf),index));
- return (i==m_params.end()) ? NULL : i->second.c_str();
+ return (i==m_params.end()) ? nullptr : i->second.c_str();
}
const char* XMLToolingException::getProperty(const char* name) const
{
map<string,string>::const_iterator i=m_params.find(name);
- return (i==m_params.end()) ? NULL : i->second.c_str();
+ return (i==m_params.end()) ? nullptr : i->second.c_str();
}
const char* XMLToolingException::getMessage() const
throw XMLToolingException("Invalid root element on serialized exception.");
}
- auto_ptr_char classname(root->getAttributeNS(NULL,type));
+ auto_ptr_char classname(root->getAttributeNS(nullptr,type));
auto_ptr<XMLToolingException> excep(XMLToolingException::getInstance(classname.get()));
DOMElement* child=XMLHelper::getFirstChildElement(root,XMLTOOLING_NS,message);
const URLEncoder* encoder = XMLToolingConfig::getConfig().getURLEncoder();
child=XMLHelper::getFirstChildElement(root,XMLTOOLING_NS,param);
while (child && child->hasChildNodes()) {
- auto_ptr_char n(child->getAttributeNS(NULL,name));
+ auto_ptr_char n(child->getAttributeNS(nullptr,name));
char* encoded = XMLString::transcode(child->getFirstChild()->getNodeValue());
if (n.get() && encoded) {
encoder->decode(encoded);
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
class linkage name : public base { \
public: \
XMLTOOLING_DOXYGEN(Constructor) \
- name(const char* msg=NULL, const xmltooling::params& p=xmltooling::params()) : base(msg,p) {} \
+ name(const char* msg=nullptr, const xmltooling::params& p=xmltooling::params()) : base(msg,p) {} \
XMLTOOLING_DOXYGEN(Constructor) \
name(const char* msg, const xmltooling::namedparams& p) : base(msg,p) {} \
XMLTOOLING_DOXYGEN(Constructor) \
* @param msg error message
* @param p an ordered set of positional parameter strings
*/
- XMLToolingException(const char* msg=NULL, const params& p=params());
+ XMLToolingException(const char* msg=nullptr, const params& p=params());
/**
* Constructs an exception using a message and named parameters.
* Returns the parameter property with the designated position (based from one).
*
* @param index position to access
- * @return the parameter property or NULL
+ * @return the parameter property or nullptr
*/
const char* getProperty(unsigned int index) const;
* Returns the parameter property with the designated name.
*
* @param name named parameter to access
- * @return the parameter property or NULL
+ * @return the parameter property or nullptr
*/
const char* getProperty(const char* name) const;
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public:
virtual ~AnyElementImpl();
- AnyElementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL, const QName* schemaType=NULL);
+ AnyElementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const QName* schemaType=nullptr);
XMLObject* clone() const;
{
public:
XMLObject* buildObject(
- const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL, const QName* schemaType=NULL
+ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const QName* schemaType=nullptr
) const;
};
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
virtual ~MemoryStorageService();
bool createString(const char* context, const char* key, const char* value, time_t expiration);
- int readString(const char* context, const char* key, string* pvalue=NULL, time_t* pexpiration=NULL, int version=0);
- int updateString(const char* context, const char* key, const char* value=NULL, time_t expiration=0, int version=0);
+ int readString(const char* context, const char* key, string* pvalue=nullptr, time_t* pexpiration=nullptr, int version=0);
+ int updateString(const char* context, const char* key, const char* value=nullptr, time_t expiration=0, int version=0);
bool deleteString(const char* context, const char* key);
bool createText(const char* context, const char* key, const char* value, time_t expiration) {
return createString(context, key, value, expiration);
}
- int readText(const char* context, const char* key, string* pvalue=NULL, time_t* pexpiration=NULL, int version=0) {
+ int readText(const char* context, const char* key, string* pvalue=nullptr, time_t* pexpiration=nullptr, int version=0) {
return readString(context, key, pvalue, pexpiration, version);
}
- int updateText(const char* context, const char* key, const char* value=NULL, time_t expiration=0, int version=0) {
+ int updateText(const char* context, const char* key, const char* value=nullptr, time_t expiration=0, int version=0) {
return updateString(context, key, value, expiration, version);
}
bool deleteText(const char* context, const char* key) {
static const XMLCh cleanupInterval[] = UNICODE_LITERAL_15(c,l,e,a,n,u,p,I,n,t,e,r,v,a,l);
MemoryStorageService::MemoryStorageService(const DOMElement* e)
- : m_lock(NULL), shutdown_wait(NULL), cleanup_thread(NULL), shutdown(false), m_cleanupInterval(0),
+ : m_lock(nullptr), shutdown_wait(nullptr), cleanup_thread(nullptr), shutdown(false), m_cleanupInterval(0),
m_log(Category::getInstance(XMLTOOLING_LOGCAT".StorageService"))
{
- const XMLCh* tag=e ? e->getAttributeNS(NULL,cleanupInterval) : NULL;
+ const XMLCh* tag=e ? e->getAttributeNS(nullptr,cleanupInterval) : nullptr;
if (tag && *tag) {
m_cleanupInterval = XMLString::parseInt(tag);
}
// Shut down the cleanup thread and let it know...
shutdown = true;
shutdown_wait->signal();
- cleanup_thread->join(NULL);
+ cleanup_thread->join(nullptr);
delete cleanup_thread;
delete shutdown_wait;
break;
unsigned long count=0;
- time_t now = time(NULL);
+ time_t now = time(nullptr);
cache->m_lock->wrlock();
SharedLock locker(cache->m_lock, false);
for (map<string,Context>::iterator i=cache->m_contextMap.begin(); i!=cache->m_contextMap.end(); ++i)
cache->m_log.info("cleanup thread finished");
mutex->unlock();
- return NULL;
+ return nullptr;
}
void MemoryStorageService::reap(const char* context)
{
Context& ctx = writeContext(context);
SharedLock locker(m_lock, false);
- ctx.reap(time(NULL));
+ ctx.reap(time(nullptr));
}
unsigned long MemoryStorageService::Context::reap(time_t exp)
map<string,Record>::iterator i=ctx.m_dataMap.find(key);
if (i!=ctx.m_dataMap.end()) {
// Not yet expired?
- if (time(NULL) < i->second.expiration)
+ if (time(nullptr) < i->second.expiration)
return false;
// It's dead, so we can just remove it now and create the new record.
ctx.m_dataMap.erase(i);
map<string,Record>::iterator i=ctx.m_dataMap.find(key);
if (i==ctx.m_dataMap.end())
return 0;
- else if (time(NULL) >= i->second.expiration)
+ else if (time(nullptr) >= i->second.expiration)
return 0;
if (pexpiration)
*pexpiration = i->second.expiration;
map<string,Record>::iterator i=ctx.m_dataMap.find(key);
if (i==ctx.m_dataMap.end())
return 0;
- else if (time(NULL) >= i->second.expiration)
+ else if (time(nullptr) >= i->second.expiration)
return 0;
if (version > 0 && version != i->second.version)
Context& ctx = writeContext(context);
SharedLock locker(m_lock, false);
- time_t now = time(NULL);
+ time_t now = time(nullptr);
map<string,Record>::iterator stop=ctx.m_dataMap.end();
for (map<string,Record>::iterator i = ctx.m_dataMap.begin(); i!=stop; ++i) {
if (now < i->second.expiration)
/*
-* Copyright 2001-2009 Internet2
+* Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
class XMLTOOL_DLLLOCAL UnknownElementImpl : public AbstractSimpleElement, public AbstractDOMCachingXMLObject
{
public:
- UnknownElementImpl(const XMLCh* namespaceURI=NULL, const XMLCh* elementLocalName=NULL, const XMLCh* namespacePrefix=NULL);
+ UnknownElementImpl(const XMLCh* namespaceURI=nullptr, const XMLCh* elementLocalName=nullptr, const XMLCh* namespacePrefix=nullptr);
virtual ~UnknownElementImpl();
void setTextContent(const XMLCh*, unsigned int position=0);
xercesc::DOMElement* marshall(
- xercesc::DOMDocument* document=NULL
+ xercesc::DOMDocument* document=nullptr
#ifndef XMLTOOLING_NO_XMLSEC
- ,const std::vector<xmlsignature::Signature*>* sigs=NULL
- ,const Credential* credential=NULL
+ ,const std::vector<xmlsignature::Signature*>* sigs=nullptr
+ ,const Credential* credential=nullptr
#endif
) const;
xercesc::DOMElement* marshall(
xercesc::DOMElement* parentElement
#ifndef XMLTOOLING_NO_XMLSEC
- ,const std::vector<xmlsignature::Signature*>* sigs=NULL
- ,const Credential* credential=NULL
+ ,const std::vector<xmlsignature::Signature*>* sigs=nullptr
+ ,const Credential* credential=nullptr
#endif
) const;
XMLObject* unmarshall(xercesc::DOMElement* element, bool bindDocument=false);
{
public:
XMLObject* buildObject(
- const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL, const QName* schemaType=NULL
+ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const QName* schemaType=nullptr
) const;
};
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
class XMLToolingInternalConfig : public XMLToolingConfig
{
public:
- XMLToolingInternalConfig() : m_lock(NULL), m_parserPool(NULL), m_validatingPool(NULL) {
+ XMLToolingInternalConfig() : m_lock(nullptr), m_parserPool(nullptr), m_validatingPool(nullptr) {
#ifndef XMLTOOLING_NO_XMLSEC
- m_xsecProvider=NULL;
+ m_xsecProvider=nullptr;
#endif
}
void unlock();
// configuration
- bool load_library(const char* path, void* context=NULL);
- bool log_config(const char* config=NULL);
+ bool load_library(const char* path, void* context=nullptr);
+ bool log_config(const char* config=nullptr);
// parser access
ParserPool& getParser() const {
algmap_t::const_iterator i = m_algorithmMap.find(alg.get());
# endif
if (i==m_algorithmMap.end())
- return std::pair<const char*,unsigned int>(NULL,0);
+ return std::pair<const char*,unsigned int>(nullptr,0);
return std::make_pair(i->second.first.c_str(), i->second.second);
}
/*
-* Copyright 2001-2009 Internet2
+* Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// We may need to create our own document.
bool bindDocument=false;
if (!document) {
- document=DOMImplementationRegistry::getDOMImplementation(NULL)->createDocument();
+ document=DOMImplementationRegistry::getDOMImplementation(nullptr)->createDocument();
bindDocument=true;
}
- XercesJanitor<DOMDocument> janitor(bindDocument ? document : NULL);
+ XercesJanitor<DOMDocument> janitor(bindDocument ? document : nullptr);
m_log.debug("creating root element to marshall");
DOMElement* domElement = document->createElementNS(
chLatin_S, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a,
chLatin_L, chLatin_o, chLatin_c, chLatin_a, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull
};
- if (targetElement->getParentNode()==NULL || targetElement->getParentNode()->getNodeType()==DOMNode::DOCUMENT_NODE) {
+ if (targetElement->getParentNode()==nullptr || targetElement->getParentNode()->getNodeType()==DOMNode::DOCUMENT_NODE) {
if (m_schemaLocation)
targetElement->setAttributeNS(XSI_NS,schemaLocation,m_schemaLocation);
if (m_noNamespaceSchemaLocation)
}
const XMLCh* lookupNamespaceURI(const DOMNode* n, const XMLCh* prefix) const {
- // Return NULL if no declaration in effect. The empty string signifies the null namespace.
+ // Return nullptr if no declaration in effect. The empty string signifies the null namespace.
if (!n || n->getNodeType()!=DOMNode::ELEMENT_NODE) {
// At the root, the default namespace is set to the null namespace.
if (!prefix || !*prefix)
return &chNull;
- return NULL; // we're done
+ return nullptr; // we're done
}
DOMNamedNodeMap* attributes = static_cast<const DOMElement*>(n)->getAttributes();
if (!attributes)
for (list<XMLObject*>::const_iterator i=children.begin(); i!=children.end(); ++i) {
if (*i) {
#ifndef XMLTOOLING_NO_XMLSEC
- (*i)->marshall(domElement,NULL,credential);
+ (*i)->marshall(domElement,nullptr,credential);
#else
(*i)->marshall(domElement);
#endif
/*
-* Copyright 2001-2009 Internet2
+* Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
virtual ~AbstractXMLObjectMarshaller();
xercesc::DOMElement* marshall(
- xercesc::DOMDocument* document=NULL
+ xercesc::DOMDocument* document=nullptr
#ifndef XMLTOOLING_NO_XMLSEC
- ,const std::vector<xmlsignature::Signature*>* sigs=NULL
- ,const Credential* credential=NULL
+ ,const std::vector<xmlsignature::Signature*>* sigs=nullptr
+ ,const Credential* credential=nullptr
#endif
) const;
xercesc::DOMElement* marshall(
xercesc::DOMElement* parentElement
#ifndef XMLTOOLING_NO_XMLSEC
- ,const std::vector<xmlsignature::Signature*>* sigs=NULL
- ,const Credential* credential=NULL
+ ,const std::vector<xmlsignature::Signature*>* sigs=nullptr
+ ,const Credential* credential=nullptr
#endif
) const;
* @throws SignatureException thrown if a problem occurs during signature creation
*/
void marshallInto(
- xercesc::DOMElement* targetElement, const std::vector<xmlsignature::Signature*>* sigs, const Credential* credential=NULL
+ xercesc::DOMElement* targetElement, const std::vector<xmlsignature::Signature*>* sigs, const Credential* credential=nullptr
) const;
#else
/**
if (XMLString::equals(nsuri,XMLNS_NS)) {
if (XMLString::equals(attribute->getLocalName(),XMLNS_PREFIX)) {
m_log.debug("found default namespace declaration, adding it to the list of namespaces on the XMLObject");
- addNamespace(Namespace(attribute->getValue(), NULL, true));
+ addNamespace(Namespace(attribute->getValue(), nullptr, true));
}
else if (XMLString::equals(attribute->getLocalName(),XML_PREFIX) && XMLString::equals(attribute->getNodeValue(),XML_NS)) {
m_log.debug("found standard xml prefix declaration, ignoring as superfluous");
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Returns the raw request body.
*
- * @return the request body, or NULL
+ * @return the request body, or nullptr
*/
virtual const char* getRequestBody() const=0;
* If a parameter has multiple values, only one will be returned.
*
* @param name the name of the parameter to return
- * @return a single parameter value or NULL
+ * @return a single parameter value or nullptr
*/
virtual const char* getParameter(const char* name) const=0;
/**
* Gets the authentication type associated with the request.
*
- * @return the authentication type or NULL
+ * @return the authentication type or nullptr
*/
virtual std::string getAuthType() const {
return "";
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Sets or clears the MIME type of the response.
*
- * @param type the MIME type, or NULL to clear
+ * @param type the MIME type, or nullptr to clear
*/
- virtual void setContentType(const char* type=NULL)=0;
+ virtual void setContentType(const char* type=nullptr)=0;
/**
* Sends a completed response to the client along with a
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
}
map<string,string>::const_iterator lookup=m_cookieMap.find(name);
- return (lookup==m_cookieMap.end()) ? NULL : lookup->second.c_str();
+ return (lookup==m_cookieMap.end()) ? nullptr : lookup->second.c_str();
}
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Get a cookie value supplied by the client.
*
* @param name name of cookie
- * @return cookie value or NULL
+ * @return cookie value or nullptr
*/
virtual const char* getCookie(const char* name) const;
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Sets or clears a response header.
*
* @param name header name
- * @param value value to set, or NULL to clear
+ * @param value value to set, or nullptr to clear
*/
virtual void setResponseHeader(const char* name, const char* value);
* Sets a client cookie.
*
* @param name cookie name
- * @param value value to set, or NULL to clear
+ * @param value value to set, or nullptr to clear
*/
virtual void setCookie(const char* name, const char* value);
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param e DOM to supply configuration for provider
*/
- AbstractPKIXTrustEngine(const xercesc::DOMElement* e=NULL);
+ AbstractPKIXTrustEngine(const xercesc::DOMElement* e=nullptr);
/** Flag controls whether every issuer in the trust path must have a CRL loaded. */
bool m_fullCRLChain;
bool validate(
xmlsignature::Signature& sig,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
bool validate(
const char* in,
unsigned int in_len,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
bool validate(
XSECCryptoX509* certEE,
const std::vector<XSECCryptoX509*>& certChain,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
bool validate(
X509* certEE,
STACK_OF(X509)* certChain,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
/**
* @return interface for obtaining validation data
*/
virtual PKIXValidationInfoIterator* getPKIXValidationInfoIterator(
- const CredentialResolver& pkixSource, CredentialCriteria* criteria=NULL
+ const CredentialResolver& pkixSource, CredentialCriteria* criteria=nullptr
) const=0;
private:
X509* certEE,
STACK_OF(X509)* certChain,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL,
- const std::vector<XSECCryptoX509CRL*>* inlineCRLs=NULL
+ CredentialCriteria* criteria=nullptr,
+ const std::vector<XSECCryptoX509CRL*>* inlineCRLs=nullptr
) const;
};
};
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param certs array of X.509 certificates, the first entry being the entity certificate
* @param crl optional CRL
*/
- BasicX509Credential(XSECCryptoKey* key, const std::vector<XSECCryptoX509*>& certs, XSECCryptoX509CRL* crl=NULL);
+ BasicX509Credential(XSECCryptoKey* key, const std::vector<XSECCryptoX509*>& certs, XSECCryptoX509CRL* crl=nullptr);
/**
* Constructor.
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param e DOM to supply configuration for provider
*/
- ChainingTrustEngine(const xercesc::DOMElement* e=NULL);
+ ChainingTrustEngine(const xercesc::DOMElement* e=nullptr);
/**
* Destructor will delete any embedded engines.
bool validate(
xmlsignature::Signature& sig,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
bool validate(
const XMLCh* sigAlgorithm,
const char* in,
unsigned int in_len,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
bool validate(
XSECCryptoX509* certEE,
const std::vector<XSECCryptoX509*>& certChain,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
bool validate(
X509* certEE,
STACK_OF(X509)* certChain,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
private:
std::vector<TrustEngine*> m_engines;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Returns an algorithm identifier for the Credential.
*
- * @return the Credential algorithm, or NULL if indeterminate
+ * @return the Credential algorithm, or nullptr if indeterminate
*/
virtual const char* getAlgorithm() const=0;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Returns a single Credential according to the supplied criteria.
*
* @param criteria an optional CredentialCriteria object
- * @return a Credential, or NULL if none could be found
+ * @return a Credential, or nullptr if none could be found
*/
- virtual const Credential* resolve(const CredentialCriteria* criteria=NULL) const=0;
+ virtual const Credential* resolve(const CredentialCriteria* criteria=nullptr) const=0;
/**
* Returns all matching Credentials according to the supplied criteria.
* @return number of credentials found
*/
virtual std::vector<const Credential*>::size_type resolve(
- std::vector<const Credential*>& results, const CredentialCriteria* criteria=NULL
+ std::vector<const Credential*>& results, const CredentialCriteria* criteria=nullptr
) const=0;
};
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param keyInfo surrounding KeyInfo context object
*/
- KeyInfoCredentialContext(const xmlsignature::KeyInfo* keyInfo=NULL);
+ KeyInfoCredentialContext(const xmlsignature::KeyInfo* keyInfo=nullptr);
/**
* Constructor
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param keyInfo the key information
* @param types types of credentials to resolve, or 0 for any/all
- * @return the resolved credential, or NULL
+ * @return the resolved credential, or nullptr
*/
virtual Credential* resolve(const xmlsignature::KeyInfo* keyInfo, int types=0) const=0;
*
* @param keyInfo the key information
* @param types types of credentials to resolve, or 0 for any/all
- * @return the resolved credential, or NULL
+ * @return the resolved credential, or nullptr
*/
virtual Credential* resolve(DSIGKeyInfoList* keyInfo, int types=0) const=0;
*
* @param context context containing the key information
* @param types types of credentials to resolve, or 0 for any/all
- * @return the resolved credential, or NULL
+ * @return the resolved credential, or nullptr
*/
virtual Credential* resolve(KeyInfoCredentialContext* context, int types=0) const=0;
*
* @param sig signature containing the key information
* @param types types of credentials to resolve, or 0 for any/all
- * @return the resolved credential, or NULL
+ * @return the resolved credential, or nullptr
*/
Credential* resolve(const xmlsignature::Signature* sig, int types=0) const;
*
* @param criteria criteria containing the key information
* @param types types of credentials to resolve, or 0 for any/all
- * @return the resolved credential, or NULL
+ * @return the resolved credential, or nullptr
*/
Credential* resolve(const CredentialCriteria& criteria, int types=0) const;
};
/*
- * Copyright 2001-2009 The Apache Software Foundation.
+ * Copyright 2001-2010 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Returns native CRL object.
*
- * @return native CRL object, or NULL
+ * @return native CRL object, or nullptr
*/
X509_CRL* getOpenSSLX509CRL();
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param e DOM to supply configuration for provider
*/
- OpenSSLTrustEngine(const xercesc::DOMElement* e=NULL);
+ OpenSSLTrustEngine(const xercesc::DOMElement* e=nullptr);
public:
virtual ~OpenSSLTrustEngine();
virtual bool validate(
X509* certEE, STACK_OF(X509)* certChain,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const=0;
};
* @param password optional password to decrypt key
* @return a populated key object
*/
- static XSECCryptoKey* loadKeyFromFile(const char* pathname, const char* format=NULL, const char* password=NULL);
+ static XSECCryptoKey* loadKeyFromFile(const char* pathname, const char* format=nullptr, const char* password=nullptr);
/**
* Loads certificate(s) from a local file.
* @return size of the resulting array
*/
static std::vector<XSECCryptoX509*>::size_type loadCertificatesFromFile(
- std::vector<XSECCryptoX509*>& certs, const char* pathname, const char* format=NULL, const char* password=NULL
+ std::vector<XSECCryptoX509*>& certs, const char* pathname, const char* format=nullptr, const char* password=nullptr
);
/**
* @return size of the resulting array
*/
static std::vector<XSECCryptoX509CRL*>::size_type loadCRLsFromFile(
- std::vector<XSECCryptoX509CRL*>& crls, const char* pathname, const char* format=NULL
+ std::vector<XSECCryptoX509CRL*>& crls, const char* pathname, const char* format=nullptr
);
/**
* @param password optional password to decrypt key
* @return a populated key object
*/
- static XSECCryptoKey* loadKeyFromURL(SOAPTransport& transport, const char* backing, const char* format=NULL, const char* password=NULL);
+ static XSECCryptoKey* loadKeyFromURL(SOAPTransport& transport, const char* backing, const char* format=nullptr, const char* password=nullptr);
/**
* Loads certificate(s) from a URL.
* @return size of the resulting array
*/
static std::vector<XSECCryptoX509*>::size_type loadCertificatesFromURL(
- std::vector<XSECCryptoX509*>& certs, SOAPTransport& transport, const char* backing, const char* format=NULL, const char* password=NULL
+ std::vector<XSECCryptoX509*>& certs, SOAPTransport& transport, const char* backing, const char* format=nullptr, const char* password=nullptr
);
/**
* @return size of the resulting array
*/
static std::vector<XSECCryptoX509CRL*>::size_type loadCRLsFromURL(
- std::vector<XSECCryptoX509CRL*>& crls, SOAPTransport& transport, const char* backing, const char* format=NULL
+ std::vector<XSECCryptoX509CRL*>& crls, SOAPTransport& transport, const char* backing, const char* format=nullptr
);
/**
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param e DOM to supply configuration for provider
*/
- SignatureTrustEngine(const xercesc::DOMElement* e=NULL);
+ SignatureTrustEngine(const xercesc::DOMElement* e=nullptr);
public:
virtual ~SignatureTrustEngine();
virtual bool validate(
xmlsignature::Signature& sig,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const=0;
/**
const char* in,
unsigned int in_len,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const=0;
};
};
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param e DOM to supply configuration for provider
*/
- TrustEngine(const xercesc::DOMElement* e=NULL);
+ TrustEngine(const xercesc::DOMElement* e=nullptr);
/** Custom KeyInfoResolver instance. */
KeyInfoResolver* m_keyInfoResolver;
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param e DOM to supply configuration for provider
*/
- X509TrustEngine(const xercesc::DOMElement* e=NULL);
+ X509TrustEngine(const xercesc::DOMElement* e=nullptr);
public:
virtual ~X509TrustEngine();
XSECCryptoX509* certEE,
const std::vector<XSECCryptoX509*>& certChain,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const=0;
};
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
STACK_OF(X509)* untrusted,
AbstractPKIXTrustEngine::PKIXValidationInfoIterator* pkixInfo,
bool fullCRLChain,
- const vector<XSECCryptoX509CRL*>* inlineCRLs=NULL
+ const vector<XSECCryptoX509CRL*>* inlineCRLs=nullptr
)
{
Category& log=Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine");
AbstractPKIXTrustEngine::AbstractPKIXTrustEngine(const xercesc::DOMElement* e) : TrustEngine(e), m_fullCRLChain(false)
{
static XMLCh fullCRLChain[] = UNICODE_LITERAL_12(f,u,l,l,C,R,L,C,h,a,i,n);
- const XMLCh* flag = e ? e->getAttributeNS(NULL, fullCRLChain) : NULL;
+ const XMLCh* flag = e ? e->getAttributeNS(nullptr, fullCRLChain) : nullptr;
m_fullCRLChain = (flag && (*flag == xercesc::chLatin_t || *flag == xercesc::chDigit_1));
}
X509_NAME_print_ex(b2,subject,0,XN_FLAG_RFC2253 + XN_FLAG_SEP_CPLUS_SPC - XN_FLAG_SEP_COMMA_PLUS);
BIO_flush(b2);
- BUF_MEM* bptr=NULL;
- BUF_MEM* bptr2=NULL;
+ BUF_MEM* bptr=nullptr;
+ BUF_MEM* bptr2=nullptr;
BIO_get_mem_ptr(b, &bptr);
BIO_get_mem_ptr(b2, &bptr2);
BIO_free(b2);
log.debug("unable to match DN, trying TLS subjectAltName match");
- STACK_OF(GENERAL_NAME)* altnames=(STACK_OF(GENERAL_NAME)*)X509_get_ext_d2i(certEE, NID_subject_alt_name, NULL, NULL);
+ STACK_OF(GENERAL_NAME)* altnames=(STACK_OF(GENERAL_NAME)*)X509_get_ext_d2i(certEE, NID_subject_alt_name, nullptr, nullptr);
if (altnames) {
int numalts = sk_GENERAL_NAME_num(altnames);
for (int an=0; an<numalts; an++) {
log.debug("unable to match subjectAltName, trying TLS CN match");
// Fetch the last CN RDN.
- char* peer_CN = NULL;
+ char* peer_CN = nullptr;
int j,i = -1;
while ((j=X509_NAME_get_index_by_NID(subject, NID_commonName, i)) >= 0)
i = j;
// Find and save off a pointer to the certificate that unlocks the object.
// Most of the time, this will be the first one anyway.
- XSECCryptoX509* certEE=NULL;
+ XSECCryptoX509* certEE=nullptr;
SignatureValidator keyValidator;
for (vector<XSECCryptoX509*>::const_iterator i=certs.begin(); !certEE && i!=certs.end(); ++i) {
try {
// Find and save off a pointer to the certificate that unlocks the object.
// Most of the time, this will be the first one anyway.
- XSECCryptoX509* certEE=NULL;
+ XSECCryptoX509* certEE=nullptr;
for (vector<XSECCryptoX509*>::const_iterator i=certs.begin(); !certEE && i!=certs.end(); ++i) {
try {
auto_ptr<XSECCryptoKey> key((*i)->clonePublicKey());
const CredentialContext* Credential::getCredentalContext() const
{
- return NULL;
+ return nullptr;
}
X509Credential::X509Credential()
{
}
-KeyInfoCredentialContext::KeyInfoCredentialContext(const KeyInfo* keyInfo) : m_keyInfo(keyInfo), m_nativeKeyInfo(NULL)
+KeyInfoCredentialContext::KeyInfoCredentialContext(const KeyInfo* keyInfo) : m_keyInfo(keyInfo), m_nativeKeyInfo(nullptr)
{
}
-KeyInfoCredentialContext::KeyInfoCredentialContext(DSIGKeyInfoList* keyInfo) : m_keyInfo(NULL), m_nativeKeyInfo(keyInfo)
+KeyInfoCredentialContext::KeyInfoCredentialContext(DSIGKeyInfoList* keyInfo) : m_keyInfo(nullptr), m_nativeKeyInfo(keyInfo)
{
}
return m_nativeKeyInfo;
}
-BasicX509Credential::BasicX509Credential(bool ownCerts) : m_key(NULL), m_ownCerts(ownCerts), m_keyInfo(NULL), m_compactKeyInfo(NULL)
+BasicX509Credential::BasicX509Credential(bool ownCerts) : m_key(nullptr), m_ownCerts(ownCerts), m_keyInfo(nullptr), m_compactKeyInfo(nullptr)
{
}
BasicX509Credential::BasicX509Credential(XSECCryptoKey* key, const vector<XSECCryptoX509*>& certs, XSECCryptoX509CRL* crl)
- : m_key(key), m_xseccerts(certs), m_ownCerts(true), m_keyInfo(NULL), m_compactKeyInfo(NULL)
+ : m_key(key), m_xseccerts(certs), m_ownCerts(true), m_keyInfo(nullptr), m_compactKeyInfo(nullptr)
{
if (crl)
m_crls.push_back(crl);
}
BasicX509Credential::BasicX509Credential(XSECCryptoKey* key, const vector<XSECCryptoX509*>& certs, const vector<XSECCryptoX509CRL*>& crls)
- : m_key(key), m_xseccerts(certs), m_ownCerts(true), m_crls(crls), m_keyInfo(NULL), m_compactKeyInfo(NULL)
+ : m_key(key), m_xseccerts(certs), m_ownCerts(true), m_crls(crls), m_keyInfo(nullptr), m_compactKeyInfo(nullptr)
{
}
void BasicX509Credential::initKeyInfo(unsigned int types)
{
delete m_keyInfo;
- m_keyInfo = NULL;
+ m_keyInfo = nullptr;
delete m_compactKeyInfo;
- m_compactKeyInfo = NULL;
+ m_compactKeyInfo = nullptr;
if (types == 0)
types = KEYINFO_KEY_VALUE | KEYINFO_KEY_NAME | KEYINFO_X509_CERTIFICATE | KEYINFO_X509_SUBJECTNAME | KEYINFO_X509_ISSUERSERIAL;
}
}
}
- return NULL;
+ return nullptr;
}
unsigned int BasicX509Credential::getKeySize() const
if (type!=XSECCryptoKey::KEY_RSA_PUBLIC && type!=XSECCryptoKey::KEY_DSA_PUBLIC)
return m_key;
}
- return NULL;
+ return nullptr;
}
XSECCryptoKey* BasicX509Credential::getPublicKey() const
if (type!=XSECCryptoKey::KEY_RSA_PRIVATE && type!=XSECCryptoKey::KEY_DSA_PRIVATE)
return m_key;
}
- return NULL;
+ return nullptr;
}
const set<string>& BasicX509Credential::getKeyNames() const
KeyInfo* BasicX509Credential::getKeyInfo(bool compact) const
{
if (compact || !m_keyInfo)
- return m_compactKeyInfo ? m_compactKeyInfo->cloneKeyInfo() : NULL;
+ return m_compactKeyInfo ? m_compactKeyInfo->cloneKeyInfo() : nullptr;
return m_keyInfo->cloneKeyInfo();
}
XSECCryptoX509CRL* BasicX509Credential::getCRL() const
{
- return m_crls.empty() ? NULL : m_crls.front();
+ return m_crls.empty() ? nullptr : m_crls.front();
}
const vector<XSECCryptoX509CRL*>& BasicX509Credential::getCRLs() const
void BasicX509Credential::extract()
{
- XSECCryptoX509* x509 = m_xseccerts.empty() ? NULL : m_xseccerts.front();
+ XSECCryptoX509* x509 = m_xseccerts.empty() ? nullptr : m_xseccerts.front();
if (!x509 || x509->getProviderName()!=DSIGConstants::s_unicodeStrPROVOpenSSL)
return;
X509* cert = static_cast<OpenSSLCryptoX509*>(x509)->getOpenSSLX509();
BIO* b = BIO_new(BIO_s_mem());
X509_NAME_print_ex(b,issuer,0,XN_FLAG_RFC2253);
BIO_flush(b);
- BUF_MEM* bptr=NULL;
+ BUF_MEM* bptr=nullptr;
BIO_get_mem_ptr(b, &bptr);
m_issuerName.erase();
m_issuerName.append(bptr->data, bptr->length);
}
ASN1_INTEGER* serialASN = X509_get_serialNumber(cert);
- BIGNUM* serialBN = ASN1_INTEGER_to_BN(serialASN, NULL);
+ BIGNUM* serialBN = ASN1_INTEGER_to_BN(serialASN, nullptr);
if (serialBN) {
char* serial = BN_bn2dec(serialBN);
if (serial) {
BIO* b = BIO_new(BIO_s_mem());
X509_NAME_print_ex(b,subject,0,XN_FLAG_RFC2253);
BIO_flush(b);
- BUF_MEM* bptr=NULL;
+ BUF_MEM* bptr=nullptr;
BIO_get_mem_ptr(b, &bptr);
m_subjectName.erase();
m_subjectName.append(bptr->data, bptr->length);
BIO_free(b);
// Fetch the last CN RDN.
- char* peer_CN = NULL;
+ char* peer_CN = nullptr;
int j,i = -1;
while ((j=X509_NAME_get_index_by_NID(subject, NID_commonName, i)) >= 0)
i = j;
OPENSSL_free(peer_CN);
}
- STACK_OF(GENERAL_NAME)* altnames=(STACK_OF(GENERAL_NAME)*)X509_get_ext_d2i(cert, NID_subject_alt_name, NULL, NULL);
+ STACK_OF(GENERAL_NAME)* altnames=(STACK_OF(GENERAL_NAME)*)X509_get_ext_d2i(cert, NID_subject_alt_name, nullptr, nullptr);
if (altnames) {
int numalts = sk_GENERAL_NAME_num(altnames);
for (int an=0; an<numalts; an++) {
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
for_each(m_resolvers.begin(), m_resolvers.end(), mem_fun(&Lockable::unlock));
}
- const Credential* resolve(const CredentialCriteria* criteria=NULL) const {
- const Credential* cred = NULL;
+ const Credential* resolve(const CredentialCriteria* criteria=nullptr) const {
+ const Credential* cred = nullptr;
for (vector<CredentialResolver*>::const_iterator cr = m_resolvers.begin(); !cred && cr!=m_resolvers.end(); ++cr)
cred = (*cr)->resolve(criteria);
return cred;
}
virtual vector<const Credential*>::size_type resolve(
- vector<const Credential*>& results, const CredentialCriteria* criteria=NULL
+ vector<const Credential*>& results, const CredentialCriteria* criteria=nullptr
) const {
for (vector<CredentialResolver*>::const_iterator cr = m_resolvers.begin(); cr!=m_resolvers.end(); ++cr)
(*cr)->resolve(results, criteria);
Category& log=Category::getInstance(XMLTOOLING_LOGCAT".CredentialResolver."CHAINING_CREDENTIAL_RESOLVER);
// Load up the chain of resolvers.
- e = e ? XMLHelper::getFirstChildElement(e, _CredentialResolver) : NULL;
+ e = e ? XMLHelper::getFirstChildElement(e, _CredentialResolver) : nullptr;
while (e) {
- auto_ptr_char type(e->getAttributeNS(NULL,_type));
+ auto_ptr_char type(e->getAttributeNS(nullptr,_type));
if (type.get() && *(type.get())) {
log.info("building CredentialResolver of type %s", type.get());
try {
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
ChainingTrustEngine::ChainingTrustEngine(const DOMElement* e) : TrustEngine(e) {
Category& log=Category::getInstance(XMLTOOLING_LOGCAT".TrustEngine."CHAINING_TRUSTENGINE);
- e = e ? XMLHelper::getFirstChildElement(e, _TrustEngine) : NULL;
+ e = e ? XMLHelper::getFirstChildElement(e, _TrustEngine) : nullptr;
while (e) {
try {
- auto_ptr_char temp(e->getAttributeNS(NULL,type));
+ auto_ptr_char temp(e->getAttributeNS(nullptr,type));
if (temp.get() && *temp.get()) {
log.info("building TrustEngine of type %s", temp.get());
TrustEngine* engine = XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(temp.get(), e);
return oldEngine;
}
}
- return NULL;
+ return nullptr;
}
bool ChainingTrustEngine::validate(Signature& sig, const CredentialResolver& credResolver, CredentialCriteria* criteria) const
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
using namespace std;
CredentialCriteria::CredentialCriteria()
- : m_keyUsage(Credential::UNSPECIFIED_CREDENTIAL), m_keySize(0), m_key(NULL),
- m_keyInfo(NULL), m_nativeKeyInfo(NULL), m_credential(NULL)
+ : m_keyUsage(Credential::UNSPECIFIED_CREDENTIAL), m_keySize(0), m_key(nullptr),
+ m_keyInfo(nullptr), m_nativeKeyInfo(nullptr), m_credential(nullptr)
{
}
setKeySize(mapped.second);
}
else {
- setKeyAlgorithm(NULL);
+ setKeyAlgorithm(nullptr);
setKeySize(0);
}
}
void CredentialCriteria::setKeyInfo(const KeyInfo* keyInfo, int extraction)
{
delete m_credential;
- m_credential = NULL;
+ m_credential = nullptr;
m_keyInfo = keyInfo;
if (!keyInfo || !extraction)
return;
void CredentialCriteria::setNativeKeyInfo(DSIGKeyInfoList* keyInfo, int extraction)
{
delete m_credential;
- m_credential = NULL;
+ m_credential = nullptr;
m_nativeKeyInfo = keyInfo;
if (!keyInfo || !extraction)
return;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
virtual bool validate(
Signature& sig,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
virtual bool validate(
const XMLCh* sigAlgorithm,
const char* in,
unsigned int in_len,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
virtual bool validate(
XSECCryptoX509* certEE,
const vector<XSECCryptoX509*>& certChain,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
virtual bool validate(
X509* certEE,
STACK_OF(X509)* certChain,
const CredentialResolver& credResolver,
- CredentialCriteria* criteria=NULL
+ CredentialCriteria* criteria=nullptr
) const;
};
return false;
}
- return validate(static_cast<OpenSSLCryptoX509*>(certEE)->getOpenSSLX509(), NULL, credResolver, criteria);
+ return validate(static_cast<OpenSSLCryptoX509*>(certEE)->getOpenSSLX509(), nullptr, credResolver, criteria);
}
bool ExplicitKeyTrustEngine::validate(
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
public:
- bool stale(Category& log, RWLock* lock=NULL) {
+ bool stale(Category& log, RWLock* lock=nullptr) {
if (local) {
#ifdef WIN32
struct _stat stat_buf;
log.info("change detected, reloading local resource...");
}
else {
- time_t now = time(NULL);
+ time_t now = time(nullptr);
// Time to reload?
if (now - filestamp < reloadInterval)
class XMLTOOL_DLLLOCAL ManagedKey : public ManagedResource {
public:
- ManagedKey() : key(NULL) {}
+ ManagedKey() : key(nullptr) {}
~ManagedKey() { delete key; }
void load(Category& log, const char* password) {
if (source.empty())
return;
- XSECCryptoKey* nkey=NULL;
+ XSECCryptoKey* nkey=nullptr;
if (local) {
nkey = SecurityHelper::loadKeyFromFile(source.c_str(), format.c_str(), password);
}
m_lock->unlock();
}
- const Credential* resolve(const CredentialCriteria* criteria=NULL) const;
+ const Credential* resolve(const CredentialCriteria* criteria=nullptr) const;
virtual vector<const Credential*>::size_type resolve(
- vector<const Credential*>& results, const CredentialCriteria* criteria=NULL
+ vector<const Credential*>& results, const CredentialCriteria* criteria=nullptr
) const;
private:
XSECCryptoKey* key,
const vector<XSECCryptoX509*>& xseccerts,
const vector<XSECCryptoX509CRL*>& crls
- ) : BasicX509Credential(key ? key : (xseccerts.empty() ? NULL : xseccerts.front()->clonePublicKey()), xseccerts, crls), m_resolver(resolver) {
+ ) : BasicX509Credential(key ? key : (xseccerts.empty() ? nullptr : xseccerts.front()->clonePublicKey()), xseccerts, crls), m_resolver(resolver) {
if (m_resolver->m_extractNames)
extract();
m_keyNames.insert(m_resolver->m_keynames.begin(), m_resolver->m_keynames.end());
};
FilesystemCredentialResolver::FilesystemCredentialResolver(const DOMElement* e)
- : m_lock(NULL), m_credential(NULL), m_usage(Credential::UNSPECIFIED_CREDENTIAL), m_extractNames(true)
+ : m_lock(nullptr), m_credential(nullptr), m_usage(Credential::UNSPECIFIED_CREDENTIAL), m_extractNames(true)
{
#ifdef _DEBUG
NDC ndc("FilesystemCredentialResolver");
Credential::KEYINFO_KEY_VALUE |
X509Credential::KEYINFO_X509_CERTIFICATE |
X509Credential::KEYINFO_X509_SUBJECTNAME;
- if (e && e->hasAttributeNS(NULL,keyInfoMask))
- m_keyinfomask = XMLString::parseInt(e->getAttributeNS(NULL,keyInfoMask));
+ if (e && e->hasAttributeNS(nullptr,keyInfoMask))
+ m_keyinfomask = XMLString::parseInt(e->getAttributeNS(nullptr,keyInfoMask));
- if (e && (e->hasAttributeNS(NULL,_certificate) || e->hasAttributeNS(NULL,_key))) {
+ if (e && (e->hasAttributeNS(nullptr,_certificate) || e->hasAttributeNS(nullptr,_key))) {
// Dummy up a simple file resolver config using these attributes.
- DOMElement* dummy = e->getOwnerDocument()->createElementNS(NULL,_CredentialResolver);
+ DOMElement* dummy = e->getOwnerDocument()->createElementNS(nullptr,_CredentialResolver);
DOMElement* child;
DOMElement* path;
- if (e->hasAttributeNS(NULL,_key)) {
- child = e->getOwnerDocument()->createElementNS(NULL,Key);
+ if (e->hasAttributeNS(nullptr,_key)) {
+ child = e->getOwnerDocument()->createElementNS(nullptr,Key);
dummy->appendChild(child);
- path = e->getOwnerDocument()->createElementNS(NULL,Path);
+ path = e->getOwnerDocument()->createElementNS(nullptr,Path);
child->appendChild(path);
- path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(NULL,_key)));
- if (e->hasAttributeNS(NULL,password))
- child->setAttributeNS(NULL,password,e->getAttributeNS(NULL,password));
- if (e->hasAttributeNS(NULL,keyName)) {
- path = e->getOwnerDocument()->createElementNS(NULL,Name);
+ path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(nullptr,_key)));
+ if (e->hasAttributeNS(nullptr,password))
+ child->setAttributeNS(nullptr,password,e->getAttributeNS(nullptr,password));
+ if (e->hasAttributeNS(nullptr,keyName)) {
+ path = e->getOwnerDocument()->createElementNS(nullptr,Name);
child->appendChild(path);
- path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(NULL,keyName)));
+ path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(nullptr,keyName)));
}
}
- if (e->hasAttributeNS(NULL,_certificate)) {
- child = e->getOwnerDocument()->createElementNS(NULL,Certificate);
+ if (e->hasAttributeNS(nullptr,_certificate)) {
+ child = e->getOwnerDocument()->createElementNS(nullptr,Certificate);
dummy->appendChild(child);
- path = e->getOwnerDocument()->createElementNS(NULL,Path);
+ path = e->getOwnerDocument()->createElementNS(nullptr,Path);
child->appendChild(path);
- path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(NULL,_certificate)));
- if (e->hasAttributeNS(NULL, extractNames))
- child->setAttributeNS(NULL, extractNames, e->getAttributeNS(NULL, extractNames));
+ path->appendChild(e->getOwnerDocument()->createTextNode(e->getAttributeNS(nullptr,_certificate)));
+ if (e->hasAttributeNS(nullptr, extractNames))
+ child->setAttributeNS(nullptr, extractNames, e->getAttributeNS(nullptr, extractNames));
}
e = dummy; // reset "root" to the dummy config element
}
const DOMElement* root = e;
// Save off usage bits.
- const XMLCh* usage = root->getAttributeNS(NULL,_use);
+ const XMLCh* usage = root->getAttributeNS(nullptr,_use);
if (usage && *usage) {
auto_ptr_char u(usage);
if (!strcmp(u.get(), "signing"))
// Move to Key.
const DOMElement* keynode = XMLHelper::getFirstChildElement(root,Key);
if (keynode) {
- prop = keynode->getAttributeNS(NULL,_format);
+ prop = keynode->getAttributeNS(nullptr,_format);
if (prop && *prop) {
auto_ptr_char f(prop);
m_key.format = f.get();
}
- prop = keynode->getAttributeNS(NULL,password);
+ prop = keynode->getAttributeNS(nullptr,password);
if (prop && *prop) {
auto_ptr_char kp(prop);
m_keypass = kp.get();
m_key.source = kpath.get();
XMLToolingConfig::getConfig().getPathResolver()->resolve(m_key.source, PathResolver::XMLTOOLING_CFG_FILE);
m_key.local = true;
- prop = e->getAttributeNS(NULL,_reloadChanges);
+ prop = e->getAttributeNS(nullptr,_reloadChanges);
if (prop && (*prop==chLatin_f) || (*prop==chDigit_0))
m_key.reloadChanges = false;
}
auto_ptr_char kpath(prop);
m_key.source = kpath.get();
m_key.local = false;
- prop = e->getAttributeNS(NULL,backingFilePath);
+ prop = e->getAttributeNS(nullptr,backingFilePath);
if (!prop || !*prop)
throw XMLSecurityException("FilesystemCredentialResolver can't access key, backingFilePath missing from URL element.");
auto_ptr_char b(prop);
m_key.backing = b.get();
XMLToolingConfig::getConfig().getPathResolver()->resolve(m_key.backing, PathResolver::XMLTOOLING_RUN_FILE);
- prop = e->getAttributeNS(NULL,_reloadInterval);
+ prop = e->getAttributeNS(nullptr,_reloadInterval);
if (prop && *prop)
m_key.reloadInterval = XMLString::parseInt(prop);
}
// Check for CRL.
const DOMElement* crlnode = XMLHelper::getFirstChildElement(root,CRL);
if (crlnode) {
- const XMLCh* crlformat = crlnode->getAttributeNS(NULL,_format);
+ const XMLCh* crlformat = crlnode->getAttributeNS(nullptr,_format);
e = XMLHelper::getFirstChildElement(crlnode,Path);
while (e) {
if (e->hasChildNodes()) {
crl.source = crlpath.get();
XMLToolingConfig::getConfig().getPathResolver()->resolve(crl.source, PathResolver::XMLTOOLING_CFG_FILE);
crl.local = true;
- prop = e->getAttributeNS(NULL,_reloadChanges);
+ prop = e->getAttributeNS(nullptr,_reloadChanges);
if (prop && (*prop==chLatin_f) || (*prop==chDigit_0))
crl.reloadChanges = false;
}
auto_ptr_char crlpath(prop);
crl.source = crlpath.get();
crl.local = false;
- prop = e->getAttributeNS(NULL,backingFilePath);
+ prop = e->getAttributeNS(nullptr,backingFilePath);
if (!prop || !*prop)
throw XMLSecurityException("FilesystemCredentialResolver can't access CRL, backingFilePath missing from URL element.");
auto_ptr_char b(prop);
crl.backing = b.get();
XMLToolingConfig::getConfig().getPathResolver()->resolve(crl.backing, PathResolver::XMLTOOLING_RUN_FILE);
- prop = e->getAttributeNS(NULL,_reloadInterval);
+ prop = e->getAttributeNS(nullptr,_reloadInterval);
if (prop && *prop)
crl.reloadInterval = XMLString::parseInt(prop);
}
// Check for Certificate
DOMElement* certnode = XMLHelper::getFirstChildElement(root,Certificate);
if (certnode) {
- prop = certnode->getAttributeNS(NULL,password);
+ prop = certnode->getAttributeNS(nullptr,password);
if (prop && *prop) {
auto_ptr_char certpass(prop);
m_certpass = certpass.get();
}
- const XMLCh* certformat = certnode->getAttributeNS(NULL,_format);
+ const XMLCh* certformat = certnode->getAttributeNS(nullptr,_format);
- const XMLCh* extractFlag = certnode->getAttributeNS(NULL, extractNames);
+ const XMLCh* extractFlag = certnode->getAttributeNS(nullptr, extractNames);
if (extractFlag && (*extractFlag == chLatin_f || *extractFlag == chDigit_0))
m_extractNames = false;
cert.source = certpath.get();
XMLToolingConfig::getConfig().getPathResolver()->resolve(cert.source, PathResolver::XMLTOOLING_CFG_FILE);
cert.local = true;
- prop = e->getAttributeNS(NULL,_reloadChanges);
+ prop = e->getAttributeNS(nullptr,_reloadChanges);
if (prop && (*prop==chLatin_f) || (*prop==chDigit_0))
cert.reloadChanges = false;
}
auto_ptr_char certpath(prop);
cert.source = certpath.get();
cert.local = false;
- prop = e->getAttributeNS(NULL,backingFilePath);
+ prop = e->getAttributeNS(nullptr,backingFilePath);
if (!prop || !*prop)
throw XMLSecurityException("FilesystemCredentialResolver can't access certificate, backingFilePath missing from URL element.");
auto_ptr_char b(prop);
cert.backing = b.get();
XMLToolingConfig::getConfig().getPathResolver()->resolve(cert.backing, PathResolver::XMLTOOLING_RUN_FILE);
- prop = e->getAttributeNS(NULL,_reloadInterval);
+ prop = e->getAttributeNS(nullptr,_reloadInterval);
if (prop && *prop)
cert.reloadInterval = XMLString::parseInt(prop);
}
// Do an initial load of all the objects. If anything blows up here, whatever's
// been loaded should be freed during teardown of the embedded objects.
- time_t now = time(NULL);
+ time_t now = time(nullptr);
m_key.filestamp = now;
m_key.load(log, m_keypass.c_str());
for (vector<ManagedCert>::iterator i = m_certs.begin(); i != m_certs.end(); ++i) {
- i->load(log, (i==m_certs.begin()) ? m_certpass.c_str() : NULL);
+ i->load(log, (i==m_certs.begin()) ? m_certpass.c_str() : nullptr);
i->filestamp = now;
}
for (vector<ManagedCRL>::iterator j = m_crls.begin(); j != m_crls.end(); ++j) {
// We (unfortunately) need to duplicate all the objects and put them in one set of arrays
// in order to create the credential wrapper.
- FilesystemCredential* credential=NULL;
- auto_ptr<XSECCryptoKey> xseckey(m_key.key ? m_key.key->clone() : NULL);
+ FilesystemCredential* credential=nullptr;
+ auto_ptr<XSECCryptoKey> xseckey(m_key.key ? m_key.key->clone() : nullptr);
vector<XSECCryptoX509*> xseccerts;
vector<XSECCryptoX509CRL*> xseccrls;
try {
}
for (vector<ManagedCert>::iterator i = m_certs.begin(); i != m_certs.end(); ++i) {
- if (i->stale(log, writelock ? NULL : m_lock)) {
+ if (i->stale(log, writelock ? nullptr : m_lock)) {
writelock = true;
try {
- i->load(log, (i==m_certs.begin()) ? m_certpass.c_str() : NULL);
+ i->load(log, (i==m_certs.begin()) ? m_certpass.c_str() : nullptr);
updated = true;
}
catch (long& ex) {
}
for (vector<ManagedCRL>::iterator j = m_crls.begin(); j != m_crls.end(); ++j) {
- if (j->stale(log, writelock ? NULL : m_lock)) {
+ if (j->stale(log, writelock ? nullptr : m_lock)) {
writelock = true;
try {
j->load(log);
const Credential* FilesystemCredentialResolver::resolve(const CredentialCriteria* criteria) const
{
- return (criteria ? (criteria->matches(*m_credential) ? m_credential : NULL) : m_credential);
+ return (criteria ? (criteria->matches(*m_credential) ? m_credential : nullptr) : m_credential);
}
vector<const Credential*>::size_type FilesystemCredentialResolver::resolve(
else if (m_resolver->m_key.format == "PKCS12") {
BIO* in=BIO_new(BIO_s_file_internal());
if (in && BIO_read_filename(in,path)>0) {
- PKCS12* p12 = d2i_PKCS12_bio(in, NULL);
+ PKCS12* p12 = d2i_PKCS12_bio(in, nullptr);
if (p12) {
- EVP_PKEY* pkey=NULL;
- X509* x=NULL;
- PKCS12_parse(p12, const_cast<char*>(m_resolver->m_keypass.c_str()), &pkey, &x, NULL);
+ EVP_PKEY* pkey=nullptr;
+ X509* x=nullptr;
+ PKCS12_parse(p12, const_cast<char*>(m_resolver->m_keypass.c_str()), &pkey, &x, nullptr);
PKCS12_free(p12);
if (x)
X509_free(x);
class XMLTOOL_DLLLOCAL InlineCredential : public BasicX509Credential
{
public:
- InlineCredential(const KeyInfo* keyInfo=NULL) : BasicX509Credential(keyInfo!=NULL), m_credctx(new KeyInfoCredentialContext(keyInfo)) {
+ InlineCredential(const KeyInfo* keyInfo=nullptr) : BasicX509Credential(keyInfo!=nullptr), m_credctx(new KeyInfoCredentialContext(keyInfo)) {
}
InlineCredential(DSIGKeyInfoList* keyInfo) : BasicX509Credential(false), m_credctx(new KeyInfoCredentialContext(keyInfo)) {
}
- InlineCredential(KeyInfoCredentialContext* context) : BasicX509Credential(context->getKeyInfo()!=NULL), m_credctx(NULL) {
+ InlineCredential(KeyInfoCredentialContext* context) : BasicX509Credential(context->getKeyInfo()!=nullptr), m_credctx(nullptr) {
}
virtual ~InlineCredential() {
delete m_credctx;
}
XSECCryptoKey* getPrivateKey() const {
- return NULL;
+ return nullptr;
}
KeyInfo* getKeyInfo(bool compact=false) const {
- KeyInfo* ret = m_credctx->getKeyInfo() ? m_credctx->getKeyInfo()->cloneKeyInfo() : NULL;
+ KeyInfo* ret = m_credctx->getKeyInfo() ? m_credctx->getKeyInfo()->cloneKeyInfo() : nullptr;
if (ret) {
- ret->setId(NULL);
+ ret->setId(nullptr);
ret->getRetrievalMethods().clear();
if (compact) {
ret->getKeyValues().clear();
}
if (!ret->hasChildren()) {
delete ret;
- ret = NULL;
+ ret = nullptr;
}
return ret;
}
Credential* resolve(const KeyInfo* keyInfo, int types=0) const {
if (!keyInfo)
- return NULL;
+ return nullptr;
if (types == 0)
types = Credential::RESOLVE_KEYS|X509Credential::RESOLVE_CERTS|X509Credential::RESOLVE_CRLS;
auto_ptr<InlineCredential> credential(new InlineCredential(keyInfo));
}
Credential* resolve(DSIGKeyInfoList* keyInfo, int types=0) const {
if (!keyInfo)
- return NULL;
+ return nullptr;
if (types == 0)
types = Credential::RESOLVE_KEYS|X509Credential::RESOLVE_CERTS|X509Credential::RESOLVE_CRLS;
auto_ptr<InlineCredential> credential(new InlineCredential(keyInfo));
}
Credential* resolve(KeyInfoCredentialContext* context, int types=0) const {
if (!context)
- return NULL;
+ return nullptr;
if (types == 0)
types = Credential::RESOLVE_KEYS|X509Credential::RESOLVE_CERTS|X509Credential::RESOLVE_CRLS;
auto_ptr<InlineCredential> credential(new InlineCredential(context));
// The current xmlsec API is limited to one CRL per KeyInfo.
// For now, I'm going to process the DOM directly.
DOMNode* x509Node = keyInfo->item(i)->getKeyInfoDOMNode();
- DOMElement* crlElement = x509Node ? XMLHelper::getFirstChildElement(x509Node, xmlconstants::XMLSIG_NS, X509CRL::LOCAL_NAME) : NULL;
+ DOMElement* crlElement = x509Node ? XMLHelper::getFirstChildElement(x509Node, xmlconstants::XMLSIG_NS, X509CRL::LOCAL_NAME) : nullptr;
while (crlElement) {
if (crlElement->hasChildNodes()) {
auto_ptr_char buf(crlElement->getFirstChild()->getNodeValue());
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
if (keyInfo)
return resolve(keyInfo, types);
DSIGSignature* native = sig->getXMLSignature();
- return resolve(native ? native->getKeyInfoList() : (DSIGKeyInfoList*)NULL, types);
+ return resolve(native ? native->getKeyInfoList() : (DSIGKeyInfoList*)nullptr, types);
}
Credential* KeyInfoResolver::resolve(const CredentialCriteria& criteria, int types) const
if (keyInfo)
return resolve(keyInfo, types);
DSIGKeyInfoList* native = criteria.getNativeKeyInfo();
- return native ? resolve(native, types) : NULL;
+ return native ? resolve(native, types) : nullptr;
}
/*
- * Copyright 2001-2009 The Apache Software Foundation.
+ * Copyright 2001-2010 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
using namespace xmltooling;
-OpenSSLCryptoX509CRL::OpenSSLCryptoX509CRL() : mp_X509CRL(NULL), m_DERX509CRL("")
+OpenSSLCryptoX509CRL::OpenSSLCryptoX509CRL() : mp_X509CRL(nullptr), m_DERX509CRL("")
{
}
if (bufLen > 0) {
#if defined(XSEC_OPENSSL_D2IX509_CONST_BUFFER)
- mp_X509CRL= d2i_X509_CRL(NULL, (const unsigned char **) (&outBuf), bufLen);
+ mp_X509CRL= d2i_X509_CRL(nullptr, (const unsigned char **) (&outBuf), bufLen);
#else
- mp_X509CRL= d2i_X509_CRL(NULL, &outBuf, bufLen);
+ mp_X509CRL= d2i_X509_CRL(nullptr, &outBuf, bufLen);
#endif
}
// Check to see if we have a CRL....
- if (mp_X509CRL == NULL) {
+ if (mp_X509CRL == nullptr) {
throw XSECCryptoException(XSECCryptoException::X509Error,
"OpenSSL:X509CRL - Error translating Base64 DER encoding into OpenSSL X509 CRL structure");
}
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
const char* SecurityHelper::guessEncodingFormat(const char* pathname)
{
- const char* format=NULL;
+ const char* format=nullptr;
BIO* in=BIO_new(BIO_s_file_internal());
if (in && BIO_read_filename(in, pathname)>0) {
const int READSIZE = 1;
// Here we know it's DER-encoded, now try to parse it as a PKCS12 ASN.1 structure.
// If it fails, must be another kind of DER-encoded structure.
PKCS12* p12;
- if ((p12=d2i_PKCS12_bio(in, NULL)) == NULL) {
+ if ((p12=d2i_PKCS12_bio(in, nullptr)) == nullptr) {
format = "DER";
}
else {
log.info("loading private key from file (%s)", pathname);
// Native objects.
- PKCS12* p12=NULL;
- EVP_PKEY* pkey=NULL;
+ PKCS12* p12=nullptr;
+ EVP_PKEY* pkey=nullptr;
BIO* in=BIO_new(BIO_s_file_internal());
if (in && BIO_read_filename(in, pathname)>0) {
else {
// Here we know it's DER-encoded, now try to parse it as a PKCS12 ASN.1 structure.
// If it fails, must be another kind of DER-encoded structure.
- if ((p12=d2i_PKCS12_bio(in, NULL)) == NULL) {
+ if ((p12=d2i_PKCS12_bio(in, nullptr)) == nullptr) {
format = "DER";
if (BIO_seek(in, mark) < 0) {
log_openssl();
// The format should be known, so parse accordingly.
if (!strcmp(format, "PEM")) {
- pkey = PEM_read_bio_PrivateKey(in, NULL, passwd_callback, const_cast<char*>(password));
+ pkey = PEM_read_bio_PrivateKey(in, nullptr, passwd_callback, const_cast<char*>(password));
}
else if (!strcmp(format, "DER")) {
- pkey=d2i_PrivateKey_bio(in, NULL);
+ pkey=d2i_PrivateKey_bio(in, nullptr);
}
else if (!strcmp(format, "PKCS12")) {
if (!p12)
- p12 = d2i_PKCS12_bio(in, NULL);
+ p12 = d2i_PKCS12_bio(in, nullptr);
if (p12) {
- X509* x=NULL;
- PKCS12_parse(p12, const_cast<char*>(password), &pkey, &x, NULL);
+ X509* x=nullptr;
+ PKCS12_parse(p12, const_cast<char*>(password), &pkey, &x, nullptr);
PKCS12_free(p12);
X509_free(x);
}
// Now map it to an XSEC wrapper.
if (pkey) {
- XSECCryptoKey* ret=NULL;
+ XSECCryptoKey* ret=nullptr;
switch (pkey->type) {
case EVP_PKEY_RSA:
ret=new OpenSSLCryptoKeyRSA(pkey);
vector<XSECCryptoX509*>::size_type count = certs.size();
// Native objects.
- X509* x=NULL;
- PKCS12* p12=NULL;
+ X509* x=nullptr;
+ PKCS12* p12=nullptr;
BIO* in=BIO_new(BIO_s_file_internal());
if (in && BIO_read_filename(in, pathname)>0) {
else {
// Here we know it's DER-encoded, now try to parse it as a PKCS12 ASN.1 structure.
// If it fails, must be another kind of DER-encoded structure.
- if ((p12=d2i_PKCS12_bio(in, NULL)) == NULL) {
+ if ((p12=d2i_PKCS12_bio(in, nullptr)) == nullptr) {
format = "DER";
if (BIO_seek(in, mark) < 0) {
log_openssl();
// The format should be known, so parse accordingly.
if (!strcmp(format, "PEM")) {
- while (x=PEM_read_bio_X509(in, NULL, NULL, NULL)) {
+ while (x=PEM_read_bio_X509(in, nullptr, nullptr, nullptr)) {
certs.push_back(new OpenSSLCryptoX509(x));
X509_free(x);
}
}
else if (!strcmp(format, "DER")) {
- x=d2i_X509_bio(in, NULL);
+ x=d2i_X509_bio(in, nullptr);
if (x) {
certs.push_back(new OpenSSLCryptoX509(x));
X509_free(x);
}
else if (!strcmp(format, "PKCS12")) {
if (!p12)
- p12 = d2i_PKCS12_bio(in, NULL);
+ p12 = d2i_PKCS12_bio(in, nullptr);
if (p12) {
- EVP_PKEY* pkey=NULL;
+ EVP_PKEY* pkey=nullptr;
STACK_OF(X509)* CAstack = sk_X509_new_null();
PKCS12_parse(p12, const_cast<char*>(password), &pkey, &x, &CAstack);
PKCS12_free(p12);
log.debug("CRL encoding format for (%s) dynamically resolved as (%s)", pathname, format);
}
- X509_CRL* crl=NULL;
+ X509_CRL* crl=nullptr;
if (!strcmp(format, "PEM")) {
- while (crl=PEM_read_bio_X509_CRL(in, NULL, NULL, NULL)) {
+ while (crl=PEM_read_bio_X509_CRL(in, nullptr, nullptr, nullptr)) {
crls.push_back(new OpenSSLCryptoX509CRL(crl));
X509_CRL_free(crl);
}
}
else if (!strcmp(format, "DER")) {
- crl=d2i_X509_CRL_bio(in, NULL);
+ crl=d2i_X509_CRL_bio(in, nullptr);
if (crl) {
crls.push_back(new OpenSSLCryptoX509CRL(crl));
X509_CRL_free(crl);
Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").warn("key was not populated");
return ret;
}
- const EVP_MD* md=NULL;
+ const EVP_MD* md=nullptr;
if (hash) {
md = EVP_get_digestbyname(hash);
if (!md) {
BIO_write(chain, digest, len);
BIO_flush(chain);
}
- BUF_MEM* bptr=NULL;
+ BUF_MEM* bptr=nullptr;
BIO_get_mem_ptr(chain, &bptr);
if (bptr && bptr->length > 0)
ret.append(bptr->data, bptr->length);
Category::getInstance(XMLTOOLING_LOGCAT".SecurityHelper").warn("key was not populated");
return ret;
}
- const EVP_MD* md=NULL;
+ const EVP_MD* md=nullptr;
if (hash) {
md = EVP_get_digestbyname(hash);
if (!md) {
BIO_write(chain, digest, len);
BIO_flush(chain);
}
- BUF_MEM* bptr=NULL;
+ BUF_MEM* bptr=nullptr;
BIO_get_mem_ptr(chain, &bptr);
if (bptr && bptr->length > 0)
ret.append(bptr->data, bptr->length);
return ret;
}
- const EVP_MD* md=NULL;
+ const EVP_MD* md=nullptr;
if (hash) {
md = EVP_get_digestbyname(hash);
if (!md) {
BIO_write(chain, digest, len);
BIO_flush(chain);
}
- BUF_MEM* bptr=NULL;
+ BUF_MEM* bptr=nullptr;
BIO_get_mem_ptr(chain, &bptr);
if (bptr && bptr->length > 0)
ret.append(bptr->data, bptr->length);
string SecurityHelper::getDEREncoding(const XSECCryptoKey& key, bool hash, bool nowrap)
{
- return getDEREncoding(key, hash ? "SHA1" : NULL, nowrap);
+ return getDEREncoding(key, hash ? "SHA1" : nullptr, nowrap);
}
string SecurityHelper::getDEREncoding(const XSECCryptoX509& cert, bool hash, bool nowrap)
{
- return getDEREncoding(cert, hash ? "SHA1" : NULL, nowrap);
+ return getDEREncoding(cert, hash ? "SHA1" : nullptr, nowrap);
}
string SecurityHelper::getDEREncoding(const Credential& cred, bool hash, bool nowrap)
{
- return getDEREncoding(cred, hash ? "SHA1" : NULL, nowrap);
+ return getDEREncoding(cred, hash ? "SHA1" : nullptr, nowrap);
}
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* PKIXTrustEngine.cpp
*
- * Shibboleth-specific PKIX-validation TrustEngine
+ * Shibboleth-specific PKIX-validation TrustEngine.
*/
#include "internal.h"
class XMLTOOL_DLLLOCAL StaticPKIXTrustEngine : public AbstractPKIXTrustEngine
{
public:
- StaticPKIXTrustEngine(const DOMElement* e=NULL);
+ StaticPKIXTrustEngine(const DOMElement* e=nullptr);
virtual ~StaticPKIXTrustEngine() {
delete m_credResolver;
}
AbstractPKIXTrustEngine::PKIXValidationInfoIterator* getPKIXValidationInfoIterator(
- const CredentialResolver& pkixSource, CredentialCriteria* criteria=NULL
+ const CredentialResolver& pkixSource, CredentialCriteria* criteria=nullptr
) const;
const KeyInfoResolver* getKeyInfoResolver() const {
};
};
-StaticPKIXTrustEngine::StaticPKIXTrustEngine(const DOMElement* e) : AbstractPKIXTrustEngine(e), m_depth(1), m_credResolver(NULL)
+StaticPKIXTrustEngine::StaticPKIXTrustEngine(const DOMElement* e) : AbstractPKIXTrustEngine(e), m_depth(1), m_credResolver(nullptr)
{
- const XMLCh* depth = e ? e->getAttributeNS(NULL, verifyDepth) : NULL;
+ const XMLCh* depth = e ? e->getAttributeNS(nullptr, verifyDepth) : nullptr;
if (depth && *depth)
m_depth = XMLString::parseInt(depth);
- if (e && e->hasAttributeNS(NULL,certificate)) {
+ if (e && e->hasAttributeNS(nullptr,certificate)) {
// Simple File resolver config rooted here.
m_credResolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(FILESYSTEM_CREDENTIAL_RESOLVER,e);
}
else {
- e = e ? XMLHelper::getFirstChildElement(e, _CredentialResolver) : NULL;
- auto_ptr_char t(e ? e->getAttributeNS(NULL,type) : NULL);
+ e = e ? XMLHelper::getFirstChildElement(e, _CredentialResolver) : nullptr;
+ auto_ptr_char t(e ? e->getAttributeNS(nullptr,type) : nullptr);
if (t.get()) {
m_credResolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(t.get(),e);
}
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* TrustEngine.cpp
*
- * Registration of factories for built-in engines
+ * Registration of factories for built-in engines.
*/
#include "internal.h"
static const XMLCh _KeyInfoResolver[] = UNICODE_LITERAL_15(K,e,y,I,n,f,o,R,e,s,o,l,v,e,r);
static const XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e);
-TrustEngine::TrustEngine(const DOMElement* e) : m_keyInfoResolver(NULL)
+TrustEngine::TrustEngine(const DOMElement* e) : m_keyInfoResolver(nullptr)
{
- DOMElement* child = e ? XMLHelper::getFirstChildElement(e,_KeyInfoResolver) : NULL;
+ DOMElement* child = e ? XMLHelper::getFirstChildElement(e,_KeyInfoResolver) : nullptr;
if (child) {
- auto_ptr_char t(child->getAttributeNS(NULL,type));
+ auto_ptr_char t(child->getAttributeNS(nullptr,type));
if (t.get())
m_keyInfoResolver = XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.get(),child);
else
/*
- * Copyright 2001-2009 The Apache Software Foundation.
+ * Copyright 2001-2010 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
void XSECCryptoX509CRL::loadX509CRLPEM(const char* buf, unsigned int len)
{
const char * b;
- char * b1 = NULL;
+ char * b1 = nullptr;
if (len == 0)
b = buf;
else {
const char *p = strstr(buf, "-----BEGIN X509 CRL-----");
- if (p == NULL) {
+ if (p == nullptr) {
- if (b1 != NULL)
+ if (b1 != nullptr)
delete[] b1;
throw XSECCryptoException(XSECCryptoException::X509Error,
if (strstr(p, "-----END X509 CRL-----") != p) {
- if (b1 != NULL)
+ if (b1 != nullptr)
delete[] b1;
throw XSECCryptoException(XSECCryptoException::X509Error,
}
- if (b1 != NULL)
+ if (b1 != nullptr)
delete[] b1;
output[i] = '\0';
/**
* Gets the signing algorithm for the signature.
*
- * @return the signature algorithm, or NULL if indeterminate
+ * @return the signature algorithm, or nullptr if indeterminate
*/
virtual const XMLCh* getSignatureAlgorithm() const=0;
/**
* Sets a KeyInfo object to embed in the Signature.
*
- * @param keyInfo pointer to a KeyInfo object, or NULL
+ * @param keyInfo pointer to a KeyInfo object, or nullptr
*/
virtual void setKeyInfo(KeyInfo* keyInfo)=0;
* for validation purposes is provided through the native
* DSIGSignature object.
*
- * @return pointer to a KeyInfo object, or NULL
+ * @return pointer to a KeyInfo object, or nullptr
*/
virtual KeyInfo* getKeyInfo() const=0;
* Sets the ContentReference object to the Signature to be applied
* when the signature is created.
*
- * @param reference the reference to attach, or NULL
+ * @param reference the reference to attach, or nullptr
*/
virtual void setContentReference(ContentReference* reference)=0;
* for validation purposes is provided through the native
* DSIGSignature object.
*
- * @return pointer to a ContentReference object, or NULL
+ * @return pointer to a ContentReference object, or nullptr
*/
virtual ContentReference* getContentReference() const=0;
*
* @param credential optional source of signing key and KeyInfo
*/
- virtual void sign(const xmltooling::Credential* credential=NULL)=0;
+ virtual void sign(const xmltooling::Credential* credential=nullptr)=0;
/**
* Type-safe clone operation.
#else
virtual xmltooling::XMLObject* buildObject(
#endif
- const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL, const xmltooling::QName* schemaType=NULL
+ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const xmltooling::QName* schemaType=nullptr
) const;
/**
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param key the key to use
*/
- SignatureValidator(XSECCryptoKey* key=NULL);
+ SignatureValidator(XSECCryptoKey* key=nullptr);
/**
* Constructor using a Credential
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
void init() {
- m_P=NULL;
- m_Q=NULL;
- m_G=NULL;
- m_Y=NULL;
- m_J=NULL;
- m_Seed=NULL;
- m_PgenCounter=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_P=nullptr;
+ m_Q=nullptr;
+ m_G=nullptr;
+ m_Y=nullptr;
+ m_J=nullptr;
+ m_Seed=nullptr;
+ m_PgenCounter=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_P=m_children.begin();
m_pos_Q=m_pos_P;
++m_pos_Q;
}
void init() {
- m_Modulus=NULL;
- m_Exponent=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_Modulus=nullptr;
+ m_Exponent=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_Modulus=m_children.begin();
m_pos_Exponent=m_pos_Modulus;
++m_pos_Exponent;
}
void init() {
- m_DSAKeyValue=NULL;
- m_RSAKeyValue=NULL;
- m_UnknownXMLObject=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_DSAKeyValue=nullptr;
+ m_RSAKeyValue=nullptr;
+ m_UnknownXMLObject=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_DSAKeyValue=m_children.begin();
m_pos_RSAKeyValue=m_pos_DSAKeyValue;
++m_pos_RSAKeyValue;
}
TransformImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
- : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Algorithm(NULL) {
+ : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Algorithm(nullptr) {
}
TransformImpl(const TransformImpl& src)
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,NULL);
+ MARSHALL_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_STRING_ATTRIB(Algorithm,ALGORITHM,NULL);
+ PROC_STRING_ATTRIB(Algorithm,ALGORITHM,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
}
void init() {
- m_URI=m_Type=NULL;
- m_Transforms=NULL;
- m_children.push_back(NULL);
+ m_URI=m_Type=nullptr;
+ m_Transforms=nullptr;
+ m_children.push_back(nullptr);
m_pos_Transforms=m_children.begin();
}
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(URI,URI,NULL);
- MARSHALL_STRING_ATTRIB(Type,TYPE,NULL);
+ MARSHALL_STRING_ATTRIB(URI,URI,nullptr);
+ MARSHALL_STRING_ATTRIB(Type,TYPE,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_STRING_ATTRIB(URI,URI,NULL);
- PROC_STRING_ATTRIB(Type,TYPE,NULL);
+ PROC_STRING_ATTRIB(URI,URI,nullptr);
+ PROC_STRING_ATTRIB(Type,TYPE,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
}
void init() {
- m_X509IssuerName=NULL;
- m_X509SerialNumber=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_X509IssuerName=nullptr;
+ m_X509SerialNumber=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_X509IssuerName=m_children.begin();
m_pos_X509SerialNumber=m_pos_X509IssuerName;
++m_pos_X509SerialNumber;
VectorOfPairs(SPKISexp,XMLObject) v=getSPKISexps();
for (vector< pair<SPKISexp*,XMLObject*> >::const_iterator i=src.m_SPKISexps.begin(); i!=src.m_SPKISexps.end(); i++) {
if (i->first) {
- v.push_back(make_pair(i->first->cloneSPKISexp(),(i->second ? i->second->clone() : (XMLObject*)NULL)));
+ v.push_back(make_pair(i->first->cloneSPKISexp(),(i->second ? i->second->clone() : (XMLObject*)nullptr)));
}
}
}
if (XMLHelper::isNodeNamed(root,XMLSIG_NS,SPKISexp::LOCAL_NAME)) {
SPKISexp* typesafe=dynamic_cast<SPKISexp*>(childXMLObject);
if (typesafe) {
- getSPKISexps().push_back(make_pair(typesafe,(XMLObject*)NULL));
+ getSPKISexps().push_back(make_pair(typesafe,(XMLObject*)nullptr));
return;
}
}
const XMLCh* nsURI=root->getNamespaceURI();
if (!XMLString::equals(nsURI,XMLSIG_NS) && nsURI && *nsURI) {
// Update second half of pair in vector, and in master list.
- if (!m_SPKISexps.empty() && m_SPKISexps.back().second==NULL) {
+ if (!m_SPKISexps.empty() && m_SPKISexps.back().second==nullptr) {
m_SPKISexps.back().second=childXMLObject;
m_children.back()=childXMLObject;
return;
}
void init() {
- m_PGPKeyID=NULL;
- m_PGPKeyPacket=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_PGPKeyID=nullptr;
+ m_PGPKeyPacket=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_PGPKeyID=m_children.begin();
m_pos_PGPKeyPacket=m_pos_PGPKeyID;
++m_pos_PGPKeyPacket;
}
KeyInfoImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
- : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Id(NULL) {
+ : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Id(nullptr) {
}
KeyInfoImpl(const KeyInfoImpl& src)
}
IMPL_XMLOBJECT_CLONE(KeyInfo);
- IMPL_ID_ATTRIB_EX(Id,ID,NULL);
+ IMPL_ID_ATTRIB_EX(Id,ID,nullptr);
IMPL_TYPED_CHILDREN(KeyName,m_children.end());
IMPL_TYPED_CHILDREN(KeyValue,m_children.end());
IMPL_TYPED_CHILDREN(RetrievalMethod,m_children.end());
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_ID_ATTRIB(Id,ID,NULL);
+ MARSHALL_ID_ATTRIB(Id,ID,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_ID_ATTRIB(Id,ID,NULL);
+ PROC_ID_ATTRIB(Id,ID,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
using namespace xmltooling;
using namespace std;
-SignatureValidator::SignatureValidator(XSECCryptoKey* key) : m_key(key), m_credential(NULL)
+SignatureValidator::SignatureValidator(XSECCryptoKey* key) : m_key(key), m_credential(nullptr)
{
}
-SignatureValidator::SignatureValidator(const Credential* credential) : m_key(NULL), m_credential(credential)
+SignatureValidator::SignatureValidator(const Credential* credential) : m_key(nullptr), m_credential(credential)
{
}
void SignatureValidator::setKey(XSECCryptoKey* key)
{
m_key = key;
- m_credential = NULL;
+ m_credential = nullptr;
}
void SignatureValidator::setCredential(const Credential* credential)
{
- m_key = NULL;
+ m_key = nullptr;
m_credential = credential;
}
else if (!m_key && !m_credential)
throw ValidationException("No Credential or key set on Validator.");
- XSECCryptoKey* key = m_key ? m_key : (m_credential ? m_credential->getPublicKey() : NULL);
+ XSECCryptoKey* key = m_key ? m_key : (m_credential ? m_credential->getPublicKey() : nullptr);
if (!key)
throw ValidationException("Credential did not contain a verification key.");
/**
* XMLSecSignatureImpl.cpp
*
- * Signature class for XMLSec-based signature-handling
+ * Signature class for XMLSec-based signature-handling.
*/
#include "internal.h"
public:
XMLSecSignatureImpl() : AbstractXMLObject(XMLSIG_NS, Signature::LOCAL_NAME, XMLSIG_PREFIX),
UnknownElementImpl(XMLSIG_NS, Signature::LOCAL_NAME, XMLSIG_PREFIX),
- m_signature(NULL), m_c14n(NULL), m_sm(NULL), m_key(NULL), m_keyInfo(NULL), m_reference(NULL) {}
+ m_signature(nullptr), m_c14n(nullptr), m_sm(nullptr), m_key(nullptr), m_keyInfo(nullptr), m_reference(nullptr) {}
virtual ~XMLSecSignatureImpl();
void releaseDOM() const;
XMLObject* clone() const;
Signature* cloneSignature() const;
- DOMElement* marshall(DOMDocument* document=NULL, const vector<Signature*>* sigs=NULL, const Credential* credential=NULL) const;
- DOMElement* marshall(DOMElement* parentElement, const vector<Signature*>* sigs=NULL, const Credential* credential=NULL) const;
+ DOMElement* marshall(DOMDocument* document=nullptr, const vector<Signature*>* sigs=nullptr, const Credential* credential=nullptr) const;
+ DOMElement* marshall(DOMElement* parentElement, const vector<Signature*>* sigs=nullptr, const Credential* credential=nullptr) const;
XMLObject* unmarshall(DOMElement* element, bool bindDocument=false);
// Getters
m_reference=reference;
}
- void sign(const Credential* credential=NULL);
+ void sign(const Credential* credential=nullptr);
private:
mutable DSIGSignature* m_signature;
// Release the associated signature.
if (m_signature) {
XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->releaseSignature(m_signature);
- m_signature=NULL;
+ m_signature=nullptr;
}
}
}
// Fresh signature, so we just create an empty one.
log.debug("creating empty Signature element");
if (!document) {
- document=DOMImplementationRegistry::getDOMImplementation(NULL)->createDocument();
+ document=DOMImplementationRegistry::getDOMImplementation(nullptr)->createDocument();
bindDocument=true;
}
DSIGSignature* temp=XMLToolingInternalConfig::getInternalConfig().m_xsecProvider->newSignature();
// Marshall KeyInfo data.
if (credential) {
delete m_keyInfo;
- m_keyInfo = NULL;
+ m_keyInfo = nullptr;
m_keyInfo = credential->getKeyInfo();
}
if (m_keyInfo && (!m_signature->getKeyInfoList() || m_signature->getKeyInfoList()->isEmpty())) {
// Marshall KeyInfo data.
if (credential) {
delete m_keyInfo;
- m_keyInfo = NULL;
+ m_keyInfo = nullptr;
m_keyInfo = credential->getKeyInfo();
}
if (m_keyInfo && (!m_signature->getKeyInfoList() || m_signature->getKeyInfoList()->isEmpty())) {
// Move input into a safeBuffer to source the transform chain.
safeBuffer sb,sbout;
sb.sbStrncpyIn(in,in_len);
- TXFMSB* sbt = new TXFMSB(NULL);
+ TXFMSB* sbt = new TXFMSB(nullptr);
sbt->setInput(sb, in_len);
TXFMChain tx(sbt);
// Move input into a safeBuffer to source the transform chain.
safeBuffer sb;
sb.sbStrncpyIn(in,in_len);
- TXFMSB* sbt = new TXFMSB(NULL);
+ TXFMSB* sbt = new TXFMSB(nullptr);
sbt->setInput(sb, in_len);
TXFMChain tx(sbt);
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param userptr a caller-supplied value to pass to the callback function
* @return true iff the callback was set
*/
- virtual bool setSSLCallback(ssl_ctx_callback_fn fn, void* userptr=NULL)=0;
+ virtual bool setSSLCallback(ssl_ctx_callback_fn fn, void* userptr=nullptr)=0;
/**
* Sets indicator that the transport peer has been authenticated.
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
DECL_SOAP11OBJECTBUILDER(Envelope);
DECL_SOAP11OBJECTBUILDER(Fault);
DECL_SOAP11OBJECTBUILDER(Header);
- DECL_XMLOBJECTBUILDER(XMLTOOL_API,Detail,NULL,NULL);
- DECL_XMLOBJECTBUILDER(XMLTOOL_API,Faultactor,NULL,NULL);
- DECL_XMLOBJECTBUILDER(XMLTOOL_API,Faultcode,NULL,NULL);
- DECL_XMLOBJECTBUILDER(XMLTOOL_API,Faultstring,NULL,NULL);
+ DECL_XMLOBJECTBUILDER(XMLTOOL_API,Detail,nullptr,nullptr);
+ DECL_XMLOBJECTBUILDER(XMLTOOL_API,Faultactor,nullptr,nullptr);
+ DECL_XMLOBJECTBUILDER(XMLTOOL_API,Faultcode,nullptr,nullptr);
+ DECL_XMLOBJECTBUILDER(XMLTOOL_API,Faultstring,nullptr,nullptr);
/**
* Registers builders and validators for SOAP 1.1 classes into the runtime.
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Returns the response message, if any. As long as a response is
- * "expected" but not available, NULL will be returned. If no response
+ * "expected" but not available, nullptr will be returned. If no response
* will be forthcoming, an exception is raised.
*
* <p>The caller is responsible for freeing the returned envelope.
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param password simple password/credential for transport authentication
* @return true iff the transport supports the indicated form of authentication
*/
- virtual bool setAuth(transport_auth_t authType, const char* username=NULL, const char* password=NULL)=0;
+ virtual bool setAuth(transport_auth_t authType, const char* username=nullptr, const char* password=nullptr)=0;
/**
* Determines whether TLS/SSL connections include a check of the server's certificate
*
* <p>The lifetime of the credential must be longer than the lifetime of this object.
*
- * @param credential a Credential instance, or NULL
+ * @param credential a Credential instance, or nullptr
* @return true iff the transport supports the use of the Credential
*/
- virtual bool setCredential(const Credential* credential=NULL)=0;
+ virtual bool setCredential(const Credential* credential=nullptr)=0;
/**
* Provides an X509TrustEngine to the transport to authenticate the transport peer.
* The lifetime of the engine must be longer than the lifetime of this object.
*
- * @param trustEngine an X509TrustEngine instance, or NULL
- * @param credResolver a CredentialResolver to supply the peer's trusted credentials, or NULL
+ * @param trustEngine an X509TrustEngine instance, or nullptr
+ * @param credResolver a CredentialResolver to supply the peer's trusted credentials, or nullptr
* @param criteria optional criteria for selecting peer credentials
* @param mandatory flag controls whether message is sent at all if the
* transport isn't authenticated using the TrustEngine
* @return true iff the transport supports the use of a TrustEngine
*/
virtual bool setTrustEngine(
- const X509TrustEngine* trustEngine=NULL,
- const CredentialResolver* credResolver=NULL,
- CredentialCriteria* criteria=NULL,
+ const X509TrustEngine* trustEngine=nullptr,
+ const CredentialResolver* credResolver=nullptr,
+ CredentialCriteria* criteria=nullptr,
bool mandatory=true
)=0;
#endif
*
* @param cacheTag optional pointer to string used for cache management
*/
- virtual bool setCacheTag(std::string* cacheTag=NULL);
+ virtual bool setCacheTag(std::string* cacheTag=nullptr);
/**
* Sets an implementation-specific transport provider option.
*
* @param in input stream to send
*/
- virtual void send(std::istream* in=NULL);
+ virtual void send(std::istream* in=nullptr);
/**
* Returns reference to response stream. The resulting stream must be
/**
* CURLSOAPTransport.cpp
*
- * libcurl-based SOAPTransport implementation
+ * libcurl-based SOAPTransport implementation.
*/
#include "internal.h"
Category& m_log;
};
- static XMLTOOL_DLLLOCAL CURLPool* g_CURLPool = NULL;
+ static XMLTOOL_DLLLOCAL CURLPool* g_CURLPool = nullptr;
class XMLTOOL_DLLLOCAL CURLSOAPTransport : public HTTPSOAPTransport, public OpenSSLSOAPTransport
{
public:
CURLSOAPTransport(const Address& addr)
: m_sender(addr.m_from ? addr.m_from : ""), m_peerName(addr.m_to ? addr.m_to : ""), m_endpoint(addr.m_endpoint),
- m_handle(NULL), m_headers(NULL),
+ m_handle(nullptr), m_headers(nullptr),
#ifndef XMLTOOLING_NO_XMLSEC
- m_cred(NULL), m_trustEngine(NULL), m_peerResolver(NULL), m_mandatory(false),
+ m_cred(nullptr), m_trustEngine(nullptr), m_peerResolver(nullptr), m_mandatory(false),
#endif
- m_openssl_ops(SSL_OP_ALL|SSL_OP_NO_SSLv2), m_ssl_callback(NULL), m_ssl_userptr(NULL),
- m_chunked(true), m_authenticated(false), m_cacheTag(NULL) {
+ m_openssl_ops(SSL_OP_ALL|SSL_OP_NO_SSLv2), m_ssl_callback(nullptr), m_ssl_userptr(nullptr),
+ m_chunked(true), m_authenticated(false), m_cacheTag(nullptr) {
m_handle = g_CURLPool->get(addr);
curl_easy_setopt(m_handle,CURLOPT_URL,addr.m_endpoint);
curl_easy_setopt(m_handle,CURLOPT_CONNECTTIMEOUT,15);
curl_easy_setopt(m_handle,CURLOPT_TIMEOUT,30);
curl_easy_setopt(m_handle,CURLOPT_HTTPAUTH,0);
- curl_easy_setopt(m_handle,CURLOPT_USERPWD,NULL);
+ curl_easy_setopt(m_handle,CURLOPT_USERPWD,nullptr);
curl_easy_setopt(m_handle,CURLOPT_SSL_VERIFYHOST,2);
curl_easy_setopt(m_handle,CURLOPT_HEADERDATA,this);
m_headers=curl_slist_append(m_headers,"Content-Type: text/xml");
virtual ~CURLSOAPTransport() {
curl_slist_free_all(m_headers);
- curl_easy_setopt(m_handle,CURLOPT_ERRORBUFFER,NULL);
- curl_easy_setopt(m_handle,CURLOPT_PRIVATE,m_authenticated ? "secure" : NULL); // Save off security "state".
+ curl_easy_setopt(m_handle,CURLOPT_ERRORBUFFER,nullptr);
+ curl_easy_setopt(m_handle,CURLOPT_PRIVATE,m_authenticated ? "secure" : nullptr); // Save off security "state".
g_CURLPool->put(m_sender.c_str(), m_peerName.c_str(), m_endpoint.c_str(), m_handle);
}
return (curl_easy_setopt(m_handle,CURLOPT_TIMEOUT,timeout)==CURLE_OK);
}
- bool setAuth(transport_auth_t authType, const char* username=NULL, const char* password=NULL);
+ bool setAuth(transport_auth_t authType, const char* username=nullptr, const char* password=nullptr);
bool setVerifyHost(bool verify) {
return (curl_easy_setopt(m_handle,CURLOPT_SSL_VERIFYHOST,verify ? 2 : 0)==CURLE_OK);
}
#ifndef XMLTOOLING_NO_XMLSEC
- bool setCredential(const Credential* cred=NULL) {
+ bool setCredential(const Credential* cred=nullptr) {
const OpenSSLCredential* down = dynamic_cast<const OpenSSLCredential*>(cred);
if (!down) {
- m_cred = NULL;
- return (cred==NULL);
+ m_cred = nullptr;
+ return (cred==nullptr);
}
m_cred = down;
return true;
}
bool setTrustEngine(
- const X509TrustEngine* trustEngine=NULL,
- const CredentialResolver* peerResolver=NULL,
- CredentialCriteria* criteria=NULL,
+ const X509TrustEngine* trustEngine=nullptr,
+ const CredentialResolver* peerResolver=nullptr,
+ CredentialCriteria* criteria=nullptr,
bool mandatory=true
) {
const OpenSSLTrustEngine* down = dynamic_cast<const OpenSSLTrustEngine*>(trustEngine);
if (!down) {
- m_trustEngine = NULL;
- m_peerResolver = NULL;
- m_criteria = NULL;
- return (trustEngine==NULL);
+ m_trustEngine = nullptr;
+ m_peerResolver = nullptr;
+ m_criteria = nullptr;
+ return (trustEngine==nullptr);
}
m_trustEngine = down;
m_peerResolver = peerResolver;
send(&in);
}
- void send(istream* in=NULL);
+ void send(istream* in=nullptr);
istream& receive() {
return m_stream;
const vector<string>& getResponseHeader(const char* val) const;
- bool setSSLCallback(ssl_ctx_callback_fn fn, void* userptr=NULL) {
+ bool setSSLCallback(ssl_ctx_callback_fn fn, void* userptr=nullptr) {
m_ssl_callback=fn;
m_ssl_userptr=userptr;
return true;
void xmltooling::termSOAPTransports()
{
delete g_CURLPool;
- g_CURLPool = NULL;
+ g_CURLPool = nullptr;
}
OpenSSLSOAPTransport::OpenSSLSOAPTransport()
// Create a new connection and set non-varying options.
CURL* handle=curl_easy_init();
if (!handle)
- return NULL;
+ return nullptr;
curl_easy_setopt(handle,CURLOPT_NOPROGRESS,1);
curl_easy_setopt(handle,CURLOPT_NOSIGNAL,1);
curl_easy_setopt(handle,CURLOPT_FAILONERROR,1);
curl_easy_setopt(handle,CURLOPT_SSL_CIPHER_LIST,"ALL:!aNULL:!LOW:!EXPORT:!SSLv2");
// Verification of the peer is via TrustEngine only.
curl_easy_setopt(handle,CURLOPT_SSL_VERIFYPEER,0);
- curl_easy_setopt(handle,CURLOPT_CAINFO,NULL);
+ curl_easy_setopt(handle,CURLOPT_CAINFO,nullptr);
curl_easy_setopt(handle,CURLOPT_HEADERFUNCTION,&curl_header_hook);
curl_easy_setopt(handle,CURLOPT_WRITEFUNCTION,&curl_write_hook);
curl_easy_setopt(handle,CURLOPT_DEBUGFUNCTION,&curl_debug_hook);
else
i->second.push_back(handle);
- CURL* killit=NULL;
+ CURL* killit=nullptr;
if (++m_size > 256) {
// Kick a handle out from the back of the bus.
while (true) {
if (authType==transport_auth_none) {
if (curl_easy_setopt(m_handle,CURLOPT_HTTPAUTH,0)!=CURLE_OK)
return false;
- return (curl_easy_setopt(m_handle,CURLOPT_USERPWD,NULL)==CURLE_OK);
+ return (curl_easy_setopt(m_handle,CURLOPT_USERPWD,nullptr)==CURLE_OK);
}
long flag=0;
switch (authType) {
}
// For libcurl, the option is an enum and the value type depends on the option.
- CURLoption opt = static_cast<CURLoption>(strtol(option, NULL, 10));
+ CURLoption opt = static_cast<CURLoption>(strtol(option, nullptr, 10));
if (opt < CURLOPTTYPE_OBJECTPOINT)
- return (curl_easy_setopt(m_handle, opt, strtol(value, NULL, 10)) == CURLE_OK);
+ return (curl_easy_setopt(m_handle, opt, strtol(value, nullptr, 10)) == CURLE_OK);
#ifdef CURLOPTTYPE_OFF_T
else if (opt < CURLOPTTYPE_OFF_T) {
if (value)
m_saved_options.push_back(value);
- return (curl_easy_setopt(m_handle, opt, value ? m_saved_options.back().c_str() : NULL) == CURLE_OK);
+ return (curl_easy_setopt(m_handle, opt, value ? m_saved_options.back().c_str() : nullptr) == CURLE_OK);
}
# ifdef HAVE_CURL_OFF_T
else if (sizeof(curl_off_t) == sizeof(long))
- return (curl_easy_setopt(m_handle, opt, strtol(value, NULL, 10)) == CURLE_OK);
+ return (curl_easy_setopt(m_handle, opt, strtol(value, nullptr, 10)) == CURLE_OK);
# else
else if (sizeof(off_t) == sizeof(long))
- return (curl_easy_setopt(m_handle, opt, strtol(value, NULL, 10)) == CURLE_OK);
+ return (curl_easy_setopt(m_handle, opt, strtol(value, nullptr, 10)) == CURLE_OK);
# endif
return false;
#else
else {
if (value)
m_saved_options.push_back(value);
- return (curl_easy_setopt(m_handle, opt, value ? m_saved_options.back().c_str() : NULL) == CURLE_OK);
+ return (curl_easy_setopt(m_handle, opt, value ? m_saved_options.back().c_str() : nullptr) == CURLE_OK);
}
#endif
}
string CURLSOAPTransport::getContentType() const
{
- char* content_type=NULL;
+ char* content_type=nullptr;
curl_easy_getinfo(m_handle,CURLINFO_CONTENT_TYPE,&content_type);
return content_type ? content_type : "";
}
msg.append(buf,in->gcount());
}
curl_easy_setopt(m_handle,CURLOPT_POST,1);
- curl_easy_setopt(m_handle,CURLOPT_READFUNCTION,NULL);
+ curl_easy_setopt(m_handle,CURLOPT_READFUNCTION,nullptr);
curl_easy_setopt(m_handle,CURLOPT_POSTFIELDS,msg.c_str());
curl_easy_setopt(m_handle,CURLOPT_POSTFIELDSIZE,msg.length());
}
// Restore security "state". Necessary because the callback only runs
// when handshakes occur. Even new TCP connections won't execute it.
- char* priv=NULL;
+ char* priv=nullptr;
curl_easy_getinfo(m_handle,CURLINFO_PRIVATE,&priv);
if (priv)
m_authenticated=true;
}
else {
- curl_easy_setopt(m_handle,CURLOPT_SSL_CTX_FUNCTION,NULL);
- curl_easy_setopt(m_handle,CURLOPT_SSL_CTX_DATA,NULL);
+ curl_easy_setopt(m_handle,CURLOPT_SSL_CTX_FUNCTION,nullptr);
+ curl_easy_setopt(m_handle,CURLOPT_SSL_CTX_DATA,nullptr);
}
// Make the call.
if (ctx->m_criteria) {
ctx->m_criteria->setUsage(Credential::TLS_CREDENTIAL);
// Bypass name check (handled for us by curl).
- ctx->m_criteria->setPeerName(NULL);
+ ctx->m_criteria->setPeerName(nullptr);
success = ctx->m_trustEngine->validate(x509_ctx->cert,x509_ctx->untrusted,*(ctx->m_peerResolver),ctx->m_criteria);
}
else {
conf->m_cred->attach(ssl_ctx);
if (conf->m_trustEngine) {
- SSL_CTX_set_verify(ssl_ctx,SSL_VERIFY_PEER,NULL);
+ SSL_CTX_set_verify(ssl_ctx,SSL_VERIFY_PEER,nullptr);
#if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
// With 0.9.7, we can pass a callback argument directly.
SSL_CTX_set_cert_verify_callback(ssl_ctx,verify_callback,userptr);
// With 0.9.6, there's no argument, so we're going to use a really embarrassing hack and
// stuff the argument in the depth property where it will get copied to the context object
// that's handed to the callback.
- SSL_CTX_set_cert_verify_callback(ssl_ctx,reinterpret_cast<int (*)()>(verify_callback),NULL);
+ SSL_CTX_set_cert_verify_callback(ssl_ctx,reinterpret_cast<int (*)()>(verify_callback),nullptr);
SSL_CTX_set_verify_depth(ssl_ctx,reinterpret_cast<int>(userptr));
#endif
}
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
}
-SOAPClient::SOAPClient(bool validate) : m_validate(validate), m_transport(NULL)
+SOAPClient::SOAPClient(bool validate) : m_validate(validate), m_transport(nullptr)
{
}
void SOAPClient::reset()
{
delete m_transport;
- m_transport=NULL;
+ m_transport=nullptr;
}
void SOAPClient::send(const Envelope& env, const SOAPTransport::Address& addr)
{
// Prepare a transport object.
- const char* pch = addr.m_endpoint ? strchr(addr.m_endpoint,':') : NULL;
+ const char* pch = addr.m_endpoint ? strchr(addr.m_endpoint,':') : nullptr;
if (!pch)
throw IOException("SOAP endpoint was not a URL.");
string scheme(addr.m_endpoint, pch-addr.m_endpoint);
// If we can get the stream, then the call is still active.
istream& out = m_transport->receive();
if (!out)
- return NULL; // nothing yet
+ return nullptr; // nothing yet
// Check content type.
string s = m_transport->getContentType();
bool SOAPClient::handleFault(const Fault& fault)
{
- const xmltooling::QName* code = (fault.getFaultcode() ? fault.getFaultcode()->getCode() : NULL);
- auto_ptr_char str((fault.getFaultstring() ? fault.getFaultstring()->getString() : NULL));
+ const xmltooling::QName* code = (fault.getFaultcode() ? fault.getFaultcode()->getCode() : nullptr);
+ auto_ptr_char str((fault.getFaultstring() ? fault.getFaultstring()->getString() : nullptr));
Category::getInstance(XMLTOOLING_LOGCAT".SOAPClient").error(
"SOAP client detected a Fault: (%s) (%s)",
(code ? code->toString().c_str() : "no code"),
/*
- * Copyright 2001-2008 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* SOAPImpl.cpp
*
- * Implementation classes for SOAP 1.1 schema
+ * Implementation classes for SOAP 1.1 schema.
*/
#include "internal.h"
}
FaultcodeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
- : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_qname(NULL) {
+ : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_qname(nullptr) {
}
FaultcodeImpl(const FaultcodeImpl& src)
- : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src), m_qname(NULL) {
+ : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src), m_qname(nullptr) {
setCode(src.getCode());
}
setTextContent(temp.get());
}
else
- setTextContent(NULL);
+ setTextContent(nullptr);
}
IMPL_XMLOBJECT_CLONE(Faultcode);
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Faultcode=NULL;
- m_Faultstring=NULL;
- m_Faultactor=NULL;
- m_Detail=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_Faultcode=nullptr;
+ m_Faultstring=nullptr;
+ m_Faultactor=nullptr;
+ m_Detail=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_Faultcode=m_children.begin();
m_pos_Faultstring=m_pos_Faultcode;
++m_pos_Faultstring;
protected:
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
- PROC_TYPED_CHILD(Faultcode,NULL,false);
- PROC_TYPED_CHILD(Faultstring,NULL,false);
- PROC_TYPED_CHILD(Faultactor,NULL,false);
- PROC_TYPED_CHILD(Detail,NULL,false);
+ PROC_TYPED_CHILD(Faultcode,nullptr,false);
+ PROC_TYPED_CHILD(Faultstring,nullptr,false);
+ PROC_TYPED_CHILD(Faultactor,nullptr,false);
+ PROC_TYPED_CHILD(Detail,nullptr,false);
AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
}
};
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Header=NULL;
- m_Body=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_Header=nullptr;
+ m_Body=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_Header=m_children.begin();
m_pos_Body=m_pos_Header;
++m_pos_Body;
/*
-* Copyright 2001-2009 Internet2
+* Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
QName q;
REGISTER_ELEMENT_NOVAL(SOAP11ENV_NS,Body);
- REGISTER_ELEMENT_NOVAL(NULL,Detail);
+ REGISTER_ELEMENT_NOVAL(nullptr,Detail);
REGISTER_ELEMENT(SOAP11ENV_NS,Envelope);
REGISTER_ELEMENT(SOAP11ENV_NS,Fault);
- REGISTER_ELEMENT(NULL,Faultactor);
- REGISTER_ELEMENT(NULL,Faultcode);
- REGISTER_ELEMENT(NULL,Faultstring);
+ REGISTER_ELEMENT(nullptr,Faultactor);
+ REGISTER_ELEMENT(nullptr,Faultcode);
+ REGISTER_ELEMENT(nullptr,Faultstring);
REGISTER_ELEMENT_NOVAL(SOAP11ENV_NS,Header);
REGISTER_TYPE_NOVAL(SOAP11ENV_NS,Body);
REGISTER_TYPE_NOVAL(SOAP11ENV_NS,Detail);
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Default constructor.
*/
- auto_ptr_char() : m_buf(NULL) {
+ auto_ptr_char() : m_buf(nullptr) {
}
/**
* @return a null-terminated local code page string
*/
char* release() {
- char* temp=m_buf; m_buf=NULL; return temp;
+ char* temp=m_buf; m_buf=nullptr; return temp;
}
private:
/**
* Default constructor.
*/
- auto_ptr_XMLCh() : m_buf(NULL) {
+ auto_ptr_XMLCh() : m_buf(nullptr) {
}
/**
* @return a null-terminated Unicode string
*/
XMLCh* release() {
- XMLCh* temp=m_buf; m_buf=NULL; return temp;
+ XMLCh* temp=m_buf; m_buf=nullptr; return temp;
}
private:
* @return the wrapped pointer
*/
T* release() {
- T* temp=m_ptr; m_ptr=NULL; return temp;
+ T* temp=m_ptr; m_ptr=nullptr; return temp;
}
};
};
, fContentType(0)
, fStatusCode(200)
{
- const XMLCh* attr = e->getAttributeNS(NULL, url);
+ const XMLCh* attr = e->getAttributeNS(nullptr, url);
if (!attr || !*attr) {
- attr = e->getAttributeNS(NULL, uri);
+ attr = e->getAttributeNS(nullptr, uri);
if (!attr || !*attr)
throw IOException("No URL supplied via DOM to CurlURLInputStream constructor.");
}
curl_easy_setopt(fEasy, CURLOPT_MAXREDIRS, 6);
// Default settings.
- curl_easy_setopt(fEasy, CURLOPT_CONNECTTIMEOUT,10);
- curl_easy_setopt(fEasy, CURLOPT_TIMEOUT,60);
- curl_easy_setopt(fEasy, CURLOPT_HTTPAUTH,0);
- curl_easy_setopt(fEasy, CURLOPT_USERPWD,NULL);
+ curl_easy_setopt(fEasy, CURLOPT_CONNECTTIMEOUT, 10);
+ curl_easy_setopt(fEasy, CURLOPT_TIMEOUT, 60);
+ curl_easy_setopt(fEasy, CURLOPT_HTTPAUTH, 0);
+ curl_easy_setopt(fEasy, CURLOPT_USERPWD, nullptr);
curl_easy_setopt(fEasy, CURLOPT_SSL_VERIFYHOST, 2);
curl_easy_setopt(fEasy, CURLOPT_SSL_VERIFYPEER, 0);
- curl_easy_setopt(fEasy, CURLOPT_CAINFO, NULL);
+ curl_easy_setopt(fEasy, CURLOPT_CAINFO, nullptr);
curl_easy_setopt(fEasy, CURLOPT_SSL_CIPHER_LIST, "ALL:!aNULL:!LOW:!EXPORT:!SSLv2");
curl_easy_setopt(fEasy, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(fEasy, CURLOPT_NOSIGNAL, 1);
}
if (e) {
- const XMLCh* flag = e->getAttributeNS(NULL, verifyHost);
+ const XMLCh* flag = e->getAttributeNS(nullptr, verifyHost);
if (flag && (*flag == chLatin_f || *flag == chDigit_0))
curl_easy_setopt(fEasy, CURLOPT_SSL_VERIFYHOST, 0);
bool success;
DOMElement* child = XMLHelper::getLastChildElement(e, TransportOption);
while (child) {
- if (child->hasChildNodes() && XMLString::equals(child->getAttributeNS(NULL,_provider), _OpenSSL)) {
- auto_ptr_char option(child->getAttributeNS(NULL,_option));
+ if (child->hasChildNodes() && XMLString::equals(child->getAttributeNS(nullptr,_provider), _OpenSSL)) {
+ auto_ptr_char option(child->getAttributeNS(nullptr,_option));
auto_ptr_char value(child->getFirstChild()->getNodeValue());
if (option.get() && value.get() && !strcmp(option.get(), "SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION") &&
(*value.get()=='1' || *value.get()=='t')) {
if (!success)
fLog.error("failed to set OpenSSL transport option (%s)", option.get());
}
- else if (child->hasChildNodes() && XMLString::equals(child->getAttributeNS(NULL,_provider), _CURL)) {
- auto_ptr_char option(child->getAttributeNS(NULL,_option));
+ else if (child->hasChildNodes() && XMLString::equals(child->getAttributeNS(nullptr,_provider), _CURL)) {
+ auto_ptr_char option(child->getAttributeNS(nullptr,_option));
auto_ptr_char value(child->getFirstChild()->getNodeValue());
if (option.get() && *option.get() && value.get() && *value.get()) {
// For libcurl, the option is an enum and the value type depends on the option.
- CURLoption opt = static_cast<CURLoption>(strtol(option.get(), NULL, 10));
+ CURLoption opt = static_cast<CURLoption>(strtol(option.get(), nullptr, 10));
if (opt < CURLOPTTYPE_OBJECTPOINT)
- success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), NULL, 10)) == CURLE_OK);
+ success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), nullptr, 10)) == CURLE_OK);
#ifdef CURLOPTTYPE_OFF_T
else if (opt < CURLOPTTYPE_OFF_T) {
fSavedOptions.push_back(value.get());
}
# ifdef HAVE_CURL_OFF_T
else if (sizeof(curl_off_t) == sizeof(long))
- success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), NULL, 10)) == CURLE_OK);
+ success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), nullptr, 10)) == CURLE_OK);
# else
else if (sizeof(off_t) == sizeof(long))
- success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), NULL, 10)) == CURLE_OK);
+ success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), nullptr, 10)) == CURLE_OK);
# endif
else
success = false;
catch (XMLException&) {
curl_multi_remove_handle(fMulti, fEasy);
curl_easy_cleanup(fEasy);
- fEasy = NULL;
+ fEasy = nullptr;
curl_multi_cleanup(fMulti);
- fMulti = NULL;
+ fMulti = nullptr;
throw;
}
if(runningHandles == 0) break;
if (!fBuffer) {
curl_multi_remove_handle(fMulti, fEasy);
curl_easy_cleanup(fEasy);
- fEasy = NULL;
+ fEasy = nullptr;
curl_multi_cleanup(fMulti);
- fMulti = NULL;
+ fMulti = nullptr;
throw bad_alloc();
}
memcpy(fBuffer, specialxml.c_str(), specialxml.length());
}
// Find the content type
- char* contentType8 = NULL;
+ char* contentType8 = nullptr;
if(curl_easy_getinfo(fEasy, CURLINFO_CONTENT_TYPE, &contentType8) == CURLE_OK && contentType8)
fContentType = XMLString::transcode(contentType8);
}
// Process messages from curl
int msgsInQueue = 0;
- for (CURLMsg* msg = NULL; (msg = curl_multi_info_read(fMulti, &msgsInQueue)) != NULL; )
+ for (CURLMsg* msg = nullptr; (msg = curl_multi_info_read(fMulti, &msgsInQueue)) != nullptr; )
{
fLog.debug("msg %d, %d from curl", msg->msg, msg->data.result);
* @param url the URL of the resource to fetch
* @param cacheTag optional pointer to string used for cache management
*/
- CurlURLInputStream(const char* url, std::string* cacheTag=NULL);
+ CurlURLInputStream(const char* url, std::string* cacheTag=nullptr);
/**
* Constructor.
* @param url the URL of the resource to fetch
* @param cacheTag optional pointer to string used for cache management
*/
- CurlURLInputStream(const XMLCh* url, std::string* cacheTag=NULL);
+ CurlURLInputStream(const XMLCh* url, std::string* cacheTag=nullptr);
/**
* Constructor taking a DOM element supporting the following content:
* @param e DOM to supply configuration
* @param cacheTag optional pointer to string used for cache management
*/
- CurlURLInputStream(const xercesc::DOMElement* e, std::string* cacheTag=NULL);
+ CurlURLInputStream(const xercesc::DOMElement* e, std::string* cacheTag=nullptr);
~CurlURLInputStream();
static size_t staticWriteCallback(char *buffer, size_t size, size_t nitems, void *outstream);
size_t writeCallback(char *buffer, size_t size, size_t nitems);
- void init(const xercesc::DOMElement* e=NULL);
+ void init(const xercesc::DOMElement* e=nullptr);
bool readMore(int *runningHandles);
logging::Category& fLog;
int timedwait(MutexImpl* mutex, int delay_seconds) {
struct timespec ts;
memset(&ts, 0, sizeof(ts));
- ts.tv_sec = time(NULL) + delay_seconds;
+ ts.tv_sec = time(nullptr) + delay_seconds;
return pthread_cond_timedwait(&cond, &(mutex->mutex), &ts);
}
rc = pthread_create(&thread_id, &attrs, start_routine, arg);
}
else {
- rc = pthread_create(&thread_id, NULL, start_routine, arg);
+ rc = pthread_create(&thread_id, nullptr, start_routine, arg);
}
if (rc) {
#ifdef HAVE_STRERROR_R
MutexImpl::MutexImpl()
{
- int rc=pthread_mutex_init(&mutex, NULL);
+ int rc=pthread_mutex_init(&mutex, nullptr);
if (rc) {
#ifdef HAVE_STRERROR_R
char buf[256];
CondWaitImpl::CondWaitImpl()
{
- int rc=pthread_cond_init(&cond, NULL);
+ int rc=pthread_cond_init(&cond, nullptr);
if (rc) {
#ifdef HAVE_STRERROR_R
char buf[256];
RWLockImpl::RWLockImpl()
{
#ifdef HAVE_PTHREAD_RWLOCK_INIT
- int rc=pthread_rwlock_init(&lock, NULL);
+ int rc=pthread_rwlock_init(&lock, nullptr);
#else
- int rc=rwlock_init(&lock, USYNC_THREAD, NULL);
+ int rc=rwlock_init(&lock, USYNC_THREAD, nullptr);
#endif
if (rc) {
#ifdef HAVE_STRERROR_R
{
sigset_t sigmask;
sigfillset(&sigmask);
- Thread::mask_signals(SIG_BLOCK, &sigmask, NULL);
+ Thread::mask_signals(SIG_BLOCK, &sigmask, nullptr);
}
int Thread::mask_signals(int how, const sigset_t *newmask, sigset_t *oldmask)
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
DOMDocument* ParserPool::newDocument()
{
- return DOMImplementationRegistry::getDOMImplementation(NULL)->createDocument();
+ return DOMImplementationRegistry::getDOMImplementation(nullptr)->createDocument();
}
#ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS
doc->release();
throw XMLParserException("XML error(s) during parsing, check log for specifics");
}
- parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)NULL);
+ parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, nullptr);
parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true);
checkinBuilder(janitor.release());
return doc;
}
catch (XMLException& ex) {
- parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)NULL);
+ parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, nullptr);
parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true);
checkinBuilder(janitor.release());
auto_ptr_char temp(ex.getMessage());
throw XMLParserException(string("Xerces error during parsing: ") + (temp.get() ? temp.get() : "no message"));
}
catch (XMLToolingException&) {
- parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)NULL);
+ parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, nullptr);
parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true);
checkinBuilder(janitor.release());
throw;
doc->release();
throw XMLParserException("XML error(s) during parsing, check log for specifics");
}
- parser->setErrorHandler(NULL);
+ parser->setErrorHandler(nullptr);
parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true);
checkinBuilder(janitor.release());
return doc;
}
catch (XMLException& ex) {
- parser->setErrorHandler(NULL);
+ parser->setErrorHandler(nullptr);
parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true);
checkinBuilder(janitor.release());
auto_ptr_char temp(ex.getMessage());
throw XMLParserException(string("Xerces error during parsing: ") + (temp.get() ? temp.get() : "no message"));
}
catch (XMLToolingException&) {
- parser->setErrorHandler(NULL);
+ parser->setErrorHandler(nullptr);
parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true);
checkinBuilder(janitor.release());
throw;
log.debug("loading XML catalog from %s", temp.get());
}
- LocalFileInputSource fsrc(NULL,pathname);
+ LocalFileInputSource fsrc(nullptr,pathname);
Wrapper4InputSource domsrc(&fsrc,false);
try {
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(domsrc);
Lock lock(m_lock);
for (XMLSize_t i=0; i<mappings->getLength(); i++) {
root=static_cast<DOMElement*>(mappings->item(i));
- const XMLCh* from=root->getAttributeNS(NULL,systemId);
- const XMLCh* to=root->getAttributeNS(NULL,uri);
+ const XMLCh* from=root->getAttributeNS(nullptr,systemId);
+ const XMLCh* to=root->getAttributeNS(nullptr,uri);
m_schemaLocMap[from]=to;
}
m_schemaLocations.erase();
xmltooling::NDC ndc("resolveEntity");
#endif
if (!systemId)
- return NULL;
+ return nullptr;
Category& log=Category::getInstance(XMLTOOLING_LOGCAT".ParserPool");
if (log.isDebugEnabled()) {
{
static const XMLCh impltype[] = { chLatin_L, chLatin_S, chNull };
DOMImplementation* impl=DOMImplementationRegistry::getDOMImplementation(impltype);
- DOMLSParser* parser=static_cast<DOMImplementationLS*>(impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS,NULL);
+ DOMLSParser* parser=static_cast<DOMImplementationLS*>(impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS,nullptr);
parser->getDomConfig()->setParameter(XMLUni::fgDOMNamespaces, m_namespaceAware);
if (m_schemaAware) {
parser->getDomConfig()->setParameter(XMLUni::fgDOMNamespaces, true);
#ifdef XMLTOOLING_XERCESC_64BITSAFE
const XMLCh* StreamInputSource::StreamBinInputStream::getContentType() const
{
- return NULL;
+ return nullptr;
}
#endif
static const XMLCh uri[] = UNICODE_LITERAL_3(u,r,i);
static const XMLCh url[] = UNICODE_LITERAL_3(u,r,l);
- const XMLCh* attr = e->getAttributeNS(NULL, url);
+ const XMLCh* attr = e->getAttributeNS(nullptr, url);
if (!attr || !*attr) {
- attr = e->getAttributeNS(NULL, uri);
+ attr = e->getAttributeNS(nullptr, uri);
if (!attr || !*attr)
throw IOException("No URL supplied via DOM to URLInputSource constructor.");
}
#else
URLInputSource::URLInputSource(const XMLCh* url, const char* systemId, string* cacheTag)
- : InputSource(systemId), m_cacheTag(cacheTag), m_url(url), m_root(NULL)
+ : InputSource(systemId), m_cacheTag(cacheTag), m_url(url), m_root(nullptr)
{
}
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param is reference to an input stream
* @param systemId optional system identifier to attach to the stream
*/
- StreamInputSource(std::istream& is, const char* systemId=NULL);
+ StreamInputSource(std::istream& is, const char* systemId=nullptr);
/// @cond off
xercesc::BinInputStream* makeStream() const;
/// @endcond
* @param systemId optional system identifier to attach to the source
* @param cacheTag optional pointer to string used for cache management
*/
- URLInputSource(const XMLCh* url, const char* systemId=NULL, std::string* cacheTag=NULL);
+ URLInputSource(const XMLCh* url, const char* systemId=nullptr, std::string* cacheTag=nullptr);
/**
* Constructor taking a DOM element supporting the following content:
* @param systemId optional system identifier to attach to the source
* @param cacheTag optional pointer to string used for cache management
*/
- URLInputSource(const xercesc::DOMElement* e, const char* systemId=NULL, std::string* cacheTag=NULL);
+ URLInputSource(const xercesc::DOMElement* e, const char* systemId=nullptr, std::string* cacheTag=nullptr);
/// @cond off
virtual xercesc::BinInputStream* makeStream() const;
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* @param s filename to resolve
* @param filetype type of file being resolved
- * @param pkgname application package name to use in resolving the file (or NULL for the default)
- * @param prefix installation prefix to use in resolving the file (or NULL for the default)
+ * @param pkgname application package name to use in resolving the file (or nullptr for the default)
+ * @param prefix installation prefix to use in resolving the file (or nullptr for the default)
*
* @return a const reference to the input string
*/
- virtual const std::string& resolve(std::string& s, file_type_t filetype, const char* pkgname=NULL, const char* prefix=NULL) const;
+ virtual const std::string& resolve(std::string& s, file_type_t filetype, const char* pkgname=nullptr, const char* prefix=nullptr) const;
private:
bool isAbsolute(const char* s) const;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @param xmlObject the object to examine
*/
bool operator()(const XMLObject* xmlObject) const {
- const QName* xsitype = xmlObject ? xmlObject->getSchemaType() : NULL;
+ const QName* xsitype = xmlObject ? xmlObject->getSchemaType() : nullptr;
return xsitype ? (*xsitype == m_q) : false;
}
*
* @param c read-only container of pointer-based objects
* @param p a predicate function
- * @return the first object in the container matching the predicate, or NULL
+ * @return the first object in the container matching the predicate, or nullptr
*/
template<typename Container, typename Predicate>
typename Container::value_type find_if(const Container& c, const Predicate& p) {
typename Container::const_iterator i = std::find_if(c.begin(), c.end(), p);
- return (i!=c.end()) ? *i : NULL;
+ return (i!=c.end()) ? *i : nullptr;
}
/**
*
* @param c read-only container of pointer-based objects
* @param p a predicate function
- * @return the first object in the container matching the predicate, or NULL
+ * @return the first object in the container matching the predicate, or nullptr
*/
template<typename Container, typename Predicate>
typename Container::value_type find_if(Container& c, const Predicate& p) {
typename Container::iterator i = std::find_if(c.begin(), c.end(), p);
- return (i!=c.end()) ? *i : NULL;
+ return (i!=c.end()) ? *i : nullptr;
}
};
ReloadableXMLFile::ReloadableXMLFile(const DOMElement* e, Category& log)
- : m_root(e), m_local(true), m_validate(false), m_backupIndicator(true), m_filestamp(0), m_reloadInterval(0), m_lock(NULL), m_log(log),
- m_shutdown(false), m_reload_wait(NULL), m_reload_thread(NULL)
+ : m_root(e), m_local(true), m_validate(false), m_backupIndicator(true), m_filestamp(0), m_reloadInterval(0), m_lock(nullptr), m_log(log),
+ m_shutdown(false), m_reload_wait(nullptr), m_reload_thread(nullptr)
{
#ifdef _DEBUG
NDC ndc("ReloadableXMLFile");
#endif
// Establish source of data...
- const XMLCh* source=e->getAttributeNS(NULL,uri);
+ const XMLCh* source=e->getAttributeNS(nullptr,uri);
if (!source || !*source) {
- source=e->getAttributeNS(NULL,url);
+ source=e->getAttributeNS(nullptr,url);
if (!source || !*source) {
- source=e->getAttributeNS(NULL,path);
+ source=e->getAttributeNS(nullptr,path);
if (!source || !*source) {
- source=e->getAttributeNS(NULL,pathname);
+ source=e->getAttributeNS(nullptr,pathname);
if (!source || !*source) {
- source=e->getAttributeNS(NULL,file);
+ source=e->getAttributeNS(nullptr,file);
if (!source || !*source) {
- source=e->getAttributeNS(NULL,filename);
+ source=e->getAttributeNS(nullptr,filename);
}
}
}
m_local=false;
if (source && *source) {
- const XMLCh* flag=e->getAttributeNS(NULL,validate);
+ const XMLCh* flag=e->getAttributeNS(nullptr,validate);
m_validate=(XMLString::equals(flag,xmlconstants::XML_TRUE) || XMLString::equals(flag,xmlconstants::XML_ONE));
auto_ptr_char temp(source);
if (m_local) {
XMLToolingConfig::getConfig().getPathResolver()->resolve(m_source, PathResolver::XMLTOOLING_CFG_FILE);
- flag=e->getAttributeNS(NULL,reloadChanges);
+ flag=e->getAttributeNS(nullptr,reloadChanges);
if (!XMLString::equals(flag,xmlconstants::XML_FALSE) && !XMLString::equals(flag,xmlconstants::XML_ZERO)) {
#ifdef WIN32
struct _stat stat_buf;
}
else {
log.debug("using remote resource (%s)", m_source.c_str());
- source = e->getAttributeNS(NULL,backingFilePath);
+ source = e->getAttributeNS(nullptr,backingFilePath);
if (source && *source) {
auto_ptr_char temp2(source);
m_backing=temp2.get();
XMLToolingConfig::getConfig().getPathResolver()->resolve(m_backing, PathResolver::XMLTOOLING_RUN_FILE);
log.debug("backup remote resource to (%s)", m_backing.c_str());
}
- source = e->getAttributeNS(NULL,reloadInterval);
+ source = e->getAttributeNS(nullptr,reloadInterval);
if (source && *source) {
m_reloadInterval = XMLString::parseInt(source);
if (m_reloadInterval > 0) {
m_lock=RWLock::create();
}
}
- m_filestamp = time(NULL); // assume it gets loaded initially
+ m_filestamp = time(nullptr); // assume it gets loaded initially
}
if (m_lock) {
log.debug("no resource uri/path/name supplied, will load inline configuration");
}
- source = e->getAttributeNS(NULL, id);
+ source = e->getAttributeNS(nullptr, id);
if (source && *source) {
auto_ptr_char tempid(source);
m_id = tempid.get();
// Shut down the reload thread and let it know.
m_shutdown = true;
m_reload_wait->signal();
- m_reload_thread->join(NULL);
+ m_reload_thread->join(nullptr);
delete m_reload_thread;
delete m_reload_wait;
- m_reload_thread = NULL;
- m_reload_wait = NULL;
+ m_reload_thread = nullptr;
+ m_reload_wait = nullptr;
}
}
logging::NDC::pop();
}
- return NULL;
+ return nullptr;
}
Lockable* ReloadableXMLFile::lock()
else
m_log.debug("loading configuration from external resource...");
- DOMDocument* doc=NULL;
+ DOMDocument* doc=nullptr;
if (m_local || backup) {
auto_ptr_XMLCh widenit(backup ? m_backing.c_str() : m_source.c_str());
// Use library-wide lock for now, nothing else is using it anyway.
- Locker locker(backup ? getBackupLock() : NULL);
+ Locker locker(backup ? getBackupLock() : nullptr);
LocalFileInputSource src(widenit.get());
Wrapper4InputSource dsrc(&src, false);
if (m_validate)
doc=XMLToolingConfig::getConfig().getParser().parse(dsrc);
}
else {
- URLInputSource src(m_root, NULL, &m_cacheTag);
+ URLInputSource src(m_root, nullptr, &m_cacheTag);
Wrapper4InputSource dsrc(&src, false);
if (m_validate)
doc=XMLToolingConfig::getConfig().getValidatingParser().parse(dsrc);
*
* <p>The lock is <strong>NOT</strong> acquired automatically.
*
- * @return pointer to a lock interface, or NULL if unnecessary
+ * @return pointer to a lock interface, or nullptr if unnecessary
*/
virtual Lockable* getBackupLock();
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
using namespace xmltooling;
using namespace std;
-ReplayCache::ReplayCache(StorageService* storage) : m_owned(storage==NULL), m_storage(storage)
+ReplayCache::ReplayCache(StorageService* storage) : m_owned(storage==nullptr), m_storage(storage)
{
if (!m_storage)
- m_storage = XMLToolingConfig::getConfig().StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE, NULL);
+ m_storage = XMLToolingConfig::getConfig().StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE, nullptr);
}
ReplayCache::~ReplayCache()
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* The lifetime of the StorageService <strong>MUST</strong> be longer than
* the lifetime of the ReplayCache.
*
- * @param storage pointer to a StorageService, or NULL to keep cache in memory
+ * @param storage pointer to a StorageService, or nullptr to keep cache in memory
*/
- ReplayCache(StorageService* storage=NULL);
+ ReplayCache(StorageService* storage=nullptr);
virtual ~ReplayCache();
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @throws IOException raised if errors occur in the read process
*/
virtual int readString(
- const char* context, const char* key, std::string* pvalue=NULL, time_t* pexpiration=NULL, int version=0
+ const char* context, const char* key, std::string* pvalue=nullptr, time_t* pexpiration=nullptr, int version=0
)=0;
/**
*
* @param context a storage context label
* @param key null-terminated unique key of up to 255 bytes
- * @param value null-terminated value of up to 255 bytes to store, or NULL to leave alone
+ * @param value null-terminated value of up to 255 bytes to store, or nullptr to leave alone
* @param expiration a new expiration timestamp, or 0 to leave alone
* @param version if > 0, only update if the current version matches this value
* @return the version of the record after update, 0 if no record exists, or -1 if the version
* @throws IOException raised if errors occur in the update process
*/
virtual int updateString(
- const char* context, const char* key, const char* value=NULL, time_t expiration=0, int version=0
+ const char* context, const char* key, const char* value=nullptr, time_t expiration=0, int version=0
)=0;
/**
* @throws IOException raised if errors occur in the read process
*/
virtual int readText(
- const char* context, const char* key, std::string* pvalue=NULL, time_t* pexpiration=NULL, int version=0
+ const char* context, const char* key, std::string* pvalue=nullptr, time_t* pexpiration=nullptr, int version=0
)=0;
/**
*
* @param context a storage context label
* @param key null-terminated unique key of up to 255 bytes
- * @param value null-terminated value of arbitrary length to store, or NULL to leave alone
+ * @param value null-terminated value of arbitrary length to store, or nullptr to leave alone
* @param expiration a new expiration timestamp, or 0 to leave alone
* @param version if > 0, only update if the current version matches this value
* @return the version of the record after update, 0 if no record exists, or -1 if the version
* @throws IOException raised if errors occur in the update process
*/
virtual int updateText(
- const char* context, const char* key, const char* value=NULL, time_t expiration=0, int version=0
+ const char* context, const char* key, const char* value=nullptr, time_t expiration=0, int version=0
)=0;
/**
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
}
-TemplateEngine::TemplateParameters::TemplateParameters() : m_request(NULL)
+TemplateEngine::TemplateParameters::TemplateParameters() : m_request(nullptr)
{
}
const char* TemplateEngine::TemplateParameters::getParameter(const char* name) const
{
map<string,string>::const_iterator i=m_map.find(name);
- return (i!=m_map.end() ? i->second.c_str() : (m_request ? m_request->getParameter(name) : NULL));
+ return (i!=m_map.end() ? i->second.c_str() : (m_request ? m_request->getParameter(name) : nullptr));
}
const multimap<string,string>* TemplateEngine::TemplateParameters::getLoopCollection(const char* name) const
{
map< string,multimap<string,string> >::const_iterator i=m_collectionMap.find(name);
- return (i!=m_collectionMap.end() ? &(i->second) : NULL);
+ return (i!=m_collectionMap.end() ? &(i->second) : nullptr);
}
void TemplateEngine::setTagPrefix(const char* tagPrefix)
const char* line = buf.c_str();
const char* thispos;
- while ((thispos = strchr(lastpos, '<')) != NULL) {
+ while ((thispos = strchr(lastpos, '<')) != nullptr) {
// Output the string up to this token.
if (visible)
os << buf.substr(lastpos-line, thispos-lastpos);
lastpos = thispos + keytag.length();
// search for the end-tag
- if ((thispos = strstr(lastpos, "/>")) != NULL) {
+ if ((thispos = strstr(lastpos, "/>")) != nullptr) {
string key = buf.substr(lastpos-line, thispos-lastpos);
trimspace(key);
lastpos = thispos + iftag.length();
// search for the end of this tag
- if ((thispos = strchr(lastpos, '>')) != NULL) {
+ if ((thispos = strchr(lastpos, '>')) != nullptr) {
string key = buf.substr(lastpos-line, thispos-lastpos);
trimspace(key);
bool cond=false;
lastpos = thispos + ifnottag.length();
// search for the end of this tag
- if ((thispos = strchr(lastpos, '>')) != NULL) {
+ if ((thispos = strchr(lastpos, '>')) != nullptr) {
string key = buf.substr(lastpos-line, thispos-lastpos);
trimspace(key);
bool cond=visible;
bool cond = visible;
// search for the end of this tag
- if ((thispos = strchr(lastpos, '>')) != NULL) {
+ if ((thispos = strchr(lastpos, '>')) != nullptr) {
key = buf.substr(lastpos-line, thispos-lastpos);
trimspace(key);
lastpos = thispos + 1; // strlen(">")
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Returns the value of a parameter to plug into the template.
*
* @param name name of parameter
- * @return value of parameter, or NULL
+ * @return value of parameter, or nullptr
*/
virtual const char* getParameter(const char* name) const;
* Returns a named collection of sub-parameters to pass into a loop.
*
* @param name name of sub-collection
- * @return pointer to a multimap of sub-parameters, or NULL
+ * @return pointer to a multimap of sub-parameters, or nullptr
*/
virtual const std::multimap<std::string,std::string>* getLoopCollection(const char* name) const;
};
std::istream& is,
std::ostream& os,
const TemplateParameters& parameters,
- const XMLToolingException* e=NULL
+ const XMLToolingException* e=nullptr
) const;
/**
/**
* @file xmltooling/util/Threads.h
*
- * Thread and locking wrappers
+ * Thread and locking wrappers.
*/
#ifndef _xmltooling_threads_h
/**
* Returns the value for a TLS key.
*
- * @return the value or NULL
+ * @return the value or nullptr
*/
virtual void* getData() const=0;
/**
* Win32Threads.cpp
*
- * Thread and locking wrappers for Win32 platforms
+ * Thread and locking wrappers for Win32 platforms.
*/
#include "internal.h"
void onDetach() const {
if (destroy_hook) {
destroy_hook(TlsGetValue(key));
- TlsSetValue(key, NULL);
+ TlsSetValue(key, nullptr);
}
}
};
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return ret;
}
else {
- return new xmltooling::QName(e->lookupNamespaceURI(NULL), attributeValue);
+ return new xmltooling::QName(e->lookupNamespaceURI(nullptr), attributeValue);
}
}
}
- return NULL;
+ return nullptr;
}
DOMAttr* XMLHelper::getIdAttribute(const DOMElement* domElement)
{
if(!domElement->hasAttributes()) {
- return NULL;
+ return nullptr;
}
DOMNamedNodeMap* attributes = domElement->getAttributes();
}
}
- return NULL;
+ return nullptr;
}
const XMLObject* XMLHelper::getXMLObjectById(const XMLObject& tree, const XMLCh* id)
}
}
- return NULL;
+ return nullptr;
}
XMLObject* XMLHelper::getXMLObjectById(XMLObject& tree, const XMLCh* id)
}
}
- return NULL;
+ return nullptr;
}
void XMLHelper::getNonVisiblyUsedPrefixes(const XMLObject& tree, set<xstring>& prefixes)
{
if (domNode)
return new xmltooling::QName(domNode->getNamespaceURI(), domNode->getLocalName(), domNode->getPrefix());
- return NULL;
+ return nullptr;
}
xmltooling::QName* XMLHelper::getAttributeValueAsQName(const DOMAttr* attribute)
xmltooling::QName* XMLHelper::getNodeValueAsQName(const DOMNode* domNode)
{
if (!domNode)
- return NULL;
+ return nullptr;
int i;
const XMLCh* value=domNode->getTextContent();
return ret;
}
- return new xmltooling::QName(domNode->lookupNamespaceURI(NULL), value);
+ return new xmltooling::QName(domNode->lookupNamespaceURI(nullptr), value);
}
DOMElement* XMLHelper::appendChildElement(DOMElement* parentElement, DOMElement* childElement)
return child->getNodeValue();
child=child->getNextSibling();
}
- return NULL;
+ return nullptr;
}
DOMElement* XMLHelper::getFirstChildElement(const DOMNode* n, const XMLCh* localName)
/**
* Returns resource held by this object.
*
- * @return the resource held or NULL
+ * @return the resource held or nullptr
*/
T* get() {
return m_held;
/**
* Returns resource held by this object.
*
- * @return the resource held or NULL
+ * @return the resource held or nullptr
*/
T* operator->() {
return m_held;
/**
* Returns resource held by this object and releases it to the caller.
*
- * @return the resource held or NULL
+ * @return the resource held or nullptr
*/
T* release() {
T* ret=m_held;
- m_held=NULL;
+ m_held=nullptr;
return ret;
}
};
*
* @param tree root of tree to search
* @param id ID value to locate
- * @return XMLObject in the tree with a matching ID value, or NULL
+ * @return XMLObject in the tree with a matching ID value, or nullptr
*/
static const XMLObject* getXMLObjectById(const XMLObject& tree, const XMLCh* id);
*
* @param tree root of tree to search
* @param id ID value to locate
- * @return XMLObject in the tree with a matching ID value, or NULL
+ * @return XMLObject in the tree with a matching ID value, or nullptr
*/
static XMLObject* getXMLObjectById(XMLObject& tree, const XMLCh* id);
* Returns the first matching child element of the node if any.
*
* @param n node to check
- * @param localName local name to compare with or NULL for any match
- * @return the first matching child node of type Element, or NULL
+ * @param localName local name to compare with or nullptr for any match
+ * @return the first matching child node of type Element, or nullptr
*/
- static xercesc::DOMElement* getFirstChildElement(const xercesc::DOMNode* n, const XMLCh* localName=NULL);
+ static xercesc::DOMElement* getFirstChildElement(const xercesc::DOMNode* n, const XMLCh* localName=nullptr);
/**
* Returns the last matching child element of the node if any.
*
* @param n node to check
- * @param localName local name to compare with or NULL for any match
- * @return the last matching child node of type Element, or NULL
+ * @param localName local name to compare with or nullptr for any match
+ * @return the last matching child node of type Element, or nullptr
*/
- static xercesc::DOMElement* getLastChildElement(const xercesc::DOMNode* n, const XMLCh* localName=NULL);
+ static xercesc::DOMElement* getLastChildElement(const xercesc::DOMNode* n, const XMLCh* localName=nullptr);
/**
* Returns the next matching sibling element of the node if any.
*
* @param n node to check
- * @param localName local name to compare with or NULL for any match
- * @return the next matching sibling node of type Element, or NULL
+ * @param localName local name to compare with or nullptr for any match
+ * @return the next matching sibling node of type Element, or nullptr
*/
- static xercesc::DOMElement* getNextSiblingElement(const xercesc::DOMNode* n, const XMLCh* localName=NULL);
+ static xercesc::DOMElement* getNextSiblingElement(const xercesc::DOMNode* n, const XMLCh* localName=nullptr);
/**
* Returns the previous matching sibling element of the node if any.
*
* @param n node to check
- * @param localName local name to compare with or NULL for any match
- * @return the previous matching sibling node of type Element, or NULL
+ * @param localName local name to compare with or nullptr for any match
+ * @return the previous matching sibling node of type Element, or nullptr
*/
- static xercesc::DOMElement* getPreviousSiblingElement(const xercesc::DOMNode* n, const XMLCh* localName=NULL);
+ static xercesc::DOMElement* getPreviousSiblingElement(const xercesc::DOMNode* n, const XMLCh* localName=nullptr);
/**
* Returns the first matching child element of the node if any.
* @param n node to check
* @param ns namespace to compare with
* @param localName local name to compare with
- * @return the first matching child node of type Element, or NULL
+ * @return the first matching child node of type Element, or nullptr
*/
static xercesc::DOMElement* getFirstChildElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName);
* @param n node to check
* @param ns namespace to compare with
* @param localName local name to compare with
- * @return the last matching child node of type Element, or NULL
+ * @return the last matching child node of type Element, or nullptr
*/
static xercesc::DOMElement* getLastChildElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName);
* @param n node to check
* @param ns namespace to compare with
* @param localName local name to compare with
- * @return the next matching sibling node of type Element, or NULL
+ * @return the next matching sibling node of type Element, or nullptr
*/
static xercesc::DOMElement* getNextSiblingElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName);
* @param n node to check
* @param ns namespace to compare with
* @param localName local name to compare with
- * @return the previous matching sibling node of type Element, or NULL
+ * @return the previous matching sibling node of type Element, or nullptr
*/
static xercesc::DOMElement* getPreviousSiblingElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName);
* examples the immediate children of the element.
*
* @param e element to examine
- * @return the content of the first Text node found, or NULL
+ * @return the content of the first Text node found, or nullptr
*/
static const XMLCh* getTextContent(const xercesc::DOMElement* e);
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* @file xmltooling/util/XMLObjectChildrenList.h
*
- * STL-compatible container wrapper
+ * STL-compatible container wrapper.
*/
#ifndef __xmltooling_list_h__
void removeParent(const_reference _Val) {
if (_Val->getParent()!=m_parent)
throw XMLObjectException("Child object not owned by this parent.");
- _Val->setParent(NULL);
+ _Val->setParent(nullptr);
m_parent->releaseParentDOM(true);
}
void removeParent(const_reference _Val) {
if (_Val.first->getParent()!=m_parent || (_Val.second && _Val.second->getParent()!=m_parent))
throw XMLObjectException("One of the child objects not owned by this parent.");
- _Val.first->setParent(NULL);
+ _Val.first->setParent(nullptr);
if (_Val.second)
- _Val.second->setParent(NULL);
+ _Val.second->setParent(nullptr);
m_parent->releaseParentDOM(true);
}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{06B55A46-D3B3-41AE-B5A5-B57830BA010E}</ProjectGuid>\r
+ <RootNamespace>xmltooling-lite</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ <WholeProgramOptimization>true</WholeProgramOptimization>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ <WholeProgramOptimization>true</WholeProgramOptimization>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)-$(Configuration)\</IntDir>\r
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>\r
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(ProjectName)-$(Configuration)\</IntDir>\r
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)-$(Configuration)\</IntDir>\r
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>\r
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(ProjectName)-$(Configuration)\</IntDir>\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)1_4</TargetName>\r
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectName)1_4</TargetName>\r
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)1_4D</TargetName>\r
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)1_4D</TargetName>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+ <ClCompile>\r
+ <Optimization>Disabled</Optimization>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <MinimalRebuild>true</MinimalRebuild>\r
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <PrecompiledHeaderFile>\r
+ </PrecompiledHeaderFile>\r
+ <BrowseInformation>true</BrowseInformation>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+ </ClCompile>\r
+ <ResourceCompile>\r
+ <PreprocessorDefinitions>_DEBUG;XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ResourceCompile>\r
+ <Link>\r
+ <AdditionalDependencies>wsock32.lib;log4shib1D.lib;xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Windows</SubSystem>\r
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ <ImportLibrary>$(TargetDir)$(ProjectName)1D.lib</ImportLibrary>\r
+ <TargetMachine>MachineX86</TargetMachine>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+ <Midl>\r
+ <TargetEnvironment>X64</TargetEnvironment>\r
+ </Midl>\r
+ <ClCompile>\r
+ <Optimization>Disabled</Optimization>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <MinimalRebuild>true</MinimalRebuild>\r
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <PrecompiledHeaderFile>\r
+ </PrecompiledHeaderFile>\r
+ <BrowseInformation>true</BrowseInformation>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ </ClCompile>\r
+ <ResourceCompile>\r
+ <PreprocessorDefinitions>_DEBUG;XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ResourceCompile>\r
+ <Link>\r
+ <AdditionalDependencies>wsock32.lib;log4shib1D.lib;xerces-c_3D.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Windows</SubSystem>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ <ImportLibrary>$(TargetDir)$(ProjectName)1D.lib</ImportLibrary>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+ <PrecompiledHeaderFile>\r
+ </PrecompiledHeaderFile>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ </ClCompile>\r
+ <ResourceCompile>\r
+ <PreprocessorDefinitions>XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ResourceCompile>\r
+ <Link>\r
+ <AdditionalDependencies>wsock32.lib;log4shib1.lib;xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Windows</SubSystem>\r
+ <OptimizeReferences>true</OptimizeReferences>\r
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ <ImportLibrary>$(TargetDir)$(ProjectName)1.lib</ImportLibrary>\r
+ <TargetMachine>MachineX86</TargetMachine>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+ <Midl>\r
+ <TargetEnvironment>X64</TargetEnvironment>\r
+ </Midl>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+ <PrecompiledHeaderFile>\r
+ </PrecompiledHeaderFile>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ </ClCompile>\r
+ <ResourceCompile>\r
+ <PreprocessorDefinitions>XMLTOOLING_LITE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ResourceCompile>\r
+ <Link>\r
+ <AdditionalDependencies>wsock32.lib;log4shib1.lib;xerces-c_3.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Windows</SubSystem>\r
+ <OptimizeReferences>true</OptimizeReferences>\r
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ <ImportLibrary>$(TargetDir)$(ProjectName)1.lib</ImportLibrary>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="AbstractAttributeExtensibleXMLObject.cpp" />\r
+ <ClCompile Include="AbstractComplexElement.cpp" />\r
+ <ClCompile Include="AbstractDOMCachingXMLObject.cpp" />\r
+ <ClCompile Include="AbstractSimpleElement.cpp" />\r
+ <ClCompile Include="AbstractXMLObject.cpp" />\r
+ <ClCompile Include="exceptions.cpp" />\r
+ <ClCompile Include="Lockable.cpp" />\r
+ <ClCompile Include="Namespace.cpp" />\r
+ <ClCompile Include="QName.cpp" />\r
+ <ClCompile Include="unicode.cpp" />\r
+ <ClCompile Include="XMLObjectBuilder.cpp" />\r
+ <ClCompile Include="XMLToolingConfig.cpp" />\r
+ <ClCompile Include="util\DateTime.cpp" />\r
+ <ClCompile Include="util\NDC.cpp" />\r
+ <ClCompile Include="util\ParserPool.cpp" />\r
+ <ClCompile Include="util\PathResolver.cpp" />\r
+ <ClCompile Include="util\ReloadableXMLFile.cpp" />\r
+ <ClCompile Include="util\TemplateEngine.cpp" />\r
+ <ClCompile Include="util\URLEncoder.cpp" />\r
+ <ClCompile Include="util\Win32Threads.cpp" />\r
+ <ClCompile Include="util\XMLConstants.cpp" />\r
+ <ClCompile Include="util\XMLHelper.cpp" />\r
+ <ClCompile Include="io\AbstractXMLObjectMarshaller.cpp" />\r
+ <ClCompile Include="io\AbstractXMLObjectUnmarshaller.cpp" />\r
+ <ClCompile Include="io\HTTPRequest.cpp" />\r
+ <ClCompile Include="io\HTTPResponse.cpp" />\r
+ <ClCompile Include="impl\AnyElement.cpp" />\r
+ <ClCompile Include="impl\UnknownElement.cpp" />\r
+ <ClCompile Include="validation\ValidatorSuite.cpp" />\r
+ <ClCompile Include="soap\impl\SOAPClient.cpp" />\r
+ <ClCompile Include="soap\impl\SOAPImpl.cpp" />\r
+ <ClCompile Include="soap\impl\SOAPSchemaValidators.cpp" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="AbstractAttributeExtensibleXMLObject.h" />\r
+ <ClInclude Include="AbstractComplexElement.h" />\r
+ <ClInclude Include="AbstractDOMCachingXMLObject.h" />\r
+ <ClInclude Include="AbstractSimpleElement.h" />\r
+ <ClInclude Include="AbstractXMLObject.h" />\r
+ <ClInclude Include="AttributeExtensibleXMLObject.h" />\r
+ <ClInclude Include="base.h" />\r
+ <ClInclude Include="ConcreteXMLObjectBuilder.h" />\r
+ <ClInclude Include="config_pub_win32.h" />\r
+ <ClInclude Include="ElementExtensibleXMLObject.h" />\r
+ <ClInclude Include="ElementProxy.h" />\r
+ <ClInclude Include="exceptions.h" />\r
+ <ClInclude Include="internal.h" />\r
+ <ClInclude Include="Lockable.h" />\r
+ <ClInclude Include="logging.h" />\r
+ <ClInclude Include="Namespace.h" />\r
+ <ClInclude Include="PluginManager.h" />\r
+ <ClInclude Include="QName.h" />\r
+ <ClInclude Include="unicode.h" />\r
+ <ClInclude Include="version.h" />\r
+ <ClInclude Include="XMLObject.h" />\r
+ <ClInclude Include="XMLObjectBuilder.h" />\r
+ <ClInclude Include="XMLToolingConfig.h" />\r
+ <ClInclude Include="util\DateTime.h" />\r
+ <ClInclude Include="util\NDC.h" />\r
+ <ClInclude Include="util\ParserPool.h" />\r
+ <ClInclude Include="util\PathResolver.h" />\r
+ <ClInclude Include="util\Predicates.h" />\r
+ <ClInclude Include="util\ReloadableXMLFile.h" />\r
+ <ClInclude Include="util\TemplateEngine.h" />\r
+ <ClInclude Include="util\Threads.h" />\r
+ <ClInclude Include="util\URLEncoder.h" />\r
+ <ClInclude Include="util\XMLConstants.h" />\r
+ <ClInclude Include="util\XMLHelper.h" />\r
+ <ClInclude Include="util\XMLObjectChildrenList.h" />\r
+ <ClInclude Include="io\AbstractXMLObjectMarshaller.h" />\r
+ <ClInclude Include="io\AbstractXMLObjectUnmarshaller.h" />\r
+ <ClInclude Include="impl\AnyElement.h" />\r
+ <ClInclude Include="impl\UnknownElement.h" />\r
+ <ClInclude Include="validation\Validator.h" />\r
+ <ClInclude Include="validation\ValidatorSuite.h" />\r
+ <ClInclude Include="soap\HTTPSOAPTransport.h" />\r
+ <ClInclude Include="soap\SOAP.h" />\r
+ <ClInclude Include="soap\SOAPClient.h" />\r
+ <ClInclude Include="soap\SOAPTransport.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="xmltooling.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="config_pub.h.in" />\r
+ <None Include="Makefile.am" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{06B55A46-D3B3-41AE-B5A5-B57830BA010D}</ProjectGuid>\r
+ <RootNamespace>xmltooling</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ <WholeProgramOptimization>true</WholeProgramOptimization>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ <WholeProgramOptimization>true</WholeProgramOptimization>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+ <ConfigurationType>DynamicLibrary</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>\r
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>\r
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>\r
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>\r
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)1_4D</TargetName>\r
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectName)1_4D</TargetName>\r
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)1_4</TargetName>\r
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectName)1_4</TargetName>\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+ <ClCompile>\r
+ <Optimization>Disabled</Optimization>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <MinimalRebuild>true</MinimalRebuild>\r
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+ <PrecompiledHeaderFile>\r
+ </PrecompiledHeaderFile>\r
+ <BrowseInformation>true</BrowseInformation>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ </ClCompile>\r
+ <ResourceCompile>\r
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ResourceCompile>\r
+ <Link>\r
+ <AdditionalDependencies>wsock32.lib;log4shib1D.lib;xerces-c_3D.lib;xsec_1D.lib;libeay32D.lib;ssleay32D.lib;libcurld_imp.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Windows</SubSystem>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ <ImportLibrary>$(TargetDir)$(ProjectName)1D.lib</ImportLibrary>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+ <Midl>\r
+ <TargetEnvironment>X64</TargetEnvironment>\r
+ </Midl>\r
+ <ClCompile>\r
+ <Optimization>Disabled</Optimization>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <MinimalRebuild>true</MinimalRebuild>\r
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+ <PrecompiledHeaderFile>\r
+ </PrecompiledHeaderFile>\r
+ <BrowseInformation>true</BrowseInformation>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ </ClCompile>\r
+ <ResourceCompile>\r
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ </ResourceCompile>\r
+ <Link>\r
+ <AdditionalDependencies>wsock32.lib;log4shib1D.lib;xerces-c_3D.lib;xsec_1D.lib;libeay32D.lib;ssleay32D.lib;libcurld_imp.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Windows</SubSystem>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ <ImportLibrary>$(TargetDir)$(ProjectName)1D.lib</ImportLibrary>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PrecompiledHeaderFile>\r
+ </PrecompiledHeaderFile>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>wsock32.lib;log4shib1.lib;xerces-c_3.lib;xsec_1.lib;libeay32.lib;ssleay32.lib;libcurl_imp.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Windows</SubSystem>\r
+ <OptimizeReferences>true</OptimizeReferences>\r
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ <ImportLibrary>$(TargetDir)$(ProjectName)1.lib</ImportLibrary>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+ <Midl>\r
+ <TargetEnvironment>X64</TargetEnvironment>\r
+ </Midl>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <PrecompiledHeaderFile>\r
+ </PrecompiledHeaderFile>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>wsock32.lib;log4shib1.lib;xerces-c_3.lib;xsec_1.lib;libeay32.lib;ssleay32.lib;libcurl_imp.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Windows</SubSystem>\r
+ <OptimizeReferences>true</OptimizeReferences>\r
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ <ImportLibrary>$(TargetDir)$(ProjectName)1.lib</ImportLibrary>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="AbstractAttributeExtensibleXMLObject.cpp" />\r
+ <ClCompile Include="AbstractComplexElement.cpp" />\r
+ <ClCompile Include="AbstractDOMCachingXMLObject.cpp" />\r
+ <ClCompile Include="AbstractSimpleElement.cpp" />\r
+ <ClCompile Include="AbstractXMLObject.cpp" />\r
+ <ClCompile Include="exceptions.cpp" />\r
+ <ClCompile Include="Lockable.cpp" />\r
+ <ClCompile Include="Namespace.cpp" />\r
+ <ClCompile Include="QName.cpp" />\r
+ <ClCompile Include="unicode.cpp" />\r
+ <ClCompile Include="XMLObjectBuilder.cpp" />\r
+ <ClCompile Include="XMLToolingConfig.cpp" />\r
+ <ClCompile Include="util\CurlURLInputStream.cpp" />\r
+ <ClCompile Include="util\DateTime.cpp" />\r
+ <ClCompile Include="util\NDC.cpp" />\r
+ <ClCompile Include="util\ParserPool.cpp" />\r
+ <ClCompile Include="util\PathResolver.cpp" />\r
+ <ClCompile Include="util\ReloadableXMLFile.cpp" />\r
+ <ClCompile Include="util\ReplayCache.cpp" />\r
+ <ClCompile Include="util\StorageService.cpp" />\r
+ <ClCompile Include="util\TemplateEngine.cpp" />\r
+ <ClCompile Include="util\URLEncoder.cpp" />\r
+ <ClCompile Include="util\Win32Threads.cpp" />\r
+ <ClCompile Include="util\XMLConstants.cpp" />\r
+ <ClCompile Include="util\XMLHelper.cpp" />\r
+ <ClCompile Include="io\AbstractXMLObjectMarshaller.cpp" />\r
+ <ClCompile Include="io\AbstractXMLObjectUnmarshaller.cpp" />\r
+ <ClCompile Include="io\HTTPRequest.cpp" />\r
+ <ClCompile Include="io\HTTPResponse.cpp" />\r
+ <ClCompile Include="impl\AnyElement.cpp" />\r
+ <ClCompile Include="impl\MemoryStorageService.cpp" />\r
+ <ClCompile Include="impl\UnknownElement.cpp" />\r
+ <ClCompile Include="validation\ValidatorSuite.cpp" />\r
+ <ClCompile Include="signature\impl\KeyInfoImpl.cpp" />\r
+ <ClCompile Include="signature\impl\KeyInfoSchemaValidators.cpp" />\r
+ <ClCompile Include="signature\impl\SignatureValidator.cpp" />\r
+ <ClCompile Include="signature\impl\XMLSecSignatureImpl.cpp" />\r
+ <ClCompile Include="encryption\impl\Decrypter.cpp" />\r
+ <ClCompile Include="encryption\impl\EncryptedKeyResolver.cpp" />\r
+ <ClCompile Include="encryption\impl\Encrypter.cpp" />\r
+ <ClCompile Include="encryption\impl\EncryptionImpl.cpp" />\r
+ <ClCompile Include="encryption\impl\EncryptionSchemaValidators.cpp" />\r
+ <ClCompile Include="security\impl\AbstractPKIXTrustEngine.cpp" />\r
+ <ClCompile Include="security\impl\BasicX509Credential.cpp" />\r
+ <ClCompile Include="security\impl\ChainingCredentialResolver.cpp" />\r
+ <ClCompile Include="security\impl\ChainingTrustEngine.cpp" />\r
+ <ClCompile Include="security\impl\CredentialCriteria.cpp" />\r
+ <ClCompile Include="security\impl\CredentialResolver.cpp" />\r
+ <ClCompile Include="security\impl\ExplicitKeyTrustEngine.cpp" />\r
+ <ClCompile Include="security\impl\FilesystemCredentialResolver.cpp" />\r
+ <ClCompile Include="security\impl\InlineKeyResolver.cpp" />\r
+ <ClCompile Include="security\impl\KeyInfoResolver.cpp" />\r
+ <ClCompile Include="security\impl\OpenSSLCryptoX509CRL.cpp" />\r
+ <ClCompile Include="security\impl\SecurityHelper.cpp" />\r
+ <ClCompile Include="security\impl\StaticPKIXTrustEngine.cpp" />\r
+ <ClCompile Include="security\impl\TrustEngine.cpp" />\r
+ <ClCompile Include="security\impl\XSECCryptoX509CRL.cpp" />\r
+ <ClCompile Include="soap\impl\CURLSOAPTransport.cpp" />\r
+ <ClCompile Include="soap\impl\SOAPClient.cpp" />\r
+ <ClCompile Include="soap\impl\SOAPImpl.cpp" />\r
+ <ClCompile Include="soap\impl\SOAPSchemaValidators.cpp" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ClInclude Include="AbstractAttributeExtensibleXMLObject.h" />\r
+ <ClInclude Include="AbstractComplexElement.h" />\r
+ <ClInclude Include="AbstractDOMCachingXMLObject.h" />\r
+ <ClInclude Include="AbstractSimpleElement.h" />\r
+ <ClInclude Include="AbstractXMLObject.h" />\r
+ <ClInclude Include="AttributeExtensibleXMLObject.h" />\r
+ <ClInclude Include="base.h" />\r
+ <ClInclude Include="ConcreteXMLObjectBuilder.h" />\r
+ <ClInclude Include="config_pub_win32.h" />\r
+ <ClInclude Include="ElementExtensibleXMLObject.h" />\r
+ <ClInclude Include="ElementProxy.h" />\r
+ <ClInclude Include="exceptions.h" />\r
+ <ClInclude Include="internal.h" />\r
+ <ClInclude Include="Lockable.h" />\r
+ <ClInclude Include="logging.h" />\r
+ <ClInclude Include="Namespace.h" />\r
+ <ClInclude Include="PluginManager.h" />\r
+ <ClInclude Include="QName.h" />\r
+ <ClInclude Include="unicode.h" />\r
+ <ClInclude Include="version.h" />\r
+ <ClInclude Include="XMLObject.h" />\r
+ <ClInclude Include="XMLObjectBuilder.h" />\r
+ <ClInclude Include="XMLToolingConfig.h" />\r
+ <ClInclude Include="util\CurlURLInputStream.h" />\r
+ <ClInclude Include="util\DateTime.h" />\r
+ <ClInclude Include="util\NDC.h" />\r
+ <ClInclude Include="util\ParserPool.h" />\r
+ <ClInclude Include="util\PathResolver.h" />\r
+ <ClInclude Include="util\Predicates.h" />\r
+ <ClInclude Include="util\ReloadableXMLFile.h" />\r
+ <ClInclude Include="util\ReplayCache.h" />\r
+ <ClInclude Include="util\StorageService.h" />\r
+ <ClInclude Include="util\TemplateEngine.h" />\r
+ <ClInclude Include="util\Threads.h" />\r
+ <ClInclude Include="util\URLEncoder.h" />\r
+ <ClInclude Include="util\XMLConstants.h" />\r
+ <ClInclude Include="util\XMLHelper.h" />\r
+ <ClInclude Include="util\XMLObjectChildrenList.h" />\r
+ <ClInclude Include="io\AbstractXMLObjectMarshaller.h" />\r
+ <ClInclude Include="io\AbstractXMLObjectUnmarshaller.h" />\r
+ <ClInclude Include="io\GenericRequest.h" />\r
+ <ClInclude Include="io\GenericResponse.h" />\r
+ <ClInclude Include="io\HTTPRequest.h" />\r
+ <ClInclude Include="io\HTTPResponse.h" />\r
+ <ClInclude Include="impl\AnyElement.h" />\r
+ <ClInclude Include="impl\UnknownElement.h" />\r
+ <ClInclude Include="validation\Validator.h" />\r
+ <ClInclude Include="validation\ValidatorSuite.h" />\r
+ <ClInclude Include="signature\ContentReference.h" />\r
+ <ClInclude Include="signature\KeyInfo.h" />\r
+ <ClInclude Include="signature\Signature.h" />\r
+ <ClInclude Include="signature\SignatureValidator.h" />\r
+ <ClInclude Include="encryption\Decrypter.h" />\r
+ <ClInclude Include="encryption\EncryptedKeyResolver.h" />\r
+ <ClInclude Include="encryption\Encrypter.h" />\r
+ <ClInclude Include="encryption\Encryption.h" />\r
+ <ClInclude Include="security\AbstractPKIXTrustEngine.h" />\r
+ <ClInclude Include="security\BasicX509Credential.h" />\r
+ <ClInclude Include="security\ChainingTrustEngine.h" />\r
+ <ClInclude Include="security\Credential.h" />\r
+ <ClInclude Include="security\CredentialContext.h" />\r
+ <ClInclude Include="security\CredentialCriteria.h" />\r
+ <ClInclude Include="security\CredentialResolver.h" />\r
+ <ClInclude Include="security\KeyInfoCredentialContext.h" />\r
+ <ClInclude Include="security\KeyInfoResolver.h" />\r
+ <ClInclude Include="security\OpenSSLCredential.h" />\r
+ <ClInclude Include="security\OpenSSLCryptoX509CRL.h" />\r
+ <ClInclude Include="security\OpenSSLTrustEngine.h" />\r
+ <ClInclude Include="security\SecurityHelper.h" />\r
+ <ClInclude Include="security\SignatureTrustEngine.h" />\r
+ <ClInclude Include="security\TrustEngine.h" />\r
+ <ClInclude Include="security\X509Credential.h" />\r
+ <ClInclude Include="security\X509TrustEngine.h" />\r
+ <ClInclude Include="security\XSECCryptoX509CRL.h" />\r
+ <ClInclude Include="soap\HTTPSOAPTransport.h" />\r
+ <ClInclude Include="soap\OpenSSLSOAPTransport.h" />\r
+ <ClInclude Include="soap\SOAP.h" />\r
+ <ClInclude Include="soap\SOAPClient.h" />\r
+ <ClInclude Include="soap\SOAPTransport.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ResourceCompile Include="xmltooling.rc" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="config_pub.h.in" />\r
+ <None Include="Makefile.am" />\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>
\ No newline at end of file
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
string path=data_path + "ComplexXMLObject.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
XercesJanitor<DOMDocument> janitor(doc);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<ElementProxy> wcObject(
dynamic_cast<ElementProxy*>(b->buildFromDocument(doc, false))
);
- TS_ASSERT(wcObject.get()!=NULL);
+ TS_ASSERT(wcObject.get()!=nullptr);
VectorOf(XMLObject) kids=wcObject->getUnknownXMLObjects();
TSM_ASSERT_EQUALS("Number of child elements was not expected value", 2, kids.size());
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
CredentialResolver* m_resolver;
public:
void setUp() {
- m_resolver=NULL;
+ m_resolver=nullptr;
string config = data_path + "FilesystemCredentialResolver.xml";
ifstream in(config.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in);
string path=data_path + "ComplexXMLObject.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
try {
CredentialCriteria cc;
cc.setUsage(Credential::ENCRYPTION_CREDENTIAL);
Locker locker(m_resolver);
const Credential* cred=m_resolver->resolve(&cc);
- TSM_ASSERT("Retrieved credential was null", cred!=NULL);
+ TSM_ASSERT("Retrieved credential was null", cred!=nullptr);
Encrypter encrypter;
Encrypter::EncryptionParams ep;
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Locker locker(credResolver.get());
const X509Credential* cred=dynamic_cast<const X509Credential*>(credResolver->resolve());
- TSM_ASSERT("Retrieved credential was null", cred!=NULL);
- TSM_ASSERT("Retrieved key was null", cred->getPrivateKey()!=NULL);
+ TSM_ASSERT("Retrieved credential was null", cred!=nullptr);
+ TSM_ASSERT("Retrieved key was null", cred->getPrivateKey()!=nullptr);
TSM_ASSERT_EQUALS("Unexpected number of certificates", 1, cred->getEntityCertificateChain().size());
TSM_ASSERT_EQUALS("Custom key name not found", 1, cred->getKeyNames().count("Sample Key"));
}
class InlineKeyResolverTest : public CxxTest::TestSuite {
KeyInfoResolver* m_resolver;
public:
- InlineKeyResolverTest() : m_resolver(NULL) {}
+ InlineKeyResolverTest() : m_resolver(nullptr) {}
void setUp() {
string config = data_path + "InlineKeyResolver.xml";
void tearDown() {
delete m_resolver;
- m_resolver=NULL;
+ m_resolver=nullptr;
}
void testResolver() {
string path=data_path + "KeyInfo1.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<KeyInfo> kiObject(dynamic_cast<KeyInfo*>(b->buildFromDocument(doc)));
- TS_ASSERT(kiObject.get()!=NULL);
+ TS_ASSERT(kiObject.get()!=nullptr);
auto_ptr<X509Credential> cred(dynamic_cast<X509Credential*>(m_resolver->resolve(kiObject.get())));
- TSM_ASSERT("Unable to resolve KeyInfo into Credential.", cred.get()!=NULL);
+ TSM_ASSERT("Unable to resolve KeyInfo into Credential.", cred.get()!=nullptr);
- TSM_ASSERT("Unable to resolve public key.", cred->getPublicKey()!=NULL);
+ TSM_ASSERT("Unable to resolve public key.", cred->getPublicKey()!=nullptr);
TSM_ASSERT_EQUALS("Unexpected key type.", cred->getPublicKey()->getKeyType(), XSECCryptoKey::KEY_RSA_PUBLIC);
TSM_ASSERT_EQUALS("Wrong certificate count.", cred->getEntityCertificateChain().size(), 1);
TSM_ASSERT_EQUALS("Wrong CRL count.", cred->getCRLs().size(), 3);
string path=data_path + "KeyInfo1.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<KeyInfo> kiObject(dynamic_cast<KeyInfo*>(b->buildFromDocument(doc)));
- TS_ASSERT(kiObject.get()!=NULL);
+ TS_ASSERT(kiObject.get()!=nullptr);
TSM_ASSERT_EQUALS("Number of child elements was not expected value",
4, kiObject->getOrderedChildren().size());
TSM_ASSERT_EQUALS("Number of child elements was not expected value",
string path=data_path + "KeyInfo2.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<KeyInfo> kiObject(dynamic_cast<KeyInfo*>(b->buildFromDocument(doc)));
- TS_ASSERT(kiObject.get()!=NULL);
+ TS_ASSERT(kiObject.get()!=nullptr);
TSM_ASSERT_EQUALS("Number of child elements was not expected value",
2, kiObject->getOrderedChildren().size());
TSM_ASSERT_EQUALS("Number of child elements was not expected value",
string path=data_path + "KeyInfo3.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<KeyInfo> kiObject(dynamic_cast<KeyInfo*>(b->buildFromDocument(doc)));
- TS_ASSERT(kiObject.get()!=NULL);
+ TS_ASSERT(kiObject.get()!=nullptr);
TS_ASSERT_THROWS(SchemaValidators.validate(kiObject.get()),ValidationException);
}
};
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
void testMarshallingWithAttributes() {
auto_ptr<SimpleXMLObject> sxObject(SimpleXMLObjectBuilder::buildSimpleXMLObject());
- TS_ASSERT(sxObject.get()!=NULL);
+ TS_ASSERT(sxObject.get()!=nullptr);
auto_ptr_XMLCh expected("Firefly");
sxObject->setId(expected.get());
string path=data_path + "SimpleXMLObjectWithAttribute.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
TS_ASSERT(rootElement->isEqualNode(doc->getDocumentElement()));
doc->release();
void testMarshallingWithElementContent() {
auto_ptr<SimpleXMLObject> sxObject(SimpleXMLObjectBuilder::buildSimpleXMLObject());
- TS_ASSERT(sxObject.get()!=NULL);
+ TS_ASSERT(sxObject.get()!=nullptr);
auto_ptr_XMLCh expected("Sample Content");
sxObject->setValue(expected.get());
string path=data_path + "SimpleXMLObjectWithContent.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
TS_ASSERT(rootElement->isEqualNode(doc->getDocumentElement()));
doc->release();
void testMarshallingWithChildElements() {
xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME);
const SimpleXMLObjectBuilder* b=dynamic_cast<const SimpleXMLObjectBuilder*>(XMLObjectBuilder::getBuilder(qname));
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<SimpleXMLObject> sxObject(dynamic_cast<SimpleXMLObject*>(b->buildObject()));
- TS_ASSERT(sxObject.get()!=NULL);
+ TS_ASSERT(sxObject.get()!=nullptr);
VectorOf(SimpleXMLObject) kids=sxObject->getSimpleXMLObjects();
kids.push_back(dynamic_cast<SimpleXMLObject*>(b->buildObject()));
kids.push_back(dynamic_cast<SimpleXMLObject*>(b->buildObject()));
string path=data_path + "SimpleXMLObjectWithChildren.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
TS_ASSERT(rootElement->isEqualNode(doc->getDocumentElement()));
doc->release();
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
void testMemoryService() {
auto_ptr<StorageService> storage(
- XMLToolingConfig::getConfig().StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE,NULL)
+ XMLToolingConfig::getConfig().StorageServiceManager.newPlugin(MEMORY_STORAGE_SERVICE,nullptr)
);
string data;
TSM_ASSERT_EQUALS("Record found in storage.", 0, storage->readString("context", "foo1", &data));
- storage->createString("context", "foo1", "bar1", time(NULL) + 60);
- storage->createString("context", "foo2", "bar2", time(NULL) + 60);
+ storage->createString("context", "foo1", "bar1", time(nullptr) + 60);
+ storage->createString("context", "foo2", "bar2", time(nullptr) + 60);
TSM_ASSERT_EQUALS("Record not found in storage.", 1, storage->readString("context", "foo1", &data));
TSM_ASSERT_EQUALS("Record value doesn't match.", data, "bar1");
TSM_ASSERT_EQUALS("Update failed.", 2, storage->updateString("context", "foo2", "bar1", 0, 1));
- TSM_ASSERT_EQUALS("Record not found in storage.", 2, storage->readString("context", "foo2", &data, NULL, 1));
+ TSM_ASSERT_EQUALS("Record not found in storage.", 2, storage->readString("context", "foo2", &data, nullptr, 1));
TSM_ASSERT_EQUALS("Record value doesn't match.", data, "bar1");
TSM_ASSERT("Delete failed.", storage->deleteString("context", "foo2"));
storage->reap("context");
void testNamespacesAfterBuilding() {
xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME,SimpleXMLObject::NAMESPACE_PREFIX);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(qtype);
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<SimpleXMLObject> sxObject(
- dynamic_cast<SimpleXMLObject*>(b->buildObject(SimpleXMLObject::NAMESPACE, SimpleXMLObject::LOCAL_NAME, NULL, &qtype))
+ dynamic_cast<SimpleXMLObject*>(b->buildObject(SimpleXMLObject::NAMESPACE, SimpleXMLObject::LOCAL_NAME, nullptr, &qtype))
);
- TS_ASSERT(sxObject.get()!=NULL);
+ TS_ASSERT(sxObject.get()!=nullptr);
static_cast<AttributeExtensibleXMLObject*>(sxObject.get())->setAttribute(
- xmltooling::QName(NULL, "attr1"), xmltooling::QName("http://www.example.org/testObjects/ext", "Value1", "test2")
+ xmltooling::QName(nullptr, "attr1"), xmltooling::QName("http://www.example.org/testObjects/ext", "Value1", "test2")
);
static const XMLCh TEST2_PREFIX[] = { chLatin_t, chLatin_e, chLatin_s, chLatin_t, chDigit_2, chNull };
string path=data_path + "SimpleXMLObjectWithNonVisible.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<SimpleXMLObject> sxObject(
dynamic_cast<SimpleXMLObject*>(b->buildFromDocument(doc))
);
- TS_ASSERT(sxObject.get()!=NULL);
+ TS_ASSERT(sxObject.get()!=nullptr);
const set<Namespace>& namespaces = sxObject->getNamespaces();
bool cond1=false, cond2=false, cond3=false;
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
pathname = data_path + "key.der";
auto_ptr<XSECCryptoKey> key2(SecurityHelper::loadKeyFromFile(pathname.c_str()));
pathname = data_path + "test.pfx";
- auto_ptr<XSECCryptoKey> key3(SecurityHelper::loadKeyFromFile(pathname.c_str(), NULL, "password"));
+ auto_ptr<XSECCryptoKey> key3(SecurityHelper::loadKeyFromFile(pathname.c_str(), nullptr, "password"));
TSM_ASSERT("PEM/DER keys did not match", SecurityHelper::matches(*key1.get(), *key2.get()));
TSM_ASSERT("DER/PKCS12 keys did not match", SecurityHelper::matches(*key2.get(), *key3.get()));
auto_ptr<XSECCryptoKey> key2(SecurityHelper::loadKeyFromURL(*t2.get(), pathname.c_str()));
pathname = data_path + "test.pfx.bak";
auto_ptr<SOAPTransport> t3(getTransport("https://spaces.internet2.edu/download/attachments/5305/test.pfx"));
- auto_ptr<XSECCryptoKey> key3(SecurityHelper::loadKeyFromURL(*t3.get(), pathname.c_str(), NULL, "password"));
+ auto_ptr<XSECCryptoKey> key3(SecurityHelper::loadKeyFromURL(*t3.get(), pathname.c_str(), nullptr, "password"));
TSM_ASSERT("PEM/DER keys did not match", SecurityHelper::matches(*key1.get(), *key2.get()));
TSM_ASSERT("DER/PKCS12 keys did not match", SecurityHelper::matches(*key2.get(), *key3.get()));
pathname = data_path + "cert.der";
SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str());
pathname = data_path + "test.pfx";
- SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str(), NULL, "password");
+ SecurityHelper::loadCertificatesFromFile(certs, pathname.c_str(), nullptr, "password");
TSM_ASSERT_EQUALS("Wrong certificate count", certs.size(), 3);
SecurityHelper::loadCertificatesFromURL(certs, *t2.get(), pathname.c_str());
pathname = data_path + "test.pfx.bak";
auto_ptr<SOAPTransport> t3(getTransport("https://spaces.internet2.edu/download/attachments/5305/test.pfx"));
- SecurityHelper::loadCertificatesFromURL(certs, *t3.get(), pathname.c_str(), NULL, "password");
+ SecurityHelper::loadCertificatesFromURL(certs, *t3.get(), pathname.c_str(), nullptr, "password");
TSM_ASSERT_EQUALS("Wrong certificate count", certs.size(), 3);
/*
- * Copyright 2001-2009 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
CredentialResolver* m_resolver;
public:
void setUp() {
- m_resolver=NULL;
+ m_resolver=nullptr;
xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME);
xmltooling::QName qtype(SimpleXMLObject::NAMESPACE,SimpleXMLObject::TYPE_NAME);
XMLObjectBuilder::registerBuilder(qname, new SimpleXMLObjectBuilder());
void testSignature() {
xmltooling::QName qname(SimpleXMLObject::NAMESPACE,SimpleXMLObject::LOCAL_NAME);
const SimpleXMLObjectBuilder* b=dynamic_cast<const SimpleXMLObjectBuilder*>(XMLObjectBuilder::getBuilder(qname));
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<SimpleXMLObject> sxObject(dynamic_cast<SimpleXMLObject*>(b->buildObject()));
- TS_ASSERT(sxObject.get()!=NULL);
+ TS_ASSERT(sxObject.get()!=nullptr);
VectorOf(SimpleXMLObject) kids=sxObject->getSimpleXMLObjects();
kids.push_back(dynamic_cast<SimpleXMLObject*>(b->buildObject()));
kids.push_back(dynamic_cast<SimpleXMLObject*>(b->buildObject()));
cc.setUsage(Credential::SIGNING_CREDENTIAL);
Locker locker(m_resolver);
const Credential* cred = m_resolver->resolve(&cc);
- TSM_ASSERT("Retrieved credential was null", cred!=NULL);
+ TSM_ASSERT("Retrieved credential was null", cred!=nullptr);
- DOMElement* rootElement = NULL;
+ DOMElement* rootElement = nullptr;
try {
vector<Signature*> sigs(1,sig);
- rootElement=sxObject->marshall((DOMDocument*)NULL,&sigs,cred);
+ rootElement=sxObject->marshall((DOMDocument*)nullptr,&sigs,cred);
}
catch (XMLToolingException& e) {
TS_TRACE(e.what());
istringstream in(buf);
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in);
auto_ptr<SimpleXMLObject> sxObject2(dynamic_cast<SimpleXMLObject*>(b->buildFromDocument(doc)));
- TS_ASSERT(sxObject2.get()!=NULL);
- TS_ASSERT(sxObject2->getSignature()!=NULL);
+ TS_ASSERT(sxObject2.get()!=nullptr);
+ TS_ASSERT(sxObject2->getSignature()!=nullptr);
try {
TestValidator tv(&chNull, cred);
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
string path=data_path + "SimpleXMLObjectWithAttribute.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<SimpleXMLObject> sxObject(
dynamic_cast<SimpleXMLObject*>(b->buildFromDocument(doc))
);
- TS_ASSERT(sxObject.get()!=NULL);
+ TS_ASSERT(sxObject.get()!=nullptr);
auto_ptr_XMLCh expected("Firefly");
TSM_ASSERT("ID was not expected value", XMLString::equals(expected.get(), sxObject->getId()));
string path=data_path + "SimpleXMLObjectWithContent.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<SimpleXMLObject> sxObject(
dynamic_cast<SimpleXMLObject*>(b->buildFromDocument(doc))
);
- TS_ASSERT(sxObject.get()!=NULL);
+ TS_ASSERT(sxObject.get()!=nullptr);
auto_ptr_XMLCh expected("Sample Content");
TSM_ASSERT("Element content was not expected value", XMLString::equals(expected.get(), sxObject->getValue()));
string path=data_path + "SimpleXMLObjectWithChildren.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<SimpleXMLObject> sxObject(
dynamic_cast<SimpleXMLObject*>(b->buildFromDocument(doc))
);
- TS_ASSERT(sxObject.get()!=NULL);
+ TS_ASSERT(sxObject.get()!=nullptr);
VectorOf(SimpleXMLObject) kids=sxObject->getSimpleXMLObjects();
TSM_ASSERT_EQUALS("Number of child elements was not expected value", 3, kids.size());
string path=data_path + "SimpleXMLObjectWithChildren.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<SimpleXMLObject> sxObject(
dynamic_cast<SimpleXMLObject*>(b->buildFromDocument(doc))
);
- TS_ASSERT(sxObject.get()!=NULL);
+ TS_ASSERT(sxObject.get()!=nullptr);
sxObject->releaseThisAndChildrenDOM();
auto_ptr<SimpleXMLObject> clonedObject(dynamic_cast<SimpleXMLObject*>(sxObject->clone()));
string path=data_path + "SimpleXMLObjectWithUnknownChild.xml";
ifstream fs(path.c_str());
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
TS_ASSERT_THROWS(b->buildFromDocument(doc),UnmarshallingException);
doc->release();
: AbstractXMLObject(src), AbstractAttributeExtensibleXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src),
m_id(XMLString::replicate(src.m_id)) {
#ifndef XMLTOOLING_NO_XMLSEC
- m_children.push_back(NULL);
+ m_children.push_back(nullptr);
m_signature=m_children.begin();
#endif
VectorOf(SimpleXMLObject) mine=getSimpleXMLObjects();
static const XMLCh ID_ATTRIB_NAME[];
SimpleXMLObject(
- const XMLCh* nsURI=NULL, const XMLCh* localName=NULL, const XMLCh* prefix=NULL, const xmltooling::QName* schemaType=NULL
- ) : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_id(NULL) {
+ const XMLCh* nsURI=nullptr, const XMLCh* localName=nullptr, const XMLCh* prefix=nullptr, const xmltooling::QName* schemaType=nullptr
+ ) : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_id(nullptr) {
#ifndef XMLTOOLING_NO_XMLSEC
- m_children.push_back(NULL);
+ m_children.push_back(nullptr);
m_signature=m_children.begin();
#endif
}
protected:
void marshallAttributes(xercesc::DOMElement* domElement) const {
if(getId()) {
- domElement->setAttributeNS(NULL, SimpleXMLObject::ID_ATTRIB_NAME, getId());
+ domElement->setAttributeNS(nullptr, SimpleXMLObject::ID_ATTRIB_NAME, getId());
#ifdef XMLTOOLING_XERCESC_BOOLSETIDATTRIBUTE
- domElement->setIdAttributeNS(NULL, SimpleXMLObject::ID_ATTRIB_NAME, true);
+ domElement->setIdAttributeNS(nullptr, SimpleXMLObject::ID_ATTRIB_NAME, true);
#else
- domElement->setIdAttributeNS(NULL, SimpleXMLObject::ID_ATTRIB_NAME);
+ domElement->setIdAttributeNS(nullptr, SimpleXMLObject::ID_ATTRIB_NAME);
#endif
}
marshallExtensionAttributes(domElement);
}
void processAttribute(const xercesc::DOMAttr* attribute) {
- if (XMLHelper::isNodeNamed(attribute, NULL, SimpleXMLObject::ID_ATTRIB_NAME)) {
+ if (XMLHelper::isNodeNamed(attribute, nullptr, SimpleXMLObject::ID_ATTRIB_NAME)) {
setId(attribute->getValue());
return;
}
}
XMLObject* buildObject(
- const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=NULL, const xmltooling::QName* schemaType=NULL
+ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix=nullptr, const xmltooling::QName* schemaType=nullptr
) const {
return new SimpleXMLObject(nsURI, localName, prefix, schemaType);
}
/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
void testUnknown() {
ifstream fs("../xmltoolingtest/data/SimpleXMLObjectWithChildren.xml");
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
string buf1;
XMLHelper::serialize(doc->getDocumentElement(), buf1);
const XMLObjectBuilder* b=XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<XMLObject> xmlObject(b->buildFromDocument(doc)); // bind document
- TS_ASSERT(xmlObject.get()!=NULL);
+ TS_ASSERT(xmlObject.get()!=nullptr);
auto_ptr<XMLObject> clonedObject(xmlObject->clone());
- TS_ASSERT(clonedObject.get()!=NULL);
+ TS_ASSERT(clonedObject.get()!=nullptr);
DOMElement* rootElement=clonedObject->marshall();
- TS_ASSERT(rootElement!=NULL);
+ TS_ASSERT(rootElement!=nullptr);
// should reuse DOM
TS_ASSERT(rootElement==clonedObject->marshall());
void testUnknownWithDocChange() {
ifstream fs("../xmltoolingtest/data/SimpleXMLObjectWithChildren.xml");
DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(fs);
- TS_ASSERT(doc!=NULL);
+ TS_ASSERT(doc!=nullptr);
string buf1;
XMLHelper::serialize(doc->getDocumentElement(), buf1);
const XMLObjectBuilder* b=XMLObjectBuilder::getBuilder(doc->getDocumentElement());
- TS_ASSERT(b!=NULL);
+ TS_ASSERT(b!=nullptr);
auto_ptr<XMLObject> xmlObject(b->buildFromDocument(doc)); // bind document
- TS_ASSERT(xmlObject.get()!=NULL);
+ TS_ASSERT(xmlObject.get()!=nullptr);
DOMDocument* newDoc=XMLToolingConfig::getConfig().getParser().newDocument();
DOMElement* rootElement=xmlObject->marshall(newDoc);
- TS_ASSERT(rootElement!=NULL);
+ TS_ASSERT(rootElement!=nullptr);
string buf2;
XMLHelper::serialize(rootElement, buf2);
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup Label="ProjectConfigurations">\r
+ <ProjectConfiguration Include="Debug|Win32">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Debug|x64">\r
+ <Configuration>Debug</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|Win32">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>Win32</Platform>\r
+ </ProjectConfiguration>\r
+ <ProjectConfiguration Include="Release|x64">\r
+ <Configuration>Release</Configuration>\r
+ <Platform>x64</Platform>\r
+ </ProjectConfiguration>\r
+ </ItemGroup>\r
+ <PropertyGroup Label="Globals">\r
+ <ProjectGuid>{3E34CDCC-FCBA-490D-A165-1CB6F4559799}</ProjectGuid>\r
+ <RootNamespace>xmltoolingtest</RootNamespace>\r
+ <Keyword>Win32Proj</Keyword>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ <WholeProgramOptimization>true</WholeProgramOptimization>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ <WholeProgramOptimization>true</WholeProgramOptimization>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
+ <ConfigurationType>Application</ConfigurationType>\r
+ <CharacterSet>MultiByte</CharacterSet>\r
+ </PropertyGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
+ <ImportGroup Label="ExtensionSettings">\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
+ </ImportGroup>\r
+ <PropertyGroup Label="UserMacros" />\r
+ <PropertyGroup>\r
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>\r
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>\r
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>\r
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>\r
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>\r
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />\r
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>\r
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />\r
+ </PropertyGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
+ <ClCompile>\r
+ <Optimization>Disabled</Optimization>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <MinimalRebuild>true</MinimalRebuild>\r
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <BrowseInformation>true</BrowseInformation>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>xerces-c_3D.lib;xsec_1D.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Console</SubSystem>\r
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ <TargetMachine>MachineX86</TargetMachine>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
+ <Midl>\r
+ <TargetEnvironment>X64</TargetEnvironment>\r
+ </Midl>\r
+ <ClCompile>\r
+ <Optimization>Disabled</Optimization>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <MinimalRebuild>true</MinimalRebuild>\r
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
+ <BrowseInformation>true</BrowseInformation>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>xerces-c_3D.lib;xsec_1D.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Console</SubSystem>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>xerces-c_3.lib;xsec_1.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Console</SubSystem>\r
+ <OptimizeReferences>true</OptimizeReferences>\r
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ <TargetMachine>MachineX86</TargetMachine>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+ <Midl>\r
+ <TargetEnvironment>X64</TargetEnvironment>\r
+ </Midl>\r
+ <ClCompile>\r
+ <AdditionalIncludeDirectories>$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
+ <WarningLevel>Level3</WarningLevel>\r
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
+ </ClCompile>\r
+ <Link>\r
+ <AdditionalDependencies>xerces-c_3.lib;xsec_1.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
+ <GenerateDebugInformation>true</GenerateDebugInformation>\r
+ <SubSystem>Console</SubSystem>\r
+ <OptimizeReferences>true</OptimizeReferences>\r
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
+ <DataExecutionPrevention>\r
+ </DataExecutionPrevention>\r
+ </Link>\r
+ </ItemDefinitionGroup>\r
+ <ItemGroup>\r
+ <ClCompile Include="ComplexXMLObjectTest.cpp" />\r
+ <ClCompile Include="DateTimeTest.cpp" />\r
+ <ClCompile Include="EncryptionTest.cpp" />\r
+ <ClCompile Include="ExceptionTest.cpp" />\r
+ <ClCompile Include="FilesystemCredentialResolverTest.cpp" />\r
+ <ClCompile Include="InlineKeyResolverTest.cpp" />\r
+ <ClCompile Include="KeyInfoTest.cpp" />\r
+ <ClCompile Include="MarshallingTest.cpp" />\r
+ <ClCompile Include="MemoryStorageServiceTest.cpp" />\r
+ <ClCompile Include="NonVisibleNamespaceTest.cpp" />\r
+ <ClCompile Include="SecurityHelperTest.cpp" />\r
+ <ClCompile Include="SignatureTest.cpp" />\r
+ <ClCompile Include="TemplateEngineTest.cpp" />\r
+ <ClCompile Include="UnmarshallingTest.cpp" />\r
+ <ClCompile Include="xmltoolingtest.cpp" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <CustomBuild Include="ComplexXMLObjectTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="DateTimeTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="EncryptionTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="ExceptionTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="FilesystemCredentialResolverTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="InlineKeyResolverTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="KeyInfoTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="MarshallingTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="MemoryStorageServiceTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="NonVisibleNamespaceTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="SecurityHelperTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="SignatureTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="TemplateEngineTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="UnmarshallingTest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <CustomBuild Include="xmltoolingtest.h">\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --error-printer --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --error-printer --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">perl.exe -w \cxxtest\cxxtestgen.pl --error-printer --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">perl.exe -w \cxxtest\cxxtestgen.pl --error-printer --have-eh --have-std --abort-on-fail -o "%(Filename)".cpp "%(FullPath)"\r
+</Command>\r
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
+ </CustomBuild>\r
+ <ClInclude Include="XMLObjectBaseTestCase.h" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="Makefile.am" />\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <ProjectReference Include="..\xmltooling\xmltooling.vcxproj">\r
+ <Project>{06b55a46-d3b3-41ae-b5a5-b57830ba010d}</Project>\r
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
+ </ProjectReference>\r
+ </ItemGroup>\r
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
+ <ImportGroup Label="ExtensionTargets">\r
+ </ImportGroup>\r
+</Project>
\ No newline at end of file