Backport fixes from main branch and rev version.
authorScott Cantor <cantor.2@osu.edu>
Tue, 31 May 2011 04:02:34 +0000 (04:02 +0000)
committerScott Cantor <cantor.2@osu.edu>
Tue, 31 May 2011 04:02:34 +0000 (04:02 +0000)
13 files changed:
Makefile.am
config_win32.h
configure.ac
doc/Makefile.am
doc/README.txt
saml/Makefile.am
saml/saml.rc
saml/saml.vcxproj
saml/saml1/core/impl/ProtocolsImpl.cpp
saml/version.h
samlsign/samlsign.cpp
samlsign/samlsign.vcxproj
samltest/samltest.vcxproj

index d5ae159..836bb53 100644 (file)
@@ -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`
index 2820361..3e267ce 100644 (file)
 #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 */
index f223309..532106e 100644 (file)
@@ -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)
index 2c53926..4320aca 100644 (file)
@@ -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 \
index f492cbb..6eb12ec 100644 (file)
@@ -1,5 +1,3 @@
-VERSION 2.4.1
-
 Release Notes:
 ---------------------------------
 https://bugs.internet2.edu/jira/secure/ReleaseNote.jspa?projectId=10010
index 3741a34..d001b33 100644 (file)
@@ -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
index a543a1c..97060a6 100644 (file)
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 2,4,1,0\r
- PRODUCTVERSION 2,4,1,0\r
+ FILEVERSION 2,4,2,0\r
+ PRODUCTVERSION 2,4,2,0\r
  FILEFLAGSMASK 0x3fL\r
 #ifdef _DEBUG\r
  FILEFLAGS 0x1L\r
@@ -46,14 +46,14 @@ BEGIN
         BEGIN\r
             VALUE "Comments", "\0"\r
             VALUE "CompanyName", "Internet2\0"\r
-            VALUE "FileDescription", "OpenSAML 2.4.1 Library\0"\r
-            VALUE "FileVersion", "2, 4, 1, 0\0"\r
+            VALUE "FileDescription", "OpenSAML 2.4.2 Library\0"\r
+            VALUE "FileVersion", "2, 4, 2, 0\0"\r
 #ifdef _DEBUG\r
             VALUE "InternalName", "saml2_4D\0"\r
 #else\r
             VALUE "InternalName", "saml2_4\0"\r
 #endif\r
-            VALUE "LegalCopyright", "Copyright © 2011 Internet2\0"\r
+            VALUE "LegalCopyright", "Copyright © 2011 UCAID\0"\r
             VALUE "LegalTrademarks", "\0"\r
 #ifdef _DEBUG\r
             VALUE "OriginalFilename", "saml2_4D.dll\0"\r
@@ -61,8 +61,8 @@ BEGIN
             VALUE "OriginalFilename", "saml2_4.dll\0"\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
index c817340..f20a033 100644 (file)
@@ -94,7 +94,6 @@
       <Optimization>Disabled</Optimization>\r
       <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <BrowseInformation>true</BrowseInformation>\r
       <WarningLevel>Level3</WarningLevel>\r
       <Optimization>Disabled</Optimization>\r
       <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <BrowseInformation>true</BrowseInformation>\r
       <WarningLevel>Level3</WarningLevel>\r
index d765e13..28a5fe1 100644 (file)
@@ -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);
index fc3ebec..ddfa3a7 100644 (file)
@@ -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 */
 
index b5ddf56..f068236 100644 (file)
@@ -35,6 +35,7 @@
 #include <saml/saml2/metadata/Metadata.h>
 #include <saml/saml2/metadata/MetadataProvider.h>
 #include <saml/saml2/metadata/MetadataCredentialCriteria.h>
+#include <saml/signature/ContentReference.h>
 #include <saml/signature/SignatureProfileValidator.h>
 #include <saml/util/SAMLConstants.h>
 #include <xmltooling/logging.h>
@@ -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+1<argc)
             rns=argv[++i];
+        else if (!strcmp(argv[i],"-alg") && i+1<argc)
+            alg_param=argv[++i];
+        else if (!strcmp(argv[i],"-dig") && i+1<argc)
+            dig_param=argv[++i];
         else if (!strcmp(argv[i],"-saml10"))
             protocol=samlconstants::SAML10_PROTOCOL_ENUM;
         else if (!strcmp(argv[i],"-saml11"))
@@ -339,6 +346,14 @@ int main(int argc,char* argv[])
 
             // Attach new signature.
             Signature* sig = SignatureBuilder::buildSignature();
+            if (alg_param) {
+                auto_ptr_XMLCh alg(alg_param);
+                sig->setSignatureAlgorithm(alg.get());
+            }
+            if (dig_param) {
+               auto_ptr_XMLCh dig(dig_param);
+               dynamic_cast<opensaml::ContentReference*>(sig->getContentReference())->setDigestAlgorithm(dig.get());
+            }
             signable->setSignature(sig);
 
             // Sign response while re-marshalling.
index c833563..edcf283 100644 (file)
@@ -90,7 +90,6 @@
       <Optimization>Disabled</Optimization>\r
       <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
       <Optimization>Disabled</Optimization>\r
       <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <PrecompiledHeader>\r
       </PrecompiledHeader>\r
index 2d0e8df..67b5235 100644 (file)
@@ -90,7 +90,6 @@
       <Optimization>Disabled</Optimization>\r
       <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <BrowseInformation>true</BrowseInformation>\r
       <WarningLevel>Level3</WarningLevel>\r
       <Optimization>Disabled</Optimization>\r
       <AdditionalIncludeDirectories>$(SolutionDir);$(ProjectDir);..\..\cpp-xmltooling;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
       <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
       <BrowseInformation>true</BrowseInformation>\r
       <WarningLevel>Level3</WarningLevel>\r