[cpp-sp-resolver] branch master updated: SSPCPP-762 - Update libshibresolver for 3.0 stack

Scott Cantor cantor.2 at osu.edu
Wed Apr 11 20:02:15 EDT 2018


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

scantor pushed a commit to branch master
in repository cpp-sp-resolver.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp-resolver.git;a=commit;h=5badcdd98a6ea9c8024f670cf5b2edf68fc4d68a

The following commit(s) were added to refs/heads/master by this push:
       new  5badcdd   SSPCPP-762 - Update libshibresolver for 3.0 stack
5badcdd is described below

commit 5badcdd98a6ea9c8024f670cf5b2edf68fc4d68a
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Apr 11 20:00:47 2018 -0400

    SSPCPP-762 - Update libshibresolver for 3.0 stack
    
    https://issues.shibboleth.net/jira/browse/SSPCPP-762
---
 .gitignore                    |  4 ++--
 configure.ac                  | 15 ++++++++-------
 src/Makefile.am               |  2 +-
 src/shibresolver/resolver.cpp | 12 ++----------
 4 files changed, 13 insertions(+), 20 deletions(-)

diff --git a/.gitignore b/.gitignore
index 21e237a..7b94ed9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,11 +48,11 @@ src/x64
 /m4/ltversion.m4
 /m4/lt~obsolete.m4
 /resolver.spec
-/shibboleth-resolver-1.0.0.tar.gz
 .deps/
 /src/shibresolver/config_pub.h
 /src/shibresolver/stamp-h2
 /stamp-h1
 Makefile.in
 Makefile
-
+*.tar.gz
+.dirstamp
diff --git a/configure.ac b/configure.ac
index 9b7a8ca..cddf473 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.50])
-AC_INIT([shibboleth-resolver], [1.0.0], [MOONSHOT-COMMUNITY at JISCMAIL.AC.UK], [shibboleth-resolver])
+AC_INIT([shibboleth-resolver], [3.0.0], [MOONSHOT-COMMUNITY at JISCMAIL.AC.UK], [shibboleth-resolver])
 AC_CONFIG_SRCDIR(src)
 AC_CONFIG_AUX_DIR(build-aux)
 AC_CONFIG_MACRO_DIR(m4)
@@ -155,13 +155,14 @@ AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,AC_MSG_ERROR([unable to find xerces heade
 AC_MSG_CHECKING([Xerces version])
 AC_PREPROC_IFELSE(
     [AC_LANG_PROGRAM([#include <xercesc/util/XercesVersion.hpp>],
-[#if  _XERCES_VERSION != 20600
+[#if  _XERCES_VERSION >= 30000
 int i = 0;
 #else
-#error cannot use version 2.6.0
+#error cannot use version 1.x or 2.x
 #endif])],
     [AC_MSG_RESULT(OK)],
-    [AC_MSG_FAILURE([Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use a newer version])])
+    [AC_MSG_FAILURE([Xerces-C 3.x is required])])
+
 AC_LINK_IFELSE(
     [AC_LANG_PROGRAM([[#include <xercesc/util/PlatformUtils.hpp>]],
         [[xercesc::XMLPlatformUtils::Initialize()]])],
@@ -198,13 +199,13 @@ AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find
 AC_MSG_CHECKING([XML-Security version])
 AC_PREPROC_IFELSE(
     [AC_LANG_PROGRAM([#include <xsec/utils/XSECPlatformUtils.hpp>],
-    [#if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3)
+    [#if XSEC_VERSION_MAJOR >= 2
 int i = 0;
 #else
-#error need version 1.4.0 or later
+#error need version 2.0.0 or later
 #endif])],
     [AC_MSG_RESULT(OK)],
-    [AC_MSG_FAILURE([XML-Security version 1.4.0 or greater is required.])])
+    [AC_MSG_FAILURE([XML-Security version 2.0.0 or greater is required.])])
 AC_LINK_IFELSE(
     [AC_LANG_PROGRAM([[#include <xsec/utils/XSECPlatformUtils.hpp>]],
         [[XSECPlatformUtils::Initialise()]])],,
diff --git a/src/Makefile.am b/src/Makefile.am
index 6c00a2a..f266c31 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-AUTOMAKE_OPTIONS = foreign
+AUTOMAKE_OPTIONS = foreign subdir-objects
 
 lib_LTLIBRARIES = libshibresolver.la libshibresolver-lite.la
 
diff --git a/src/shibresolver/resolver.cpp b/src/shibresolver/resolver.cpp
index 5648c43..d3cf1e7 100644
--- a/src/shibresolver/resolver.cpp
+++ b/src/shibresolver/resolver.cpp
@@ -199,17 +199,13 @@ void ShibbolethResolver::addToken(gss_ctx_id_t* ctx)
         gss_buffer_desc contextbuf = GSS_C_EMPTY_BUFFER;
         OM_uint32 major = gss_export_sec_context(&minor, ctx, &contextbuf);
         if (major == GSS_S_COMPLETE) {
-            xsecsize_t len=0;
+            XMLSize_t len=0;
             XMLByte* out=Base64::encode(reinterpret_cast<const XMLByte*>(contextbuf.value), contextbuf.length, &len);
             if (out) {
                 string s;
                 s.append(reinterpret_cast<char*>(out), len);
                 auto_ptr_XMLCh temp(s.c_str());
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-                XMLString::release(&out);
-#else
                 XMLString::release((char**)&out);
-#endif
                 static const XMLCh _GSSAPI[] = UNICODE_LITERAL_13(G,S,S,A,P,I,C,o,n,t,e,x,t);
                 m_gsswrapper = new AnyElementImpl(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _GSSAPI);
                 m_gsswrapper->setTextContent(temp.get());
@@ -253,17 +249,13 @@ void ShibbolethResolver::addToken(const gss_buffer_t contextbuf)
         m_gsswrapper = NULL;
     }
 
-    xsecsize_t len=0;
+    XMLSize_t len=0;
     XMLByte* out=Base64::encode(reinterpret_cast<const XMLByte*>(contextbuf->value), contextbuf->length, &len);
     if (out) {
         string s;
         s.append(reinterpret_cast<char*>(out), len);
         auto_ptr_XMLCh temp(s.c_str());
-#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
-        XMLString::release(&out);
-#else
         XMLString::release((char**)&out);
-#endif
         static const XMLCh _GSSAPI[] = UNICODE_LITERAL_10(G,S,S,A,P,I,N,a,m,e);
         m_gsswrapper = new AnyElementImpl(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _GSSAPI);
         m_gsswrapper->setTextContent(temp.get());

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list