From 0d374ebba312e40bf888ceb9598f5af4d178c93b Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Tue, 31 May 2011 04:02:34 +0000 Subject: [PATCH] Backport fixes from main branch and rev version. --- Makefile.am | 6 ++++++ config_win32.h | 6 +++--- configure.ac | 2 +- doc/Makefile.am | 6 ++++-- doc/README.txt | 2 -- saml/Makefile.am | 2 +- saml/saml.rc | 14 +++++++------- saml/saml.vcxproj | 2 -- saml/saml1/core/impl/ProtocolsImpl.cpp | 8 ++++++-- saml/version.h | 2 +- samlsign/samlsign.cpp | 15 +++++++++++++++ samlsign/samlsign.vcxproj | 2 -- samltest/samltest.vcxproj | 2 -- 13 files changed, 44 insertions(+), 25 deletions(-) diff --git a/Makefile.am b/Makefile.am index d5ae159..836bb53 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,12 @@ include doxygen.am 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)/samltest/data -name .svn` rm -rf `find $(distdir)/doc/api -name .svn` diff --git a/config_win32.h b/config_win32.h index 2820361..3e267ce 100644 --- a/config_win32.h +++ b/config_win32.h @@ -67,13 +67,13 @@ #define PACKAGE_NAME "opensaml" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "opensaml 2.4.1" +#define PACKAGE_STRING "opensaml 2.4.2" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "opensaml" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.4.1" +#define PACKAGE_VERSION "2.4.2" /* Define to the necessary symbol if this constant uses a non-standard name on your system. */ @@ -86,7 +86,7 @@ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ -#define VERSION "2.4.1" +#define VERSION "2.4.2" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ diff --git a/configure.ac b/configure.ac index f223309..532106e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.50]) -AC_INIT([opensaml],[2.4.1],[https://bugs.internet2.edu/],[opensaml]) +AC_INIT([opensaml],[2.4.2],[https://issues.shibboleth.net/],[opensaml]) AC_CONFIG_SRCDIR(saml) AC_CONFIG_AUX_DIR(build-aux) AC_CONFIG_MACRO_DIR(m4) diff --git a/doc/Makefile.am b/doc/Makefile.am index 2c53926..4320aca 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -3,8 +3,10 @@ AUTOMAKE_OPTIONS = foreign 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 \ diff --git a/doc/README.txt b/doc/README.txt index f492cbb..6eb12ec 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -1,5 +1,3 @@ -VERSION 2.4.1 - Release Notes: --------------------------------- https://bugs.internet2.edu/jira/secure/ReleaseNote.jspa?projectId=10010 diff --git a/saml/Makefile.am b/saml/Makefile.am index 3741a34..d001b33 100644 --- a/saml/Makefile.am +++ b/saml/Makefile.am @@ -185,7 +185,7 @@ libsaml_la_SOURCES = \ # this is different from the project version # http://sources.redhat.com/autobook/autobook/autobook_91.html -libsaml_la_LDFLAGS = -version-info 7:1:0 +libsaml_la_LDFLAGS = -version-info 7:2:0 install-exec-hook: for la in $(lib_LTLIBRARIES) ; do rm -f $(DESTDIR)$(libdir)/$$la ; done diff --git a/saml/saml.rc b/saml/saml.rc index a543a1c..97060a6 100644 --- a/saml/saml.rc +++ b/saml/saml.rc @@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,4,1,0 - PRODUCTVERSION 2,4,1,0 + FILEVERSION 2,4,2,0 + PRODUCTVERSION 2,4,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -46,14 +46,14 @@ BEGIN BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "Internet2\0" - VALUE "FileDescription", "OpenSAML 2.4.1 Library\0" - VALUE "FileVersion", "2, 4, 1, 0\0" + VALUE "FileDescription", "OpenSAML 2.4.2 Library\0" + VALUE "FileVersion", "2, 4, 2, 0\0" #ifdef _DEBUG VALUE "InternalName", "saml2_4D\0" #else VALUE "InternalName", "saml2_4\0" #endif - VALUE "LegalCopyright", "Copyright © 2011 Internet2\0" + VALUE "LegalCopyright", "Copyright © 2011 UCAID\0" VALUE "LegalTrademarks", "\0" #ifdef _DEBUG VALUE "OriginalFilename", "saml2_4D.dll\0" @@ -61,8 +61,8 @@ BEGIN VALUE "OriginalFilename", "saml2_4.dll\0" #endif VALUE "PrivateBuild", "\0" - VALUE "ProductName", "OpenSAML 2.4.1\0" - VALUE "ProductVersion", "2, 4, 1, 0\0" + VALUE "ProductName", "OpenSAML 2.4.2\0" + VALUE "ProductVersion", "2, 4, 2, 0\0" VALUE "SpecialBuild", "\0" END END diff --git a/saml/saml.vcxproj b/saml/saml.vcxproj index c817340..f20a033 100644 --- a/saml/saml.vcxproj +++ b/saml/saml.vcxproj @@ -94,7 +94,6 @@ Disabled $(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true MultiThreadedDebugDLL true Level3 @@ -120,7 +119,6 @@ Disabled $(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true MultiThreadedDebugDLL true Level3 diff --git a/saml/saml1/core/impl/ProtocolsImpl.cpp b/saml/saml1/core/impl/ProtocolsImpl.cpp index d765e13..28a5fe1 100644 --- a/saml/saml1/core/impl/ProtocolsImpl.cpp +++ b/saml/saml1/core/impl/ProtocolsImpl.cpp @@ -66,7 +66,7 @@ namespace opensaml { public AbstractXMLObjectMarshaller, public AbstractXMLObjectUnmarshaller { - xmltooling::QName* m_qname; + mutable xmltooling::QName* m_qname; public: virtual ~RespondWithImpl() { delete m_qname; @@ -82,6 +82,9 @@ namespace opensaml { } xmltooling::QName* getQName() const { + if (!m_qname && getDOM() && getDOM()->getTextContent()) { + m_qname = XMLHelper::getNodeValueAsQName(getDOM()); + } return m_qname; } @@ -91,8 +94,9 @@ namespace opensaml { auto_ptr_XMLCh temp(m_qname->toString().c_str()); setTextContent(temp.get()); } - else + else { setTextContent(nullptr); + } } IMPL_XMLOBJECT_CLONE(RespondWith); diff --git a/saml/version.h b/saml/version.h index fc3ebec..ddfa3a7 100644 --- a/saml/version.h +++ b/saml/version.h @@ -39,7 +39,7 @@ #define OPENSAML_VERSION_MAJOR 2 #define OPENSAML_VERSION_MINOR 4 -#define OPENSAML_VERSION_REVISION 1 +#define OPENSAML_VERSION_REVISION 2 /** DO NOT MODIFY BELOW THIS LINE */ diff --git a/samlsign/samlsign.cpp b/samlsign/samlsign.cpp index b5ddf56..f068236 100644 --- a/samlsign/samlsign.cpp +++ b/samlsign/samlsign.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -120,6 +121,8 @@ int main(int argc,char* argv[]) char* cr_param=nullptr; char* t_param=nullptr; char* id_param=nullptr; + char* alg_param=nullptr; + char* dig_param=nullptr; // metadata lookup options char* m_param=nullptr; @@ -156,6 +159,10 @@ int main(int argc,char* argv[]) rname=argv[++i]; else if (!strcmp(argv[i],"-ns") && i+1setSignatureAlgorithm(alg.get()); + } + if (dig_param) { + auto_ptr_XMLCh dig(dig_param); + dynamic_cast(sig->getContentReference())->setDigestAlgorithm(dig.get()); + } signable->setSignature(sig); // Sign response while re-marshalling. diff --git a/samlsign/samlsign.vcxproj b/samlsign/samlsign.vcxproj index c833563..edcf283 100644 --- a/samlsign/samlsign.vcxproj +++ b/samlsign/samlsign.vcxproj @@ -90,7 +90,6 @@ Disabled $(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true MultiThreadedDebugDLL @@ -114,7 +113,6 @@ Disabled $(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true MultiThreadedDebugDLL diff --git a/samltest/samltest.vcxproj b/samltest/samltest.vcxproj index 2d0e8df..67b5235 100644 --- a/samltest/samltest.vcxproj +++ b/samltest/samltest.vcxproj @@ -90,7 +90,6 @@ Disabled $(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions) - true MultiThreadedDebugDLL true Level3 @@ -112,7 +111,6 @@ Disabled $(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions) - true MultiThreadedDebugDLL true Level3 -- 2.1.4