MOSTLYCLEANFILES = $(DX_CLEANFILES)
+DISTCLEANFILES = \
+ @PACKAGE_NAME@.pc \
+ @PACKAGE_NAME@.pc.in \
+ @PACKAGE_NAME@-uninstalled.pc \
+ @PACKAGE_NAME@-uninstalled.sh
+
dist-hook:
rm -rf `find $(distdir)/xmltoolingtest/data -name .svn`
rm -rf `find $(distdir)/doc/api -name .svn`
#define PACKAGE "xmltooling"
/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "https://bugs.internet2.edu/"
+#define PACKAGE_BUGREPORT "https://issues.shibboleth.net/"
/* Define to the full name of this package. */
#define PACKAGE_NAME "xmltooling"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "xmltooling 1.4.1"
+#define PACKAGE_STRING "xmltooling 1.4.2"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "xmltooling"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.4.1"
+#define PACKAGE_VERSION "1.4.2"
/* Define to the necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef TM_IN_SYS_TIME */
/* Version number of package */
-#define VERSION "1.4.1"
+#define VERSION "1.4.2"
/* Define if you wish to disable XML-Security-dependent features. */
/* #undef XMLTOOLING_NO_XMLSEC */
# Process this file with autoreconf
AC_PREREQ([2.50])
-AC_INIT([xmltooling],[1.4.1],[https://bugs.internet2.edu/],[xmltooling])
+AC_INIT([xmltooling],[1.4.2],[https://issues.shibboleth.net/],[xmltooling])
AC_CONFIG_SRCDIR(xmltooling)
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_MACRO_DIR(m4)
pkgdocdir = $(datadir)/doc/@PACKAGE@-@PACKAGE_VERSION@
install-data-hook:
- cp -r api $(DESTDIR)$(pkgdocdir)
- rm -rf `find $(DESTDIR)$(pkgdocdir)/api -name .svn`
+ if test -d api ; then \
+ cp -r api $(DESTDIR)$(pkgdocdir); \
+ rm -rf `find $(DESTDIR)$(pkgdocdir)/api -name .svn`; \
+ fi;
docfiles = \
README.txt \
-VERSION 1.4.1
-
Release Notes
-----------
See https://bugs.internet2.edu/jira/secure/ReleaseNote.jspa?projectId=10009
libxmltooling_lite_la_SOURCES = \
${common_sources}
libxmltooling_lite_la_CPPFLAGS = -DXMLTOOLING_LITE
-libxmltooling_lite_la_LDFLAGS = -version-info 5:1:0
+libxmltooling_lite_la_LDFLAGS = -version-info 5:2:0
if BUILD_XMLSEC
-libxmltooling_la_LDFLAGS = $(XMLSEC_LIBS) -version-info 5:1:0
+libxmltooling_la_LDFLAGS = $(XMLSEC_LIBS) -version-info 5:2:0
libxmltooling_la_SOURCES = \
${common_sources} \
${xmlsec_sources}
log.fatal("failed to initialize libcurl, OpenSSL, or Winsock");
return false;
}
- log.debug("libcurl %s initialization complete", LIBCURL_VERSION);
+ curl_version_info_data* curlver = curl_version_info(CURLVERSION_NOW);
+ if (curlver) {
+ log.debug("libcurl %s initialization complete", curlver->version);
+ if (!(curlver->features & CURL_VERSION_SSL)) {
+ log.warn("libcurl lacks TLS/SSL support, this will greatly limit functionality");
+ }
+ }
+ else {
+ log.debug("libcurl %s initialization complete", LIBCURL_VERSION);
+ }
#endif
XMLPlatformUtils::Initialize();
if (e->hasAttributeNS(nullptr, extractNames))
child->setAttributeNS(nullptr, extractNames, e->getAttributeNS(nullptr, extractNames));
}
+ if (e->hasAttributeNS(nullptr, _use)) {
+ dummy->setAttributeNS(nullptr, _use, e->getAttributeNS(nullptr, _use));
+ }
+
e = dummy; // reset "root" to the dummy config element
}
m_useragent = XMLToolingConfig::getConfig().user_agent;
if (!m_useragent.empty()) {
- m_useragent = m_useragent + " libcurl/" + LIBCURL_VERSION + ' ' + OPENSSL_VERSION_TEXT;
+ curl_version_info_data* curlver = curl_version_info(CURLVERSION_NOW);
+ m_useragent += " libcurl/";
+ if (curlver)
+ m_useragent = m_useragent + curlver->version + ' ' + curlver->ssl_version;
+ else
+ m_useragent = m_useragent + LIBCURL_VERSION + ' ' + OPENSSL_VERSION_TEXT;
curl_easy_setopt(m_handle, CURLOPT_USERAGENT, m_useragent.c_str());
}
public AbstractXMLObjectMarshaller,
public AbstractXMLObjectUnmarshaller
{
- xmltooling::QName* m_qname;
+ mutable xmltooling::QName* m_qname;
public:
virtual ~FaultcodeImpl() {
delete m_qname;
}
const xmltooling::QName* getCode() const {
+ if (!m_qname && getDOM() && getDOM()->getTextContent()) {
+ m_qname = XMLHelper::getNodeValueAsQName(getDOM());
+ }
return m_qname;
}
auto_ptr_XMLCh temp(m_qname->toString().c_str());
setTextContent(temp.get());
}
- else
+ else {
setTextContent(nullptr);
+ }
}
IMPL_XMLOBJECT_CLONE(Faultcode);
const XMLCh Envelope::TYPE_NAME[] = UNICODE_LITERAL_8(E,n,v,e,l,o,p,e);
const XMLCh Fault::LOCAL_NAME[] = UNICODE_LITERAL_5(F,a,u,l,t);
const XMLCh Fault::TYPE_NAME[] = UNICODE_LITERAL_5(F,a,u,l,t);
-const XMLCh Faultactor::LOCAL_NAME[] = UNICODE_LITERAL_10(F,a,u,l,t,a,c,t,o,r);
-const XMLCh Faultcode::LOCAL_NAME[] = UNICODE_LITERAL_9(F,a,u,l,t,c,o,d,e);
-const XMLCh Faultstring::LOCAL_NAME[] = UNICODE_LITERAL_11(F,a,u,l,t,s,t,r,i,n,g);
+const XMLCh Faultactor::LOCAL_NAME[] = UNICODE_LITERAL_10(f,a,u,l,t,a,c,t,o,r);
+const XMLCh Faultcode::LOCAL_NAME[] = UNICODE_LITERAL_9(f,a,u,l,t,c,o,d,e);
+const XMLCh Faultstring::LOCAL_NAME[] = UNICODE_LITERAL_11(f,a,u,l,t,s,t,r,i,n,g);
const XMLCh Header::LOCAL_NAME[] = UNICODE_LITERAL_6(H,e,a,d,e,r);
const XMLCh Header::TYPE_NAME[] = UNICODE_LITERAL_6(H,e,a,d,e,r);
const XMLCh Header::ACTOR_ATTRIB_NAME[] = UNICODE_LITERAL_5(a,c,t,o,r);
if (!domNode)
return nullptr;
- int i;
const XMLCh* value=domNode->getTextContent();
- if (value && (i=XMLString::indexOf(value,chColon))>0) {
+ if (!value || !*value)
+ return nullptr;
+
+ int i;
+ if ((i=XMLString::indexOf(value,chColon))>0) {
XMLCh* prefix=new XMLCh[i+1];
XMLString::subString(prefix,value,0,i);
prefix[i]=chNull;
#ifndef __xmltooling_xmlhelper_h__
#define __xmltooling_xmlhelper_h__
-#include <xmltooling/base.h>
+#include <xmltooling/unicode.h>
#include <map>
#include <iostream>
#define XMLTOOLING_VERSION_MAJOR 1
#define XMLTOOLING_VERSION_MINOR 4
-#define XMLTOOLING_VERSION_REVISION 1
+#define XMLTOOLING_VERSION_REVISION 2
/** DO NOT MODIFY BELOW THIS LINE */
<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
<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
//\r
\r
VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 1,4,1,0\r
- PRODUCTVERSION 2,4,1,0\r
+ FILEVERSION 1,4,2,0\r
+ PRODUCTVERSION 2,4,2,0\r
FILEFLAGSMASK 0x3fL\r
#ifdef _DEBUG\r
FILEFLAGS 0x1L\r
#else\r
VALUE "FileDescription", "OpenSAML XMLTooling Library\0"\r
#endif\r
- VALUE "FileVersion", "1, 4, 1, 0\0"\r
+ VALUE "FileVersion", "1, 4, 2, 0\0"\r
#ifdef XMLTOOLING_LITE\r
#ifdef _DEBUG\r
VALUE "InternalName", "xmltooling-lite1_4D\0"\r
VALUE "InternalName", "xmltooling1_4\0"\r
#endif\r
#endif\r
- VALUE "LegalCopyright", "Copyright © 2011 Internet2\0"\r
+ VALUE "LegalCopyright", "Copyright © 2011 UCAID\0"\r
VALUE "LegalTrademarks", "\0"\r
#ifdef XMLTOOLING_LITE\r
#ifdef _DEBUG\r
#endif\r
#endif\r
VALUE "PrivateBuild", "\0"\r
- VALUE "ProductName", "OpenSAML 2.4.1\0"\r
- VALUE "ProductVersion", "2, 4, 1, 0\0"\r
+ VALUE "ProductName", "OpenSAML 2.4.2\0"\r
+ VALUE "ProductVersion", "2, 4, 2, 0\0"\r
VALUE "SpecialBuild", "\0"\r
END\r
END\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
<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
KeyInfoTest.h \
MarshallingTest.h \
NonVisibleNamespaceTest.h \
+ SOAPTest.h \
UnmarshallingTest.h \
TemplateEngineTest.h \
xmltoolingtest.h \
--- /dev/null
+/*
+ * Copyright 2011 Internet2
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "XMLObjectBaseTestCase.h"
+
+#include <fstream>
+#include <xmltooling/soap/SOAP.h>
+#include <xmltooling/validation/ValidatorSuite.h>
+
+using namespace soap11;
+
+class SOAPTest : public CxxTest::TestSuite {
+public:
+ SOAPTest() {}
+
+ void testSOAPFault() {
+ string path=data_path + "SOAPFault.xml";
+ ifstream fs(path.c_str());
+ DOMDocument* doc=XMLToolingConfig::getConfig().getValidatingParser().parse(fs);
+ TS_ASSERT(doc!=nullptr);
+
+ const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
+ TS_ASSERT(b!=nullptr);
+
+ auto_ptr<Envelope> envObject(dynamic_cast<Envelope*>(b->buildFromDocument(doc)));
+ TS_ASSERT(envObject.get()!=nullptr);
+ TSM_ASSERT("SOAP Envelope missing Body", envObject->getBody() != nullptr);
+ TSM_ASSERT_EQUALS("SOAP Body missing Fault", 1, envObject->getBody()->getOrderedChildren().size());
+
+ SchemaValidators.validate(envObject.get());
+ }
+};
void testKeysFromURLs() {
string pathname = data_path + "key.pem.bak";
- auto_ptr<SOAPTransport> t1(getTransport("https://spaces.internet2.edu/download/attachments/5305/key.pem"));
+ auto_ptr<SOAPTransport> t1(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/key.pem"));
auto_ptr<XSECCryptoKey> key1(SecurityHelper::loadKeyFromURL(*t1.get(), pathname.c_str()));
pathname = data_path + "key.der.bak";
- auto_ptr<SOAPTransport> t2(getTransport("https://spaces.internet2.edu/download/attachments/5305/key.der"));
+ auto_ptr<SOAPTransport> t2(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/key.der"));
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<SOAPTransport> t3(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/test.pfx"));
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()));
void testCertificatesFromURLs() {
string pathname = data_path + "cert.pem.bak";
- auto_ptr<SOAPTransport> t1(getTransport("https://spaces.internet2.edu/download/attachments/5305/cert.pem"));
+ auto_ptr<SOAPTransport> t1(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/cert.pem"));
SecurityHelper::loadCertificatesFromURL(certs, *t1.get(), pathname.c_str());
pathname = data_path + "cert.der.bak";
- auto_ptr<SOAPTransport> t2(getTransport("https://spaces.internet2.edu/download/attachments/5305/cert.der"));
+ auto_ptr<SOAPTransport> t2(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/cert.der"));
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"));
+ auto_ptr<SOAPTransport> t3(getTransport("https://wiki.shibboleth.net/confluence/download/attachments/3277026/test.pfx"));
SecurityHelper::loadCertificatesFromURL(certs, *t3.get(), pathname.c_str(), nullptr, "password");
TSM_ASSERT_EQUALS("Wrong certificate count", certs.size(), 3);
<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
<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
<ClCompile Include="NonVisibleNamespaceTest.cpp" />\r
<ClCompile Include="SecurityHelperTest.cpp" />\r
<ClCompile Include="SignatureTest.cpp" />\r
+ <ClCompile Include="SOAPTest.cpp" />\r
<ClCompile Include="TemplateEngineTest.cpp" />\r
<ClCompile Include="UnmarshallingTest.cpp" />\r
<ClCompile Include="xmltoolingtest.cpp" />\r
</Command>\r
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(Filename).cpp;%(Outputs)</Outputs>\r
</CustomBuild>\r
+ <CustomBuild Include="SOAPTest.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
<ClCompile Include="xmltoolingtest.cpp">\r
<Filter>Generated Code</Filter>\r
</ClCompile>\r
+ <ClCompile Include="SOAPTest.cpp">\r
+ <Filter>Generated Code</Filter>\r
+ </ClCompile>\r
</ItemGroup>\r
<ItemGroup>\r
<ClInclude Include="XMLObjectBaseTestCase.h">\r
<CustomBuild Include="xmltoolingtest.h">\r
<Filter>Unit Tests</Filter>\r
</CustomBuild>\r
+ <CustomBuild Include="SOAPTest.h">\r
+ <Filter>Unit Tests</Filter>\r
+ </CustomBuild>\r
</ItemGroup>\r
</Project>
\ No newline at end of file