Imported Upstream version 2.1.dfsg1
authorRuss Allbery <rra@debian.org>
Sat, 23 Aug 2008 23:10:04 +0000 (16:10 -0700)
committerRuss Allbery <rra@debian.org>
Sat, 23 Aug 2008 23:10:04 +0000 (16:10 -0700)
126 files changed:
Makefile.am
Makefile.in
Shibboleth.sln
adfs/Makefile.in
adfs/adfs-lite.vcproj
adfs/adfs.cpp
adfs/adfs.rc
adfs/adfs.vcproj
apache/Makefile.in
apache/mod_apache.cpp
apache/mod_shib13.vcproj
apache/mod_shib20.vcproj
apache/mod_shib22.vcproj
apache/mod_shib_13.rc
apache/mod_shib_20.rc
apache/mod_shib_22.rc
config.guess
config.sub
configs/Makefile.in
configs/attribute-map.xml
configs/attribute-policy.xml
configs/keygen.sh
configs/shibboleth2.xml
configure
configure.ac
depcomp
depend
doc/Makefile.in
doc/README.txt
doc/RELEASE.txt
fastcgi/Makefile.in
fastcgi/shibauthorizer.cpp
fastcgi/shibauthorizer.rc
fastcgi/shibauthorizer.vcproj
fastcgi/shibresponder.cpp
fastcgi/shibresponder.rc
fastcgi/shibresponder.vcproj
install-sh
isapi_shib/isapi_shib.cpp
isapi_shib/isapi_shib.rc
isapi_shib/isapi_shib.vcproj
memcache-store/Makefile.am [new file with mode: 0644]
memcache-store/Makefile.in [new file with mode: 0644]
memcache-store/memcache-store.cpp [new file with mode: 0644]
memcache-store/memcache-store.rc [new file with mode: 0644]
memcache-store/memcache-store.vcproj [new file with mode: 0644]
memcache-store/resource.h [new file with mode: 0644]
missing
mkinstalldirs [deleted file]
nsapi_shib/Makefile.in
nsapi_shib/nsapi_shib.cpp
nsapi_shib/nsapi_shib.rc
nsapi_shib/nsapi_shib.vcproj
odbc-store/Makefile.in
odbc-store/odbc-store.cpp
odbc-store/odbc-store.rc
odbc-store/odbc-store.vcproj
pkginfo
schemas/Makefile.in
schemas/shibboleth-2.0-afp-mf-basic.xsd
schemas/shibboleth-2.0-afp-mf-saml.xsd
schemas/shibboleth-2.0-afp.xsd
schemas/shibboleth-2.0-attribute-map.xsd
schemas/shibboleth-2.0-native-sp-config.xsd
selinux/Makefile.in
shibboleth.spec
shibboleth.spec.in
shibd/Makefile.in
shibd/shibd.cpp
shibd/shibd.rc
shibd/shibd.vcproj
shibsp/AbstractSPRequest.cpp
shibsp/AbstractSPRequest.h
shibsp/Application.cpp
shibsp/Application.h
shibsp/Makefile.am
shibsp/Makefile.in
shibsp/SPConfig.cpp
shibsp/SPConfig.h
shibsp/SPRequest.h
shibsp/ServiceProvider.cpp
shibsp/SessionCache.h
shibsp/attribute/Attribute.cpp
shibsp/attribute/AttributeDecoder.h
shibsp/attribute/NameIDAttributeDecoder.cpp
shibsp/attribute/NameIDFromScopedAttributeDecoder.cpp [new file with mode: 0644]
shibsp/attribute/ScopedAttributeDecoder.cpp
shibsp/attribute/StringAttributeDecoder.cpp
shibsp/attribute/filtering/impl/AttributeIssuerStringFunctor.cpp
shibsp/attribute/filtering/impl/AttributeRequesterStringFunctor.cpp
shibsp/attribute/filtering/impl/AttributeScopeStringFunctor.cpp
shibsp/attribute/filtering/impl/AttributeValueStringFunctor.cpp
shibsp/attribute/filtering/impl/AuthenticationMethodStringFunctor.cpp
shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp
shibsp/attribute/resolver/impl/ChainingAttributeExtractor.cpp
shibsp/attribute/resolver/impl/ChainingAttributeResolver.cpp
shibsp/attribute/resolver/impl/QueryAttributeResolver.cpp
shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
shibsp/binding/impl/SOAPClient.cpp
shibsp/handler/impl/AbstractHandler.cpp
shibsp/handler/impl/AssertionConsumerService.cpp
shibsp/handler/impl/LogoutHandler.cpp
shibsp/handler/impl/MetadataGenerator.cpp
shibsp/handler/impl/SAML2Logout.cpp
shibsp/handler/impl/SAML2LogoutInitiator.cpp
shibsp/handler/impl/SAML2SessionInitiator.cpp
shibsp/handler/impl/SessionHandler.cpp
shibsp/handler/impl/Shib1SessionInitiator.cpp
shibsp/handler/impl/StatusHandler.cpp
shibsp/handler/impl/TransformSessionInitiator.cpp
shibsp/impl/StorageServiceSessionCache.cpp
shibsp/impl/XMLServiceProvider.cpp
shibsp/internal.h
shibsp/metadata/DynamicMetadataProvider.cpp [new file with mode: 0644]
shibsp/metadata/MetadataExtSchemaValidators.cpp
shibsp/metadata/MetadataProviderCriteria.h [new file with mode: 0644]
shibsp/remoting/impl/SocketListener.cpp
shibsp/shibsp-lite.vcproj
shibsp/shibsp.rc
shibsp/shibsp.vcproj
shibsp/version.h
util/Makefile.in
util/mdquery.cpp
util/mdquery.vcproj
util/resolvertest.cpp
util/resolvertest.vcproj

index e6172ac..28448cf 100644 (file)
@@ -10,7 +10,7 @@ WANT_SUBDIRS = @WANT_SUBDIRS@
 
 SUBDIRS = $(WANT_SUBDIRS)
 
-DIST_SUBDIRS = doc schemas configs shibsp shibd adfs util apache nsapi_shib fastcgi odbc-store selinux
+DIST_SUBDIRS = doc schemas configs shibsp shibd adfs util apache nsapi_shib fastcgi odbc-store memcache-store selinux
 
 if DX_COND_doc
 all-local: shibboleth.spec pkginfo doxygen-doc
@@ -29,13 +29,13 @@ dist-hook:
 
 shibboleth.spec: shibboleth.spec.in Makefile
        rm -f $@.tmp
-       sed < $< > $@.tmp \
+       sed < $@.in > $@.tmp \
            -e 's:@-VERSION-@:${VERSION}:'
        mv $@.tmp $@
 
 pkginfo: pkginfo.in Makefile
        rm -f $@.tmp
-       sed < $< > $@.tmp \
+       sed < $@.in > $@.tmp \
            -e 's:@-VERSION-@:${VERSION}:'
        mv $@.tmp $@
 
index cc1f613..7f86166 100644 (file)
@@ -68,7 +68,7 @@ host_triplet = @host@
 DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
        $(srcdir)/Makefile.in $(srcdir)/config.h.in \
        $(srcdir)/doxygen.am $(top_srcdir)/configure config.guess \
-       config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
+       config.sub depcomp install-sh ltmain.sh missing
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
@@ -78,7 +78,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -130,6 +130,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -215,6 +217,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
@@ -322,7 +327,7 @@ ACLOCAL_AMFLAGS = -I .
 
 MOSTLYCLEANFILES = $(DX_CLEANFILES)
 SUBDIRS = $(WANT_SUBDIRS)
-DIST_SUBDIRS = doc schemas configs shibsp shibd adfs util apache nsapi_shib fastcgi odbc-store selinux
+DIST_SUBDIRS = doc schemas configs shibsp shibd adfs util apache nsapi_shib fastcgi odbc-store memcache-store selinux
 @DX_COND_doc_TRUE@APIDOCS = doc/api
 EXTRA_DIST = $(DX_CONFIG) \
     $(APIDOCS) \
@@ -844,13 +849,13 @@ dist-hook:
 
 shibboleth.spec: shibboleth.spec.in Makefile
        rm -f $@.tmp
-       sed < $< > $@.tmp \
+       sed < $@.in > $@.tmp \
            -e 's:@-VERSION-@:${VERSION}:'
        mv $@.tmp $@
 
 pkginfo: pkginfo.in Makefile
        rm -f $@.tmp
-       sed < $< > $@.tmp \
+       sed < $@.in > $@.tmp \
            -e 's:@-VERSION-@:${VERSION}:'
        mv $@.tmp $@
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
index c4616c3..8988b06 100644 (file)
@@ -150,72 +150,137 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shibresponder", "fastcgi\sh
                {81F0F7A6-DC36-46EF-957F-F9E81D4403F7} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}
        EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "memcache-store", "memcache-store\memcache-store.vcproj", "{666A63A7-983F-4C19-8411-207F24305198}"
+       ProjectSection(WebsiteProperties) = preProject
+               Debug.AspNetCompiler.Debug = "True"
+               Release.AspNetCompiler.Debug = "False"
+       EndProjectSection
+       ProjectSection(ProjectDependencies) = postProject
+               {81F0F7A6-DC36-46EF-957F-F9E81D4403F6} = {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
+               Debug|x64 = Debug|x64
                Release|Win32 = Release|Win32
+               Release|x64 = Release|x64
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
                {87C25D4E-8D19-4513-B0BA-BC668BC2DEE3}.Debug|Win32.ActiveCfg = Debug|Win32
                {87C25D4E-8D19-4513-B0BA-BC668BC2DEE3}.Debug|Win32.Build.0 = Debug|Win32
+               {87C25D4E-8D19-4513-B0BA-BC668BC2DEE3}.Debug|x64.ActiveCfg = Debug|x64
+               {87C25D4E-8D19-4513-B0BA-BC668BC2DEE3}.Debug|x64.Build.0 = Debug|x64
                {87C25D4E-8D19-4513-B0BA-BC668BC2DEE3}.Release|Win32.ActiveCfg = Release|Win32
                {87C25D4E-8D19-4513-B0BA-BC668BC2DEE3}.Release|Win32.Build.0 = Release|Win32
+               {87C25D4E-8D19-4513-B0BA-BC668BC2DEE3}.Release|x64.ActiveCfg = Release|x64
+               {87C25D4E-8D19-4513-B0BA-BC668BC2DEE3}.Release|x64.Build.0 = Release|x64
                {D243B43E-728E-4F32-BDFF-B3A897037C6D}.Debug|Win32.ActiveCfg = Debug|Win32
                {D243B43E-728E-4F32-BDFF-B3A897037C6D}.Debug|Win32.Build.0 = Debug|Win32
+               {D243B43E-728E-4F32-BDFF-B3A897037C6D}.Debug|x64.ActiveCfg = Debug|x64
                {D243B43E-728E-4F32-BDFF-B3A897037C6D}.Release|Win32.ActiveCfg = Release|Win32
                {D243B43E-728E-4F32-BDFF-B3A897037C6D}.Release|Win32.Build.0 = Release|Win32
+               {D243B43E-728E-4F32-BDFF-B3A897037C6D}.Release|x64.ActiveCfg = Release|x64
                {68E9568B-476C-4289-B93C-893432378ADC}.Debug|Win32.ActiveCfg = Debug|Win32
                {68E9568B-476C-4289-B93C-893432378ADC}.Debug|Win32.Build.0 = Debug|Win32
+               {68E9568B-476C-4289-B93C-893432378ADC}.Debug|x64.ActiveCfg = Debug|x64
                {68E9568B-476C-4289-B93C-893432378ADC}.Release|Win32.ActiveCfg = Release|Win32
                {68E9568B-476C-4289-B93C-893432378ADC}.Release|Win32.Build.0 = Release|Win32
+               {68E9568B-476C-4289-B93C-893432378ADC}.Release|x64.ActiveCfg = Release|x64
                {1396D80A-8672-4224-9B02-95F3F4207CDB}.Debug|Win32.ActiveCfg = Debug|Win32
                {1396D80A-8672-4224-9B02-95F3F4207CDB}.Debug|Win32.Build.0 = Debug|Win32
+               {1396D80A-8672-4224-9B02-95F3F4207CDB}.Debug|x64.ActiveCfg = Debug|x64
                {1396D80A-8672-4224-9B02-95F3F4207CDB}.Release|Win32.ActiveCfg = Release|Win32
                {1396D80A-8672-4224-9B02-95F3F4207CDB}.Release|Win32.Build.0 = Release|Win32
+               {1396D80A-8672-4224-9B02-95F3F4207CDB}.Release|x64.ActiveCfg = Release|x64
                {B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Debug|Win32.ActiveCfg = Debug|Win32
                {B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Debug|Win32.Build.0 = Debug|Win32
+               {B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Debug|x64.ActiveCfg = Debug|x64
+               {B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Debug|x64.Build.0 = Debug|x64
                {B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Release|Win32.ActiveCfg = Release|Win32
                {B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Release|Win32.Build.0 = Release|Win32
+               {B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Release|x64.ActiveCfg = Release|x64
+               {B44C0852-83B8-4FB2-A86E-097C9C8256D0}.Release|x64.Build.0 = Release|x64
                {666A63A7-983F-4C19-8411-207F24305197}.Debug|Win32.ActiveCfg = Debug|Win32
                {666A63A7-983F-4C19-8411-207F24305197}.Debug|Win32.Build.0 = Debug|Win32
+               {666A63A7-983F-4C19-8411-207F24305197}.Debug|x64.ActiveCfg = Debug|x64
+               {666A63A7-983F-4C19-8411-207F24305197}.Debug|x64.Build.0 = Debug|x64
                {666A63A7-983F-4C19-8411-207F24305197}.Release|Win32.ActiveCfg = Release|Win32
                {666A63A7-983F-4C19-8411-207F24305197}.Release|Win32.Build.0 = Release|Win32
+               {666A63A7-983F-4C19-8411-207F24305197}.Release|x64.ActiveCfg = Release|x64
+               {666A63A7-983F-4C19-8411-207F24305197}.Release|x64.Build.0 = Release|x64
                {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}.Debug|Win32.ActiveCfg = Debug|Win32
                {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}.Debug|Win32.Build.0 = Debug|Win32
+               {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}.Debug|x64.ActiveCfg = Debug|x64
+               {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}.Debug|x64.Build.0 = Debug|x64
                {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}.Release|Win32.ActiveCfg = Release|Win32
                {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}.Release|Win32.Build.0 = Release|Win32
+               {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}.Release|x64.ActiveCfg = Release|x64
+               {81F0F7A6-DC36-46EF-957F-F9E81D4403F6}.Release|x64.Build.0 = Release|x64
                {F13141B5-6C87-40BB-8D4E-5CC56EBB4C59}.Debug|Win32.ActiveCfg = Debug|Win32
                {F13141B5-6C87-40BB-8D4E-5CC56EBB4C59}.Debug|Win32.Build.0 = Debug|Win32
+               {F13141B5-6C87-40BB-8D4E-5CC56EBB4C59}.Debug|x64.ActiveCfg = Debug|x64
+               {F13141B5-6C87-40BB-8D4E-5CC56EBB4C59}.Debug|x64.Build.0 = Debug|x64
                {F13141B5-6C87-40BB-8D4E-5CC56EBB4C59}.Release|Win32.ActiveCfg = Release|Win32
                {F13141B5-6C87-40BB-8D4E-5CC56EBB4C59}.Release|Win32.Build.0 = Release|Win32
+               {F13141B5-6C87-40BB-8D4E-5CC56EBB4C59}.Release|x64.ActiveCfg = Release|x64
+               {F13141B5-6C87-40BB-8D4E-5CC56EBB4C59}.Release|x64.Build.0 = Release|x64
                {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Debug|Win32.ActiveCfg = Debug|Win32
                {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Debug|Win32.Build.0 = Debug|Win32
+               {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Debug|x64.ActiveCfg = Debug|x64
+               {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Debug|x64.Build.0 = Debug|x64
                {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Release|Win32.ActiveCfg = Release|Win32
                {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Release|Win32.Build.0 = Release|Win32
+               {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Release|x64.ActiveCfg = Release|x64
+               {81F0F7A6-DC36-46EF-957F-F9E81D4403F7}.Release|x64.Build.0 = Release|x64
                {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83A}.Debug|Win32.ActiveCfg = Debug|Win32
                {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83A}.Debug|Win32.Build.0 = Debug|Win32
+               {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83A}.Debug|x64.ActiveCfg = Debug|x64
+               {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83A}.Debug|x64.Build.0 = Debug|x64
                {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83A}.Release|Win32.ActiveCfg = Release|Win32
                {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83A}.Release|Win32.Build.0 = Release|Win32
+               {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83A}.Release|x64.ActiveCfg = Release|x64
+               {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83A}.Release|x64.Build.0 = Release|x64
                {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B}.Debug|Win32.ActiveCfg = Debug|Win32
                {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B}.Debug|Win32.Build.0 = Debug|Win32
+               {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B}.Debug|x64.ActiveCfg = Debug|x64
+               {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B}.Debug|x64.Build.0 = Debug|x64
                {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B}.Release|Win32.ActiveCfg = Release|Win32
                {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B}.Release|Win32.Build.0 = Release|Win32
+               {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B}.Release|x64.ActiveCfg = Release|x64
+               {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B}.Release|x64.Build.0 = Release|x64
                {F13141B6-6C87-40BB-8D4E-5CC56EBB4C5A}.Debug|Win32.ActiveCfg = Debug|Win32
                {F13141B6-6C87-40BB-8D4E-5CC56EBB4C5A}.Debug|Win32.Build.0 = Debug|Win32
+               {F13141B6-6C87-40BB-8D4E-5CC56EBB4C5A}.Debug|x64.ActiveCfg = Debug|x64
+               {F13141B6-6C87-40BB-8D4E-5CC56EBB4C5A}.Debug|x64.Build.0 = Debug|x64
                {F13141B6-6C87-40BB-8D4E-5CC56EBB4C5A}.Release|Win32.ActiveCfg = Release|Win32
                {F13141B6-6C87-40BB-8D4E-5CC56EBB4C5A}.Release|Win32.Build.0 = Release|Win32
+               {F13141B6-6C87-40BB-8D4E-5CC56EBB4C5A}.Release|x64.ActiveCfg = Release|x64
+               {F13141B6-6C87-40BB-8D4E-5CC56EBB4C5A}.Release|x64.Build.0 = Release|x64
                {F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Debug|Win32.ActiveCfg = Debug|Win32
                {F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Debug|Win32.Build.0 = Debug|Win32
+               {F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Debug|x64.ActiveCfg = Debug|x64
+               {F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Debug|x64.Build.0 = Debug|x64
                {F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Release|Win32.ActiveCfg = Release|Win32
                {F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Release|Win32.Build.0 = Release|Win32
+               {F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Release|x64.ActiveCfg = Release|x64
+               {F13141B6-6C87-40BB-8D4E-5CC56EBB4C59}.Release|x64.Build.0 = Release|x64
                {8CF7DDFA-EAA0-416E-853E-3DCB210C4AE0}.Debug|Win32.ActiveCfg = Debug|Win32
                {8CF7DDFA-EAA0-416E-853E-3DCB210C4AE0}.Debug|Win32.Build.0 = Debug|Win32
+               {8CF7DDFA-EAA0-416E-853E-3DCB210C4AE0}.Debug|x64.ActiveCfg = Debug|x64
                {8CF7DDFA-EAA0-416E-853E-3DCB210C4AE0}.Release|Win32.ActiveCfg = Release|Win32
                {8CF7DDFA-EAA0-416E-853E-3DCB210C4AE0}.Release|Win32.Build.0 = Release|Win32
+               {8CF7DDFA-EAA0-416E-853E-3DCB210C4AE0}.Release|x64.ActiveCfg = Release|x64
                {B2423DCE-048D-4BAA-9AB9-F5D1FCDD3D25}.Debug|Win32.ActiveCfg = Debug|Win32
                {B2423DCE-048D-4BAA-9AB9-F5D1FCDD3D25}.Debug|Win32.Build.0 = Debug|Win32
+               {B2423DCE-048D-4BAA-9AB9-F5D1FCDD3D25}.Debug|x64.ActiveCfg = Debug|x64
                {B2423DCE-048D-4BAA-9AB9-F5D1FCDD3D25}.Release|Win32.ActiveCfg = Release|Win32
                {B2423DCE-048D-4BAA-9AB9-F5D1FCDD3D25}.Release|Win32.Build.0 = Release|Win32
+               {B2423DCE-048D-4BAA-9AB9-F5D1FCDD3D25}.Release|x64.ActiveCfg = Release|x64
+               {666A63A7-983F-4C19-8411-207F24305198}.Debug|Win32.ActiveCfg = Debug|Win32
+               {666A63A7-983F-4C19-8411-207F24305198}.Debug|x64.ActiveCfg = Debug|x64
+               {666A63A7-983F-4C19-8411-207F24305198}.Release|Win32.ActiveCfg = Release|Win32
+               {666A63A7-983F-4C19-8411-207F24305198}.Release|x64.ActiveCfg = Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
@@ -230,6 +295,7 @@ Global
                {666A63A7-983F-4C19-8411-207F24305197} = {96AE4FC9-45EF-4C18-9F3B-EDA439E26E4C}
                {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83A} = {96AE4FC9-45EF-4C18-9F3B-EDA439E26E4C}
                {26D4FABF-ACDE-4947-9C4A-7AE1B50CD83B} = {96AE4FC9-45EF-4C18-9F3B-EDA439E26E4C}
+               {666A63A7-983F-4C19-8411-207F24305198} = {96AE4FC9-45EF-4C18-9F3B-EDA439E26E4C}
                {F13141B6-6C87-40BB-8D4E-5CC56EBB4C5A} = {FED80230-119E-4B2F-9F53-D2660A5F022B}
                {F13141B6-6C87-40BB-8D4E-5CC56EBB4C59} = {FED80230-119E-4B2F-9F53-D2660A5F022B}
                {8CF7DDFA-EAA0-416E-853E-3DCB210C4AE0} = {8E1AF2CF-24E1-4983-8681-394D89DF9AD2}
index 0335f39..602bba9 100644 (file)
@@ -44,7 +44,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -106,6 +106,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -191,6 +193,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index 175e433..cbc2a53 100644 (file)
@@ -11,6 +11,9 @@
                <Platform\r
                        Name="Win32"\r
                />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
        </Platforms>\r
        <ToolFiles>\r
        </ToolFiles>\r
                                OutputFile="$(OutDir)\$(ProjectName).so"\r
                                LinkIncremental="1"\r
                                AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(ConfigurationName)"\r
-                               GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                OptimizeReferences="2"\r
                                EnableCOMDATFolding="2"\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;SHIBSP_LITE"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="SHIBSP_LITE;_DEBUG"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1D.lib xerces-c_2D.lib xmltooling-lite1D.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName).so"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;SHIBSP_LITE"\r
+                               RuntimeLibrary="2"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="SHIBSP_LITE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1.lib xerces-c_2.lib xmltooling-lite1.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName).so"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
        </Configurations>\r
        <References>\r
        </References>\r
index b900bdc..0dd273b 100644 (file)
@@ -34,6 +34,8 @@
 # define ADFS_EXPORTS
 #endif
 
+#include <memory>
+
 #include <shibsp/base.h>
 #include <shibsp/exceptions.h>
 #include <shibsp/Application.h>
@@ -51,6 +53,7 @@
 
 #ifndef SHIBSP_LITE
 # include <shibsp/attribute/resolver/ResolutionContext.h>
+# include <shibsp/metadata/MetadataProviderCriteria.h>
 # include <saml/SAMLConfig.h>
 # include <saml/saml1/core/Assertions.h>
 # include <saml/saml1/profile/AssertionValidator.h>
@@ -178,7 +181,7 @@ namespace {
 #endif
     };
 
-    class SHIBSP_DLLLOCAL ADFSLogoutInitiator : public AbstractHandler, public RemotedHandler
+    class SHIBSP_DLLLOCAL ADFSLogoutInitiator : public AbstractHandler, public LogoutHandler
     {
     public:
         ADFSLogoutInitiator(const DOMElement* e, const char* appId)
@@ -214,7 +217,7 @@ namespace {
 #endif
 
     private:
-        pair<bool,long> doRequest(const Application& application, const char* entityID, HTTPResponse& httpResponse) const;
+        pair<bool,long> doRequest(const Application& application, const HTTPRequest& httpRequest, HTTPResponse& httpResponse, Session* session) const;
 
         string m_appId;
         auto_ptr_XMLCh m_binding;
@@ -453,7 +456,7 @@ pair<bool,long> ADFSSessionInitiator::doRequest(
     // Use metadata to invoke the SSO service directly.
     MetadataProvider* m=app.getMetadataProvider();
     Locker locker(m);
-    MetadataProvider::Criteria mc(entityID, &IDPSSODescriptor::ELEMENT_QNAME, m_binding.get());
+    MetadataProviderCriteria mc(app, entityID, &IDPSSODescriptor::ELEMENT_QNAME, m_binding.get());
     pair<const EntityDescriptor*,const RoleDescriptor*> entity=m->getEntityDescriptor(mc);
     if (!entity.first) {
         m_log.warn("unable to locate metadata for provider (%s)", entityID);
@@ -540,8 +543,10 @@ XMLObject* ADFSDecoder::decode(string& relayState, const GenericRequest& generic
     auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true));
     janitor.release();
 
-    if (!XMLHelper::isNodeNamed(xmlObject->getDOM(), m_ns.get(), RequestSecurityTokenResponse))
+    if (!XMLString::equals(xmlObject->getElementQName().getLocalPart(), RequestSecurityTokenResponse)) {
+       log.error("unrecognized root element on message: %s", xmlObject->getElementQName().toString().c_str());
         throw BindingException("Decoded message was not of the appropriate type.");
+    }
 
     if (!policy.getValidating())
         SchemaValidators.validate(xmlObject.get());
@@ -569,13 +574,21 @@ void ADFSConsumer::implementProtocol(
     const ElementProxy* response = dynamic_cast<const ElementProxy*>(&xmlObject);
     if (!response || !response->hasChildren())
         throw FatalProfileException("Incoming message was not of the proper type or contains no security token.");
-    response = dynamic_cast<const ElementProxy*>(response->getUnknownXMLObjects().front());
-    if (!response || !response->hasChildren())
-        throw FatalProfileException("Token wrapper element did not contain a security token.");
-    const Assertion* token = dynamic_cast<const Assertion*>(response->getUnknownXMLObjects().front());
-    if (!token || !token->getSignature())
-        throw FatalProfileException("Incoming message did not contain a signed SAML assertion.");
-
+    
+    const Assertion* token = NULL;
+    for (vector<XMLObject*>::const_iterator xo = response->getUnknownXMLObjects().begin(); xo != response->getUnknownXMLObjects().end(); ++xo) {
+       // Look for the RequestedSecurityToken element.
+       if (XMLString::equals((*xo)->getElementQName().getLocalPart(), RequestedSecurityToken)) {
+           response = dynamic_cast<const ElementProxy*>(*xo);
+           if (!response || !response->hasChildren())
+               throw FatalProfileException("Token wrapper element did not contain a security token.");
+           token = dynamic_cast<const Assertion*>(response->getUnknownXMLObjects().front());
+           if (!token || !token->getSignature())
+               throw FatalProfileException("Incoming message did not contain a signed SAML assertion.");
+           break;
+       }
+    }
+    
     // Extract message and issuer details from assertion.
     extractMessageDetails(*token, m_protocol.get(), policy);
 
@@ -761,15 +774,14 @@ pair<bool,long> ADFSLogoutInitiator::run(SPRequest& request, bool isHandler) con
 
     if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
         // When out of process, we run natively.
-        return doRequest(request.getApplication(), entityID.c_str(), request);
+        return doRequest(request.getApplication(), request, request, session);
     }
     else {
         // When not out of process, we remote the request.
-        Locker locker(session, false);
-        DDF out,in(m_address.c_str());
+        session->unlock();
+        vector<string> headers(1,"Cookie");
+        DDF out,in = wrap(request,&headers);
         DDFJanitor jin(in), jout(out);
-        in.addmember("application_id").string(request.getApplication().getId());
-        in.addmember("entity_id").string(entityID.c_str());
         out=request.getServiceProvider().getListenerService()->send(in);
         return unwrap(request, out);
     }
@@ -778,6 +790,10 @@ pair<bool,long> ADFSLogoutInitiator::run(SPRequest& request, bool isHandler) con
 void ADFSLogoutInitiator::receive(DDF& in, ostream& out)
 {
 #ifndef SHIBSP_LITE
+    // Defer to base class for notifications
+    if (in["notify"].integer() == 1)
+        return LogoutHandler::receive(in, out);
+
     // Find application.
     const char* aid=in["application_id"].string();
     const Application* app=aid ? SPConfig::getConfig().getServiceProvider()->getApplication(aid) : NULL;
@@ -787,59 +803,103 @@ void ADFSLogoutInitiator::receive(DDF& in, ostream& out)
         throw ConfigurationException("Unable to locate application for logout, deleted?");
     }
     
+    // Unpack the request.
+    auto_ptr<HTTPRequest> req(getRequest(in));
+
     // Set up a response shim.
     DDF ret(NULL);
     DDFJanitor jout(ret);
     auto_ptr<HTTPResponse> resp(getResponse(ret));
     
-    // Since we're remoted, the result should either be a throw, which we pass on,
-    // a false/0 return, which we just return as an empty structure, or a response/redirect,
-    // which we capture in the facade and send back.
-    doRequest(*app, in["entity_id"].string(), *resp.get());
+    Session* session = NULL;
+    try {
+         session = app->getServiceProvider().getSessionCache()->find(*app, *req.get(), NULL, NULL);
+    }
+    catch (exception& ex) {
+        m_log.error("error accessing current session: %s", ex.what());
+    }
 
+    // With no session, we just skip the request and let it fall through to an empty struct return.
+    if (session) {
+        if (session->getEntityID()) {
+            // Since we're remoted, the result should either be a throw, which we pass on,
+            // a false/0 return, which we just return as an empty structure, or a response/redirect,
+            // which we capture in the facade and send back.
+            doRequest(*app, *req.get(), *resp.get(), session);
+        }
+        else {
+             m_log.error("no issuing entityID found in session");
+             session->unlock();
+             app->getServiceProvider().getSessionCache()->remove(*app, *req.get(), resp.get());
+        }
+    }
     out << ret;
 #else
     throw ConfigurationException("Cannot perform logout using lite version of shibsp library.");
 #endif
 }
 
-pair<bool,long> ADFSLogoutInitiator::doRequest(const Application& application, const char* entityID, HTTPResponse& response) const
+pair<bool,long> ADFSLogoutInitiator::doRequest(
+    const Application& application, const HTTPRequest& httpRequest, HTTPResponse& httpResponse, Session* session
+    ) const
 {
+    // Do back channel notification.
+    vector<string> sessions(1, session->getID());
+    if (!notifyBackChannel(application, httpRequest.getRequestURL(), sessions, false)) {
+        session->unlock();
+        application.getServiceProvider().getSessionCache()->remove(application, httpRequest, &httpResponse);
+        return sendLogoutPage(application, httpRequest, httpResponse, true, "Partial logout failure.");
+    }
+
 #ifndef SHIBSP_LITE
-    try {
-        if (!entityID)
-            throw ConfigurationException("Missing entityID parameter.");
+    pair<bool,long> ret = make_pair(false,0L);
 
+    try {
         // With a session in hand, we can create a request message, if we can find a compatible endpoint.
         MetadataProvider* m=application.getMetadataProvider();
-        Locker locker(m);
-        MetadataProvider::Criteria mc(entityID, &IDPSSODescriptor::ELEMENT_QNAME, m_binding.get());
+        Locker metadataLocker(m);
+        MetadataProviderCriteria mc(application, session->getEntityID(), &IDPSSODescriptor::ELEMENT_QNAME, m_binding.get());
         pair<const EntityDescriptor*,const RoleDescriptor*> entity=m->getEntityDescriptor(mc);
-        if (!entity.first)
-            throw MetadataException("Unable to locate metadata for identity provider ($entityID)", namedparams(1, "entityID", entityID));
-        else if (!entity.second)
-            throw MetadataException("Unable to locate ADFS IdP role for identity provider ($entityID).", namedparams(1, "entityID", entityID));
-
+        if (!entity.first) {
+            throw MetadataException(
+                "Unable to locate metadata for identity provider ($entityID)", namedparams(1, "entityID", session->getEntityID())
+                );
+        }
+        else if (!entity.second) {
+            throw MetadataException(
+                "Unable to locate ADFS IdP role for identity provider ($entityID).", namedparams(1, "entityID", session->getEntityID())
+                );
+        }
+        
         const EndpointType* ep = EndpointManager<SingleLogoutService>(
             dynamic_cast<const IDPSSODescriptor*>(entity.second)->getSingleLogoutServices()
             ).getByBinding(m_binding.get());
         if (!ep) {
             throw MetadataException(
-                "Unable to locate ADFS single logout service for identity provider ($entityID).",
-                namedparams(1, "entityID", entityID)
+                "Unable to locate ADFS single logout service for identity provider ($entityID).", namedparams(1, "entityID", session->getEntityID())
                 );
         }
 
+        const URLEncoder* urlenc = XMLToolingConfig::getConfig().getURLEncoder();
+        const char* returnloc = httpRequest.getParameter("return");
         auto_ptr_char dest(ep->getLocation());
-
         string req=string(dest.get()) + (strchr(dest.get(),'?') ? '&' : '?') + "wa=wsignout1.0";
-        return make_pair(true,response.sendRedirect(req.c_str()));
+        if (returnloc)
+            req += "&wreply=" + urlenc->encode(returnloc);
+        ret.second = httpResponse.sendRedirect(req.c_str());
+        ret.first = true;
     }
     catch (exception& ex) {
         m_log.error("error issuing ADFS logout request: %s", ex.what());
     }
 
-    return make_pair(false,0L);
+    if (session) {
+        session->unlock();
+        session = NULL;
+        application.getServiceProvider().getSessionCache()->remove(application, httpRequest, &httpResponse);
+    }
+
+    return ret;
 #else
     throw ConfigurationException("Cannot perform logout using lite version of shibsp library.");
 #endif
index 11fc309..7cd4e1b 100644 (file)
@@ -54,8 +54,8 @@ END
 //\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 2,0,0,0\r
- PRODUCTVERSION 2,0,0,0\r
+ FILEVERSION 2,1,0,0\r
+ PRODUCTVERSION 2,1,0,0\r
  FILEFLAGSMASK 0x3fL\r
 #ifdef _DEBUG\r
  FILEFLAGS 0x1L\r
@@ -72,14 +72,14 @@ BEGIN
         BEGIN\r
             VALUE "Comments", "\0"\r
             VALUE "CompanyName", "Internet2\0"\r
-            VALUE "FileDescription", "Shibboleth 2.0 ADFSv1 Plugin\0"\r
-            VALUE "FileVersion", "2, 0, 0, 0\0"\r
+            VALUE "FileDescription", "Shibboleth ADFSv1 Plugin\0"\r
+            VALUE "FileVersion", "2, 1, 0, 0\0"\r
 #ifdef SHIBSP_LITE\r
             VALUE "InternalName", "adfs-lite\0"\r
 #else\r
             VALUE "InternalName", "adfs\0"\r
 #endif\r
-            VALUE "LegalCopyright", "Copyright Â© 2007 Internet2\0"\r
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"\r
             VALUE "LegalTrademarks", "\0"\r
 #ifdef SHIBSP_LITE\r
             VALUE "OriginalFilename", "adfs-lite.so\0"\r
@@ -87,8 +87,8 @@ BEGIN
             VALUE "OriginalFilename", "adfs.so\0"\r
 #endif\r
             VALUE "PrivateBuild", "\0"\r
-            VALUE "ProductName", "Shibboleth 2.0\0"\r
-            VALUE "ProductVersion", "2, 0, 0, 0\0"\r
+            VALUE "ProductName", "Shibboleth 2.1\0"\r
+            VALUE "ProductVersion", "2, 1, 0, 0\0"\r
             VALUE "SpecialBuild", "\0"\r
         END\r
     END\r
index ab677ff..efb995f 100644 (file)
@@ -11,6 +11,9 @@
                <Platform\r
                        Name="Win32"\r
                />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
        </Platforms>\r
        <ToolFiles>\r
        </ToolFiles>\r
                                OutputFile="$(OutDir)\$(ProjectName).so"\r
                                LinkIncremental="1"\r
                                AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(ConfigurationName);..\..\cpp-xmltooling\$(ConfigurationName)"\r
-                               GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                OptimizeReferences="2"\r
                                EnableCOMDATFolding="2"\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-opensaml2&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1D.lib xerces-c_2D.lib saml2D.lib xmltooling1D.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName).so"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(PlatformName)\$(ConfigurationName);..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-opensaml2&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"\r
+                               RuntimeLibrary="2"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1.lib xerces-c_2.lib saml2.lib xmltooling1.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName).so"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(PlatformName)\$(ConfigurationName);..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
        </Configurations>\r
        <References>\r
        </References>\r
index ca5a2ed..8d3aece 100644 (file)
@@ -44,7 +44,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -128,6 +128,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -213,6 +215,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index cbc0dbf..4fd81e8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * mod_apache.cpp
- * 
+ *
  * Apache module implementation
  */
 
 #include <apr_pools.h>
 #endif
 
+#include <memory>
 #include <fstream>
 #include <sstream>
+#include <stdexcept>
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>            // for getpid()
@@ -544,7 +546,7 @@ extern "C" int shib_check_user(request_rec* r)
   // Short-circuit entirely?
   if (((shib_dir_config*)ap_get_module_config(r->per_dir_config, &mod_shib))->bOff==1)
     return DECLINED;
-    
+
   ap_log_rerror(APLOG_MARK,APLOG_DEBUG|APLOG_NOERRNO,SH_AP_R(r), "shib_check_user(%d): ENTER", (int)getpid());
 
   ostringstream threadid;
@@ -687,7 +689,7 @@ public:
     Lockable* lock() { return m_mapper->lock(); }
     void unlock() { m_staKey->setData(NULL); m_propsKey->setData(NULL); m_mapper->unlock(); }
     Settings getSettings(const HTTPRequest& request) const;
-    
+
     const PropertySet* getParent() const { return NULL; }
     void setParent(const PropertySet*) {}
     pair<bool,bool> getBool(const char* name, const char* ns=NULL) const;
@@ -943,7 +945,7 @@ AccessControl::aclresult_t htAccessControl::authorized(const SPRequest& request,
     int m=sta->m_req->method_number;
     bool method_restricted=false;
     const char *t, *w;
-    
+
     const array_header* reqs_arr=ap_requires(sta->m_req);
     if (!reqs_arr)
         return shib_acl_indeterminate;  // should never happen
@@ -1027,7 +1029,7 @@ AccessControl::aclresult_t htAccessControl::authorized(const SPRequest& request,
                     request.log(SPRequest::SPDebug,string("htaccess plugin using groups file: ") + sta->m_dc->szAuthGrpFile);
                 grpstatus=groups_for_user(sta->m_req,remote_user.c_str(),sta->m_dc->szAuthGrpFile);
             }
-    
+
             bool negate=false;
             while (*t) {
                 w=ap_getword_conf(sta->m_req->pool,&t);
@@ -1112,7 +1114,7 @@ AccessControl::aclresult_t htAccessControl::authorized(const SPRequest& request,
                         auto_ptr<xercesc::RegularExpression> temp(new xercesc::RegularExpression(trans.get()));
                         re=temp;
                     }
-                    
+
                     for (; !status && attrs.first!=attrs.second; ++attrs.first) {
                         if (checkAttribute(request, attrs.first->second, w, regexp ? re.get() : NULL)) {
                             status = true;
@@ -1235,7 +1237,7 @@ extern "C" apr_status_t shib_exit(void* data)
 }
 #endif
 
-/* 
+/*
  * shire_child_init()
  *  Things to do when the child process is initialized.
  *  (or after the configs are read in apache-2)
@@ -1271,21 +1273,9 @@ extern "C" void shib_child_init(apr_pool_t* p, server_rec* s)
     g_Config->AccessControlManager.registerFactory(HT_ACCESS_CONTROL,&htAccessFactory);
     g_Config->RequestMapperManager.registerFactory(NATIVE_REQUEST_MAPPER,&ApacheRequestMapFactory);
 
-    if (!g_szSHIBConfig)
-        g_szSHIBConfig=getenv("SHIBSP_CONFIG");
-    if (!g_szSHIBConfig)
-        g_szSHIBConfig=SHIBSP_CONFIG;
-    
     try {
-        xercesc::DOMDocument* dummydoc=XMLToolingConfig::getConfig().getParser().newDocument();
-        XercesJanitor<xercesc::DOMDocument> docjanitor(dummydoc);
-        xercesc::DOMElement* dummy = dummydoc->createElementNS(NULL,path);
-        auto_ptr_XMLCh src(g_szSHIBConfig);
-        dummy->setAttributeNS(NULL,path,src.get());
-        dummy->setAttributeNS(NULL,validate,xmlconstants::XML_ONE);
-
-        g_Config->setServiceProvider(g_Config->ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER,dummy));
-        g_Config->getServiceProvider()->init();
+        if (!g_Config->instantiate(g_szSHIBConfig, true))
+            throw runtime_error("unknown error");
     }
     catch (exception& ex) {
         ap_log_error(APLOG_MARK,APLOG_CRIT|APLOG_NOERRNO,SH_AP_R(s),ex.what());
@@ -1382,13 +1372,11 @@ static command_rec shire_cmds[] = {
    RSRC_CONF, TAKE1, "Path to shibboleth.xml config file"},
   {"ShibCatalogs", (config_fn_t)ap_set_global_string_slot, &g_szSchemaDir,
    RSRC_CONF, TAKE1, "Paths of XML schema catalogs"},
-  {"ShibSchemaDir", (config_fn_t)ap_set_global_string_slot, &g_szSchemaDir,
-   RSRC_CONF, TAKE1, "Paths of XML schema catalogs (deprecated in favor of ShibCatalogs)"},
 
   {"ShibURLScheme", (config_fn_t)shib_set_server_string_slot,
    (void *) XtOffsetOf (shib_server_config, szScheme),
    RSRC_CONF, TAKE1, "URL scheme to force into generated URLs for a vhost"},
-   
+
   {"ShibRequestSetting", (config_fn_t)shib_table_set, NULL,
    OR_AUTHCFG, TAKE2, "Set arbitrary Shibboleth request property for content"},
 
@@ -1488,8 +1476,6 @@ static command_rec shib_cmds[] = {
         RSRC_CONF, "Path to shibboleth.xml config file"),
     AP_INIT_TAKE1("ShibCatalogs", (config_fn_t)ap_set_global_string_slot, &g_szSchemaDir,
         RSRC_CONF, "Paths of XML schema catalogs"),
-    AP_INIT_TAKE1("ShibSchemaDir", (config_fn_t)ap_set_global_string_slot, &g_szSchemaDir,
-        RSRC_CONF, "Paths of XML schema catalogs (deprecated in favor of ShibCatalogs)"),
 
     AP_INIT_TAKE1("ShibURLScheme", (config_fn_t)shib_set_server_string_slot,
         (void *) offsetof (shib_server_config, szScheme),
index c259b88..5f207f4 100644 (file)
@@ -9,6 +9,9 @@
                <Platform
                        Name="Win32"
                />
+               <Platform
+                       Name="x64"
+               />
        </Platforms>
        <ToolFiles>
        </ToolFiles>
@@ -76,8 +79,6 @@
                                LinkIncremental="1"
                                SuppressStartupBanner="true"
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;;\Apache\libexec"
-                               ProgramDatabaseFile=".\Release/mod_shib_13.pdb"
-                               ImportLibrary=".\Release/mod_shib_13.lib"
                                TargetMachine="1"
                        />
                        <Tool
                                SuppressStartupBanner="true"
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;;\Apache\libexec"
                                GenerateDebugInformation="true"
-                               ImportLibrary=".\Debug/mod_shib_13.lib"
                                TargetMachine="1"
                        />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+                       ConfigurationType="2"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               MkTypLibCompatible="true"
+                               SuppressStartupBanner="true"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\Release/mod_shib13.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               InlineFunctionExpansion="1"
+                               AdditionalIncludeDirectories="..;\Apache\include;&quot;..\..\cpp-xmltooling&quot;"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;EAPI"
+                               StringPooling="true"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="xerces-c_2.lib ApacheCore.lib xmltooling-lite1.lib"
+                               OutputFile="$(OutDir)\mod_shib_13.so"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;;\Apache\libexec"
+                               ProgramDatabaseFile=".\Release/mod_shib_13.pdb"
+                               TargetMachine="17"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+                       ConfigurationType="2"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               MkTypLibCompatible="true"
+                               SuppressStartupBanner="true"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\Debug/mod_shib13.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="..;\Apache\include;&quot;..\..\cpp-xmltooling&quot;"
+                               PreprocessorDefinitions="_WINDOWS;EAPI;WIN32;_DEBUG"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="xerces-c_2D.lib ApacheCore.lib xmltooling-lite1D.lib"
+                               OutputFile="$(OutDir)\mod_shib_13.so"
+                               LinkIncremental="2"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;;\Apache\libexec"
+                               GenerateDebugInformation="true"
+                               TargetMachine="17"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
        </Configurations>
        <References>
        </References>
                                        Name="VCCLCompilerTool"
                                />
                        </FileConfiguration>
+                       <FileConfiguration
+                               Name="Release|x64"
+                               ExcludedFromBuild="true"
+                               >
+                               <Tool
+                                       Name="VCCLCompilerTool"
+                               />
+                       </FileConfiguration>
+                       <FileConfiguration
+                               Name="Debug|x64"
+                               ExcludedFromBuild="true"
+                               >
+                               <Tool
+                                       Name="VCCLCompilerTool"
+                               />
+                       </FileConfiguration>
                </File>
                <File
                        RelativePath="mod_shib_13.cpp"
index 149615d..237bd70 100644 (file)
@@ -9,6 +9,9 @@
                <Platform
                        Name="Win32"
                />
+               <Platform
+                       Name="x64"
+               />
        </Platforms>
        <ToolFiles>
        </ToolFiles>
@@ -16,7 +19,7 @@
                <Configuration
                        Name="Release|Win32"
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-                       IntermediateDirectory=".\mod_shib20___Win32_$(ConfigurationName)"
+                       IntermediateDirectory="$(ProjectName)-$(ConfigurationName)"
                        ConfigurationType="2"
                        InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
                        UseOfMFC="0"
@@ -77,8 +80,6 @@
                                LinkIncremental="1"
                                SuppressStartupBanner="true"
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;;\Apache2\lib"
-                               ProgramDatabaseFile=".\mod_shib20___Win32_Release/mod_shib_20.pdb"
-                               ImportLibrary=".\mod_shib20___Win32_Release/mod_shib_20.lib"
                                TargetMachine="1"
                        />
                        <Tool
                <Configuration
                        Name="Debug|Win32"
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-                       IntermediateDirectory=".\mod_shib20___Win32_$(ConfigurationName)"
+                       IntermediateDirectory="$(ProjectName)-$(ConfigurationName)"
                        ConfigurationType="2"
                        InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
                        UseOfMFC="0"
                                SuppressStartupBanner="true"
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;;\Apache2\lib"
                                GenerateDebugInformation="true"
-                               ImportLibrary=".\mod_shib20___Win32_Debug/mod_shib_20.lib"
                                TargetMachine="1"
                        />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"
+                       ConfigurationType="2"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               MkTypLibCompatible="true"
+                               SuppressStartupBanner="true"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\mod_shib20___Win32_Release/mod_shib20.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               InlineFunctionExpansion="1"
+                               AdditionalIncludeDirectories="..;\Apache2\include;&quot;..\..\cpp-xmltooling&quot;"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
+                               StringPooling="true"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               RuntimeTypeInfo="true"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="xerces-c_2.lib libapr.lib libaprutil.lib libhttpd.lib xmltooling-lite1.lib"
+                               OutputFile="$(OutDir)\mod_shib_20.so"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;;\Apache2\lib"
+                               ProgramDatabaseFile=".\mod_shib20___Win32_Release/mod_shib_20.pdb"
+                               TargetMachine="17"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"
+                       ConfigurationType="2"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               MkTypLibCompatible="true"
+                               SuppressStartupBanner="true"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\mod_shib20___Win32_Debug/mod_shib20.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="..;\Apache2\include;&quot;..\..\cpp-xmltooling&quot;"
+                               PreprocessorDefinitions="_WINDOWS;WIN32;_DEBUG"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               RuntimeTypeInfo="true"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="xerces-c_2D.lib libapr.lib libaprutil.lib libhttpd.lib xmltooling-lite1D.lib"
+                               OutputFile="$(OutDir)\mod_shib_20.so"
+                               LinkIncremental="2"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;;\Apache2\lib"
+                               GenerateDebugInformation="true"
+                               TargetMachine="17"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
        </Configurations>
        <References>
        </References>
                                        Name="VCCLCompilerTool"
                                />
                        </FileConfiguration>
+                       <FileConfiguration
+                               Name="Release|x64"
+                               ExcludedFromBuild="true"
+                               >
+                               <Tool
+                                       Name="VCCLCompilerTool"
+                               />
+                       </FileConfiguration>
+                       <FileConfiguration
+                               Name="Debug|x64"
+                               ExcludedFromBuild="true"
+                               >
+                               <Tool
+                                       Name="VCCLCompilerTool"
+                               />
+                       </FileConfiguration>
                </File>
                <File
                        RelativePath="mod_shib_20.cpp"
index c08f802..81ed0da 100644 (file)
@@ -9,6 +9,9 @@
                <Platform\r
                        Name="Win32"\r
                />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
        </Platforms>\r
        <ToolFiles>\r
        </ToolFiles>\r
@@ -16,7 +19,7 @@
                <Configuration\r
                        Name="Release|Win32"\r
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
-                       IntermediateDirectory=".\mod_shib22___Win32_$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ProjectName)-$(ConfigurationName)"\r
                        ConfigurationType="2"\r
                        InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
                        UseOfMFC="0"\r
@@ -76,8 +79,6 @@
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;;\Apache2.2\lib"\r
-                               ProgramDatabaseFile=".\mod_shib22___Win32_Release/mod_shib_22.pdb"\r
-                               ImportLibrary=".\mod_shib22___Win32_Release/mod_shib_22.lib"\r
                                TargetMachine="1"\r
                        />\r
                        <Tool\r
@@ -92,7 +93,6 @@
                        <Tool\r
                                Name="VCBscMakeTool"\r
                                SuppressStartupBanner="true"\r
-                               OutputFile=".\mod_shib22___Win32_Release/mod_shib22.bsc"\r
                        />\r
                        <Tool\r
                                Name="VCFxCopTool"\r
                <Configuration\r
                        Name="Debug|Win32"\r
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
-                       IntermediateDirectory=".\mod_shib22___Win32_$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ProjectName)-$(ConfigurationName)"\r
                        ConfigurationType="2"\r
                        InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
                        UseOfMFC="0"\r
                                SuppressStartupBanner="true"\r
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;;\Apache2.2\lib"\r
                                GenerateDebugInformation="true"\r
-                               ProgramDatabaseFile=".\mod_shib22___Win32_Debug/mod_shib_22.pdb"\r
-                               ImportLibrary=".\mod_shib22___Win32_Debug/mod_shib_22.lib"\r
                                TargetMachine="1"\r
                        />\r
                        <Tool\r
                        <Tool\r
                                Name="VCBscMakeTool"\r
                                SuppressStartupBanner="true"\r
-                               OutputFile=".\mod_shib22___Win32_Debug/mod_shib22.bsc"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName=".\mod_shib22___Win32_Release/mod_shib22.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..;\Apache2.2\include;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               RuntimeTypeInfo="true"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="xerces-c_2.lib xmltooling-lite1.lib libapr-1.lib libaprutil-1.lib libhttpd.lib"\r
+                               OutputFile="$(OutDir)\mod_shib_22.so"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;;&quot;C:\httpd-2.2-x64\lib&quot;"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName=".\mod_shib22___Win32_Debug/mod_shib22.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..;\Apache2.2\include;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               RuntimeTypeInfo="true"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="xerces-c_2D.lib xmltooling-lite1D.lib libapr-1.lib libaprutil-1.lib libhttpd.lib"\r
+                               OutputFile="$(OutDir)\mod_shib_22.so"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;;&quot;C:\httpd-2.2-x64\lib&quot;"\r
+                               GenerateDebugInformation="true"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               SuppressStartupBanner="true"\r
                        />\r
                        <Tool\r
                                Name="VCFxCopTool"\r
                                        Name="VCCLCompilerTool"\r
                                />\r
                        </FileConfiguration>\r
+                       <FileConfiguration\r
+                               Name="Release|x64"\r
+                               ExcludedFromBuild="true"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCCLCompilerTool"\r
+                               />\r
+                       </FileConfiguration>\r
+                       <FileConfiguration\r
+                               Name="Debug|x64"\r
+                               ExcludedFromBuild="true"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCCLCompilerTool"\r
+                               />\r
+                       </FileConfiguration>\r
                </File>\r
                <File\r
                        RelativePath="mod_shib_22.cpp"\r
index a352d58..e6939bb 100644 (file)
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,0
- PRODUCTVERSION 2,0,0,0
+ FILEVERSION 2,1,0,0
+ PRODUCTVERSION 2,1,0,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -47,14 +47,14 @@ BEGIN
             VALUE "Comments", "\0"
             VALUE "CompanyName", "Internet2\0"
             VALUE "FileDescription", "Shibboleth Apache 1.3 Module\0"
-            VALUE "FileVersion", "2, 0, 0, 0\0"
+            VALUE "FileVersion", "2, 1, 0, 0\0"
             VALUE "InternalName", "mod_shib_13\0"
-            VALUE "LegalCopyright", "Copyright Â© 2007 Internet2\0"
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "mod_shib_13.so\0"
             VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Shibboleth 2.0\0"
-            VALUE "ProductVersion", "2, 0, 0, 0\0"
+            VALUE "ProductName", "Shibboleth 2.1\0"
+            VALUE "ProductVersion", "2, 1, 0, 0\0"
             VALUE "SpecialBuild", "\0"
         END
     END
index ead4cdf..108338c 100644 (file)
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,0
- PRODUCTVERSION 2,0,0,0
+ FILEVERSION 2,1,0,0
+ PRODUCTVERSION 2,1,0,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -47,14 +47,14 @@ BEGIN
             VALUE "Comments", "\0"
             VALUE "CompanyName", "Internet2\0"
             VALUE "FileDescription", "Shibboleth Apache 2.0 Module\0"
-            VALUE "FileVersion", "2, 0, 0, 0\0"
+            VALUE "FileVersion", "2, 1, 0, 0\0"
             VALUE "InternalName", "mod_shib_20\0"
-            VALUE "LegalCopyright", "Copyright Â© 2007 Internet2\0"
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "mod_shib_20.so\0"
             VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Shibboleth 2.0\0"
-            VALUE "ProductVersion", "2, 0, 0, 0\0"
+            VALUE "ProductName", "Shibboleth 2.1\0"
+            VALUE "ProductVersion", "2, 1, 0, 0\0"
             VALUE "SpecialBuild", "\0"
         END
     END
index c8c44cd..ede13f4 100644 (file)
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,0
- PRODUCTVERSION 2,0,0,0
+ FILEVERSION 2,1,0,0
+ PRODUCTVERSION 2,1,0,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -47,14 +47,14 @@ BEGIN
             VALUE "Comments", "\0"
             VALUE "CompanyName", "Internet2\0"
             VALUE "FileDescription", "Shibboleth Apache 2.2 Module\0"
-            VALUE "FileVersion", "2, 0, 0, 0\0"
+            VALUE "FileVersion", "2, 1, 0, 0\0"
             VALUE "InternalName", "mod_shib_22\0"
-            VALUE "LegalCopyright", "Copyright Â© 2007 Internet2\0"
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "mod_shib_22.so\0"
             VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Shibboleth 2.0\0"
-            VALUE "ProductVersion", "2, 0, 0, 0\0"
+            VALUE "ProductName", "Shibboleth 2.1\0"
+            VALUE "ProductVersion", "2, 1, 0, 0\0"
             VALUE "SpecialBuild", "\0"
         END
     END
index 2fc3acc..917bbc5 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2003-06-17'
+timestamp='2005-07-08'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -17,13 +17,15 @@ timestamp='2003-06-17'
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+
 # Originally written by Per Bothner <per@bothner.com>.
 # Please send patches to <config-patches@gnu.org>.  Submit a context
 # diff and a properly formatted ChangeLog entry.
@@ -53,7 +55,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -66,11 +68,11 @@ Try \`$me --help' for more information."
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )        # Use stdin as input.
@@ -123,7 +125,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
        ;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -136,13 +138,6 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-## for Red Hat Linux
-if test -f /etc/redhat-release ; then
-    VENDOR=redhat ;
-else
-    VENDOR= ;
-fi
-
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -203,50 +198,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # contains redundant information, the shorter form:
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
        echo "${machine}-${os}${release}"
-       exit 0 ;;
-    amiga:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    arc:OpenBSD:*:*)
-       echo mipsel-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    hp300:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mac68k:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    macppc:OpenBSD:*:*)
-       echo powerpc-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-       echo m88k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    mvmeppc:OpenBSD:*:*)
-       echo powerpc-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    pmax:OpenBSD:*:*)
-       echo mipsel-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    sgi:OpenBSD:*:*)
-       echo mipseb-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    sun3:OpenBSD:*:*)
-       echo m68k-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-       echo mipsel-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
+       exit ;;
     *:OpenBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
     alpha:OSF1:*:*)
-       if test $UNAME_RELEASE = "V4.0"; then
+       case $UNAME_RELEASE in
+       *4.0)
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-       fi
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
        # According to Compaq, /usr/sbin/psrinfo has been available on
        # OSF/1 and Tru64 systems produced since 1995.  I hope that
        # covers most systems running today.  This code pipes the CPU
@@ -284,42 +258,49 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            "EV7.9 (21364A)")
                UNAME_MACHINE="alphaev79" ;;
        esac
+       # A Pn.n version is a patched version.
        # A Vn.n version is a released version.
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit 0 ;;
-    Alpha*:OpenVMS:*:*)
-       echo alpha-hp-vms
-       exit 0 ;;
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit ;;
     Alpha\ *:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # Should we change UNAME_MACHINE based on the output of uname instead
        # of the specific Alpha model?
        echo alpha-pc-interix
-       exit ;;
+       exit ;;
     21064:Windows_NT:50:3)
        echo alpha-dec-winnt3.5
-       exit ;;
+       exit ;;
     Amiga*:UNIX_System_V:4.0:*)
        echo m68k-unknown-sysv4
-       exit 0;;
+       exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
        echo ${UNAME_MACHINE}-unknown-amigaos
-       exit ;;
+       exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
        echo ${UNAME_MACHINE}-unknown-morphos
-       exit ;;
+       exit ;;
     *:OS/390:*:*)
        echo i370-ibm-openedition
-       exit 0 ;;
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
-       exit 0;;
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
        echo hppa1.1-hitachi-hiuxmpp
-       exit 0;;
+       exit ;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
        if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -327,32 +308,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        else
                echo pyramid-pyramid-bsd
        fi
-       exit ;;
+       exit ;;
     NILE*:*:*:dcosx)
        echo pyramid-pyramid-svr4
-       exit ;;
+       exit ;;
     DRS?6000:unix:4.0:6*)
        echo sparc-icl-nx6
-       exit ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
        case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7 && exit 0 ;;
+           sparc) echo sparc-icl-nx7; exit ;;
        esac ;;
     sun4H:SunOS:5.*:*)
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
+       exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
+       exit ;;
     i86pc:SunOS:5.*:*)
        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
+       exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
        # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
        # it's likely to be more like Solaris than SunOS4.
        echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
+       exit ;;
     sun4*:SunOS:*:*)
        case "`/usr/bin/arch -k`" in
            Series*|S4*)
@@ -361,10 +342,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        esac
        # Japanese Language versions have a version number like `4.1.3-JL'.
        echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit ;;
+       exit ;;
     sun3*:SunOS:*:*)
        echo m68k-sun-sunos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     sun*:*:4.2BSD:*)
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -376,10 +357,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                echo sparc-sun-sunos${UNAME_RELEASE}
                ;;
        esac
-       exit ;;
+       exit ;;
     aushp:SunOS:*:*)
        echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -390,37 +371,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
        echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+        exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
         echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+        exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
         echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+        exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
     powerpc:machten:*:*)
        echo powerpc-apple-machten${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     RISC*:Mach:*:*)
        echo mips-dec-mach_bsd4.3
-       exit ;;
+       exit ;;
     RISC*:ULTRIX:*:*)
        echo mips-dec-ultrix${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     VAX*:ULTRIX*:*:*)
        echo vax-dec-ultrix${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
        echo clipper-intergraph-clix${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
@@ -444,32 +428,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
          exit (-1);
        }
 EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c \
-         && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-         && exit 0
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
        echo mips-mips-riscos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     Motorola:PowerMAX_OS:*:*)
        echo powerpc-motorola-powermax
-       exit ;;
+       exit ;;
     Motorola:*:4.3:PL8-*)
        echo powerpc-harris-powermax
-       exit ;;
+       exit ;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
        echo powerpc-harris-powermax
-       exit ;;
+       exit ;;
     Night_Hawk:Power_UNIX:*:*)
        echo powerpc-harris-powerunix
-       exit ;;
+       exit ;;
     m88k:CX/UX:7*:*)
        echo m88k-harris-cxux7
-       exit ;;
+       exit ;;
     m88k:*:4*:R4*)
        echo m88k-motorola-sysv4
-       exit ;;
+       exit ;;
     m88k:*:3*:R3*)
        echo m88k-motorola-sysv3
-       exit ;;
+       exit ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -485,29 +470,29 @@ EOF
        else
            echo i586-dg-dgux${UNAME_RELEASE}
        fi
-       exit ;;
+       exit ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
        echo m88k-dolphin-sysv3
-       exit ;;
+       exit ;;
     M88*:*:R3*:*)
        # Delta 88k system running SVR3
        echo m88k-motorola-sysv3
-       exit ;;
+       exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
        echo m88k-tektronix-sysv3
-       exit ;;
+       exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
        echo m68k-tektronix-bsd
-       exit ;;
+       exit ;;
     *:IRIX*:*:*)
        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit ;;
+       exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-       echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-       exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
        echo i386-ibm-aix
-       exit ;;
+       exit ;;
     ia64:AIX:*:*)
        if [ -x /usr/bin/oslevel ] ; then
                IBM_REV=`/usr/bin/oslevel`
@@ -515,7 +500,7 @@ EOF
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-       exit ;;
+       exit ;;
     *:AIX:2:3)
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
                eval $set_cc_for_build
@@ -530,14 +515,18 @@ EOF
                        exit(0);
                        }
 EOF
-               $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-               echo rs6000-ibm-aix3.2.5
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
                echo rs6000-ibm-aix3.2.4
        else
                echo rs6000-ibm-aix3.2
        fi
-       exit ;;
+       exit ;;
     *:AIX:*:[45])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
@@ -551,28 +540,28 @@ EOF
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit ;;
+       exit ;;
     *:AIX:*:*)
        echo rs6000-ibm-aix
-       exit ;;
+       exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
        echo romp-ibm-bsd4.4
-       exit ;;
+       exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-       exit 0 ;;                           # report: romp-ibm BSD 4.3
+       exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
        echo rs6000-bull-bosx
-       exit ;;
+       exit ;;
     DPX/2?00:B.O.S.:*:*)
        echo m68k-bull-sysv3
-       exit ;;
+       exit ;;
     9000/[34]??:4.3bsd:1.*:*)
        echo m68k-hp-bsd
-       exit ;;
+       exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
        echo m68k-hp-bsd4.4
-       exit ;;
+       exit ;;
     9000/[34678]??:HP-UX:*:*)
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        case "${UNAME_MACHINE}" in
@@ -634,9 +623,19 @@ EOF
        esac
        if [ ${HP_ARCH} = "hppa2.0w" ]
        then
-           # avoid double evaluation of $set_cc_for_build
-           test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep __LP64__ >/dev/null
            then
                HP_ARCH="hppa2.0w"
            else
@@ -644,11 +643,11 @@ EOF
            fi
        fi
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit ;;
+       exit ;;
     ia64:HP-UX:*:*)
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        echo ia64-hp-hpux${HPUX_REV}
-       exit ;;
+       exit ;;
     3050*:HI-UX:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
@@ -676,150 +675,166 @@ EOF
          exit (0);
        }
 EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
        echo unknown-hitachi-hiuxwe2
-       exit ;;
+       exit ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
        echo hppa1.1-hp-bsd
-       exit ;;
+       exit ;;
     9000/8??:4.3bsd:*:*)
        echo hppa1.0-hp-bsd
-       exit ;;
+       exit ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
        echo hppa1.0-hp-mpeix
-       exit ;;
+       exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
        echo hppa1.1-hp-osf
-       exit ;;
+       exit ;;
     hp8??:OSF1:*:*)
        echo hppa1.0-hp-osf
-       exit ;;
+       exit ;;
     i*86:OSF1:*:*)
        if [ -x /usr/sbin/sysversion ] ; then
            echo ${UNAME_MACHINE}-unknown-osf1mk
        else
            echo ${UNAME_MACHINE}-unknown-osf1
        fi
-       exit ;;
+       exit ;;
     parisc*:Lites*:*:*)
        echo hppa1.1-hp-lites
-       exit ;;
+       exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
        echo c1-convex-bsd
-        exit ;;
+        exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
        else echo c2-convex-bsd
        fi
-        exit ;;
+        exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
        echo c34-convex-bsd
-        exit ;;
+        exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
        echo c38-convex-bsd
-        exit ;;
+        exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
        echo c4-convex-bsd
-        exit ;;
+        exit ;;
     CRAY*Y-MP:*:*:*)
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       exit ;;
     CRAY*[A-Z]90:*:*:*)
        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
              -e 's/\.[^.]*$/.X/'
-       exit ;;
+       exit ;;
     CRAY*TS:*:*:*)
        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       exit ;;
     CRAY*T3E:*:*:*)
        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       exit ;;
     CRAY*SV1:*:*:*)
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       exit ;;
     *:UNICOS/mp:*:*)
-       echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
-       exit ;;
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     sparc*:BSD/OS:*:*)
        echo sparc-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:BSD/OS:*:*)
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-       exit 0 ;;
-    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
-       # Determine whether the default compiler uses glibc.
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #if __GLIBC__ >= 2
-       LIBC=gnu
-       #else
-       LIBC=
-       #endif
-EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
-       exit 0 ;;
+       exit ;;
+    *:FreeBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
-       exit ;;
+       exit ;;
     i*:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
-       exit 0 ;;
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
-       exit ;;
+       exit ;;
     x86:Interix*:[34]*)
        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-       exit ;;
+       exit ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
-       exit ;;
+       exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
        # UNAME_MACHINE based on the output of uname instead of i386?
        echo i586-pc-interix
-       exit ;;
+       exit ;;
     i*:UWIN*:*)
        echo ${UNAME_MACHINE}-pc-uwin
-       exit 0 ;;
+       exit ;;
+    amd64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
     p*:CYGWIN*:*)
        echo powerpcle-unknown-cygwin
-       exit ;;
+       exit ;;
     prep*:SunOS:5.*:*)
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
+       exit ;;
     *:GNU:*:*)
+       # the GNU system
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit 0 ;;
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
-       exit ;;
+       exit ;;
     arm*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
+       exit ;;
     cris:Linux:*:*)
        echo cris-axis-linux-gnu
-       exit 0 ;;
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
-       exit 0 ;;
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
+       exit ;;
     mips:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
@@ -837,7 +852,7 @@ EOF
        #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-       test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     mips64:Linux:*:*)
        eval $set_cc_for_build
@@ -856,14 +871,14 @@ EOF
        #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-       test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     ppc:Linux:*:*)
-       echo powerpc-${VENDOR:-unknown}-linux-gnu
-       exit ;;
+       echo powerpc-unknown-linux-gnu
+       exit ;;
     ppc64:Linux:*:*)
-       echo powerpc64-${VENDOR:-unknown}-linux-gnu
-       exit ;;
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
     alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
          EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -877,7 +892,7 @@ EOF
        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-       exit ;;
+       exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -885,25 +900,25 @@ EOF
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
          *)    echo hppa-unknown-linux-gnu ;;
        esac
-       exit ;;
+       exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
        echo hppa64-unknown-linux-gnu
-       exit ;;
+       exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
-       exit ;;
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
     sh64*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
+       exit ;;
     sh*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
+       exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
+       exit ;;
     x86_64:Linux:*:*)
-       echo x86_64-${VENDOR:-unknown}-linux-gnu
-       exit ;;
+       echo x86_64-unknown-linux-gnu
+       exit ;;
     i*86:Linux:*:*)
        # The BFD linker knows what the default object file format is, so
        # first see if it will tell us. cd to the root directory to prevent
@@ -921,15 +936,15 @@ EOF
                ;;
          a.out-i386-linux)
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
+               exit ;;
          coff-i386)
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
+               exit ;;
          "")
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
                # one that does not give us useful --help.
                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-               exit ;;
+               exit ;;
        esac
        # Determine whether the default compiler is a.out or elf
        eval $set_cc_for_build
@@ -952,17 +967,23 @@ EOF
        LIBC=gnuaout
        #endif
        #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-       test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
-       test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+       test x"${LIBC}" != x && {
+               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+               exit
+       }
+       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
        ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
        # earlier versions are messed up and put the nodename in both
        # sysname and nodename.
        echo i386-sequent-sysv4
-       exit ;;
+       exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
         # Unixware is an offshoot of SVR4, but it has its own version
         # number series starting with 2...
@@ -970,24 +991,27 @@ EOF
        # I just have to hope.  -- rms.
         # Use sysv4.2uw... so that sysv4* matches it.
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-       exit ;;
+       exit ;;
     i*86:OS/2:*:*)
        # If we were able to find `uname', then EMX Unix compatibility
        # is probably installed.
        echo ${UNAME_MACHINE}-pc-os2-emx
-       exit ;;
+       exit ;;
     i*86:XTS-300:*:STOP)
        echo ${UNAME_MACHINE}-unknown-stop
-       exit ;;
+       exit ;;
     i*86:atheos:*:*)
        echo ${UNAME_MACHINE}-unknown-atheos
-       exit 0 ;;
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     i*86:*DOS:*:*)
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
-       exit ;;
+       exit ;;
     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -995,15 +1019,16 @@ EOF
        else
                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
        fi
-       exit 0 ;;
-    i*86:*:5:[78]*)
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
        case `/bin/uname -X | grep "^Machine"` in
            *486*)           UNAME_MACHINE=i486 ;;
            *Pentium)        UNAME_MACHINE=i586 ;;
            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
        esac
        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-       exit ;;
+       exit ;;
     i*86:*:3.2:*)
        if test -f /usr/options/cb.name; then
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1021,73 +1046,73 @@ EOF
        else
                echo ${UNAME_MACHINE}-pc-sysv32
        fi
-       exit ;;
+       exit ;;
     pc:*:*:*)
        # Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
         # the processor, so we play safe by assuming i386.
        echo i386-pc-msdosdjgpp
-        exit ;;
+        exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
-       exit ;;
+       exit ;;
     paragon:*:*:*)
        echo i860-intel-osf1
-       exit ;;
+       exit ;;
     i860:*:4.*:*) # i860-SVR4
        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
          echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
        else # Add other i860-SVR4 vendors below as they are discovered.
          echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
        fi
-       exit ;;
+       exit ;;
     mini*:CTIX:SYS*5:*)
        # "miniframe"
        echo m68010-convergent-sysv
-       exit ;;
+       exit ;;
     mc68k:UNIX:SYSTEM5:3.51m)
        echo m68k-convergent-sysv
-       exit ;;
+       exit ;;
     M680?0:D-NIX:5.3:*)
        echo m68k-diab-dnix
-       exit ;;
-    M68*:*:R3V[567]*:*)
-       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
        OS_REL=''
        test -r /etc/.relid \
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
+          && { echo i486-ncr-sysv4; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     mc68030:UNIX_System_V:4.*:*)
        echo m68k-atari-sysv4
-       exit ;;
+       exit ;;
     TSUNAMI:LynxOS:2.*:*)
        echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     SM[BE]S:UNIX_SV:*:*)
        echo mips-dde-sysv${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     RM*:ReliantUNIX-*:*:*)
        echo mips-sni-sysv4
-       exit ;;
+       exit ;;
     RM*:SINIX-*:*:*)
        echo mips-sni-sysv4
-       exit ;;
+       exit ;;
     *:SINIX-*:*:*)
        if uname -p 2>/dev/null >/dev/null ; then
                UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1095,68 +1120,73 @@ EOF
        else
                echo ns32k-sni-sysv
        fi
-       exit ;;
+       exit ;;
     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                       # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
-        exit ;;
+        exit ;;
     *:UNIX_System_V:4*:FTX*)
        # From Gerald Hewes <hewes@openmarket.com>.
        # How about differentiating between stratus architectures? -djm
        echo hppa1.1-stratus-sysv4
-       exit ;;
+       exit ;;
     *:*:*:FTX*)
        # From seanf@swdc.stratus.com.
        echo i860-stratus-sysv4
-       exit 0 ;;
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
     *:VOS:*:*)
        # From Paul.Green@stratus.com.
        echo hppa1.1-stratus-vos
-       exit ;;
+       exit ;;
     mc68*:A/UX:*:*)
        echo m68k-apple-aux${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     news*:NEWS-OS:6*:*)
        echo mips-sony-newsos6
-       exit ;;
+       exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
        if [ -d /usr/nec ]; then
                echo mips-nec-sysv${UNAME_RELEASE}
        else
                echo mips-unknown-sysv${UNAME_RELEASE}
        fi
-        exit ;;
+        exit ;;
     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
        echo powerpc-be-beos
-       exit ;;
+       exit ;;
     BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
        echo powerpc-apple-beos
-       exit ;;
+       exit ;;
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
        echo i586-pc-beos
-       exit ;;
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     SX-5:SUPER-UX:*:*)
        echo sx5-nec-superux${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     SX-6:SUPER-UX:*:*)
        echo sx6-nec-superux${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:Rhapsody:*:*)
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:Darwin:*:*)
-       case `uname -p` in
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
            *86) UNAME_PROCESSOR=i686 ;;
-           powerpc) UNAME_PROCESSOR=powerpc ;;
+           unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
        UNAME_PROCESSOR=`uname -p`
        if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1164,22 +1194,25 @@ EOF
                UNAME_MACHINE=pc
        fi
        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:QNX:*:4*)
        echo i386-pc-qnx
-       exit 0 ;;
-    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:NonStop-UX:*:*)
        echo mips-compaq-nonstopux
-       exit ;;
+       exit ;;
     BS2000:POSIX*:*:*)
        echo bs2000-siemens-sysv
-       exit ;;
+       exit ;;
     DS/*:UNIX_System_V:*:*)
        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:Plan9:*:*)
        # "uname -m" is not consistent, so use $cputype instead. 386
        # is converted to i386 for consistency with other x86
@@ -1190,28 +1223,44 @@ EOF
            UNAME_MACHINE="$cputype"
        fi
        echo ${UNAME_MACHINE}-unknown-plan9
-       exit ;;
+       exit ;;
     *:TOPS-10:*:*)
        echo pdp10-unknown-tops10
-       exit ;;
+       exit ;;
     *:TENEX:*:*)
        echo pdp10-unknown-tenex
-       exit ;;
+       exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
        echo pdp10-dec-tops20
-       exit ;;
+       exit ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
        echo pdp10-xkl-tops20
-       exit ;;
+       exit ;;
     *:TOPS-20:*:*)
        echo pdp10-unknown-tops20
-       exit ;;
+       exit ;;
     *:ITS:*:*)
        echo pdp10-unknown-its
-       exit ;;
+       exit ;;
     SEI:*:*:SEIUX)
         echo mips-sei-seiux${UNAME_RELEASE}
-       exit 0 ;;
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1243,7 +1292,7 @@ main ()
 #endif
 
 #if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
+  printf ("arm-acorn-riscix\n"); exit (0);
 #endif
 
 #if defined (hp300) && !defined (hpux)
@@ -1332,11 +1381,12 @@ main ()
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
 
 # Apollos put the system type in the environment.
 
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1345,22 +1395,22 @@ then
     case `getsysinfo -f cpu_type` in
     c1*)
        echo c1-convex-bsd
-       exit ;;
+       exit ;;
     c2*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
        else echo c2-convex-bsd
        fi
-       exit ;;
+       exit ;;
     c34*)
        echo c34-convex-bsd
-       exit ;;
+       exit ;;
     c38*)
        echo c38-convex-bsd
-       exit ;;
+       exit ;;
     c4*)
        echo c4-convex-bsd
-       exit ;;
+       exit ;;
     esac
 fi
 
@@ -1371,7 +1421,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
index 6b2ff9f..1c366df 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
-timestamp='2003-06-18'
+timestamp='2005-07-08'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,14 +21,15 @@ timestamp='2003-06-18'
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+
 # Please send patches to <config-patches@gnu.org>.  Submit a context
 # diff and a properly formatted ChangeLog entry.
 #
@@ -70,7 +71,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -83,11 +84,11 @@ Try \`$me --help' for more information."
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )        # Use stdin as input.
@@ -99,7 +100,7 @@ while test $# -gt 0 ; do
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit 0;;
+       exit ;;
 
     * )
        break ;;
@@ -118,7 +119,8 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -144,7 +146,7 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis)
+       -apple | -axis | -knuth | -cray)
                os=
                basic_machine=$1
                ;;
@@ -228,14 +230,16 @@ case $basic_machine in
        | a29k \
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+       | am33_2.0 \
        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+       | bfin \
        | c4x | clipper \
        | d10v | d30v | dlx | dsp16xx \
        | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
-       | ip2k \
-       | m32r | m68000 | m68k | m88k | mcore \
+       | ip2k | iq2000 \
+       | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
@@ -244,31 +248,37 @@ case $basic_machine in
        | mips64vr4100 | mips64vr4100el \
        | mips64vr4300 | mips64vr4300el \
        | mips64vr5000 | mips64vr5000el \
+       | mips64vr5900 | mips64vr5900el \
        | mipsisa32 | mipsisa32el \
        | mipsisa32r2 | mipsisa32r2el \
        | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
+       | ms1 \
        | msp430 \
        | ns16k | ns32k \
-       | openrisc | or32 \
+       | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
-       | s390 | s390x \
-       | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
-       | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+       | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b \
        | strongarm \
        | tahoe | thumb | tic4x | tic80 | tron \
        | v850 | v850e \
        | we32k \
-       | x86 | xscale | xstormy16 | xtensa \
+       | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
        | z8k)
                basic_machine=$basic_machine-unknown
                ;;
+       m32c)
+               basic_machine=$basic_machine-unknown
+               ;;
        m6811 | m68hc11 | m6812 | m68hc12)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
@@ -296,19 +306,19 @@ case $basic_machine in
        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* \
-       | bs2000-* \
+       | bfin-* | bs2000-* \
        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | cydra-* \
+       | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
        | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* \
-       | m32r-* \
+       | ip2k-* | iq2000-* \
+       | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | mcore-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -317,34 +327,40 @@ case $basic_machine in
        | mips64vr4100-* | mips64vr4100el-* \
        | mips64vr4300-* | mips64vr4300el-* \
        | mips64vr5000-* | mips64vr5000el-* \
+       | mips64vr5900-* | mips64vr5900el-* \
        | mipsisa32-* | mipsisa32el-* \
        | mipsisa32r2-* | mipsisa32r2el-* \
        | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
        | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | ms1-* \
        | msp430-* \
-       | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
        | romp-* | rs6000-* \
-       | s390-* | s390x-* \
-       | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
        | tron-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
-       | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-       | xtensa-* \
+       | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa-* \
        | ymp-* \
        | z8k-*)
                ;;
+       m32c-*)
+               ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
        386bsd)
@@ -361,6 +377,9 @@ case $basic_machine in
                basic_machine=a29k-amd
                os=-udi
                ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
        adobe68k)
                basic_machine=m68010-adobe
                os=-scout
@@ -378,6 +397,9 @@ case $basic_machine in
        amd64)
                basic_machine=x86_64-pc
                ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        amdahl)
                basic_machine=580-amdahl
                os=-sysv
@@ -437,12 +459,27 @@ case $basic_machine in
                basic_machine=j90-cray
                os=-unicos
                ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16c)
+               basic_machine=cr16c-unknown
+               os=-elf
+               ;;
        crds | unos)
                basic_machine=m68k-crds
                ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
        cris | cris-* | etrax*)
                basic_machine=cris-axis
                ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
        da30 | da30-*)
                basic_machine=m68k-da30
                ;;
@@ -465,6 +502,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
        dpx20 | dpx20-*)
                basic_machine=rs6000-bull
                os=-bosx
@@ -643,10 +684,6 @@ case $basic_machine in
        mips3*)
                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
                ;;
-       mmix*)
-               basic_machine=mmix-knuth
-               os=-mmixware
-               ;;
        monitor)
                basic_machine=m68k-rom68k
                os=-coff
@@ -727,10 +764,6 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
-       nv1)
-               basic_machine=nv1-cray
-               os=-unicosmp
-               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -738,9 +771,12 @@ case $basic_machine in
                basic_machine=hppa1.1-oki
                os=-proelf
                ;;
-       or32 | or32-*)
+       openrisc | openrisc-*)
                basic_machine=or32-unknown
-               os=-coff
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
                ;;
        OSE68000 | ose68000)
                basic_machine=m68000-ericsson
@@ -833,6 +869,12 @@ case $basic_machine in
        rtpc | rtpc-*)
                basic_machine=romp-ibm
                ;;
+       s390 | s390-*)
+               basic_machine=s390-ibm
+               ;;
+       s390x | s390x-*)
+               basic_machine=s390x-ibm
+               ;;
        sa29200)
                basic_machine=a29k-amd
                os=-udi
@@ -956,6 +998,10 @@ case $basic_machine in
        tower | tower-32)
                basic_machine=m68k-ncr
                ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
        udi29k)
                basic_machine=a29k-amd
                os=-udi
@@ -999,6 +1045,10 @@ case $basic_machine in
                basic_machine=hppa1.1-winbond
                os=-proelf
                ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
        xps | xps100)
                basic_machine=xps100-honeywell
                ;;
@@ -1029,6 +1079,9 @@ case $basic_machine in
        romp)
                basic_machine=romp-ibm
                ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
        rs6000)
                basic_machine=rs6000-ibm
                ;;
@@ -1045,12 +1098,9 @@ case $basic_machine in
        we32k)
                basic_machine=we32k-att
                ;;
-       sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
                basic_machine=sh-unknown
                ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
        sparc | sparcv8 | sparcv9 | sparcv9b)
                basic_machine=sparc-sun
                ;;
@@ -1124,19 +1174,21 @@ case $os in
              | -aos* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
-             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-             | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+             | -skyos* | -haiku*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1154,12 +1206,15 @@ case $os in
                os=`echo $os | sed -e 's|nto|nto-qnx|'`
                ;;
        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
                ;;
        -mac*)
                os=`echo $os | sed -e 's|mac|macos|'`
                ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
        -linux*)
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
                ;;
@@ -1172,6 +1227,9 @@ case $os in
        -opened*)
                os=-openedition
                ;;
+        -os400*)
+               os=-os400
+               ;;
        -wince*)
                os=-wince
                ;;
@@ -1193,6 +1251,9 @@ case $os in
        -atheos*)
                os=-atheos
                ;;
+       -syllable*)
+               os=-syllable
+               ;;
        -386bsd)
                os=-bsd
                ;;
@@ -1215,6 +1276,9 @@ case $os in
        -sinix*)
                os=-sysv4
                ;;
+        -tpf*)
+               os=-tpf
+               ;;
        -triton*)
                os=-sysv3
                ;;
@@ -1251,6 +1315,9 @@ case $os in
        -kaos*)
                os=-kaos
                ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
        -none)
                ;;
        *)
@@ -1282,9 +1349,9 @@ case $basic_machine in
        arm*-semi)
                os=-aout
                ;;
-       c4x-* | tic4x-*)
-               os=-coff
-               ;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
@@ -1328,9 +1395,15 @@ case $basic_machine in
        *-be)
                os=-beos
                ;;
+       *-haiku)
+               os=-haiku
+               ;;
        *-ibm)
                os=-aix
                ;;
+       *-knuth)
+               os=-mmixware
+               ;;
        *-wec)
                os=-proelf
                ;;
@@ -1463,9 +1536,15 @@ case $basic_machine in
                        -mvs* | -opened*)
                                vendor=ibm
                                ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
                        -ptx*)
                                vendor=sequent
                                ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
                        -vxsim* | -vxworks* | -windiss*)
                                vendor=wrs
                                ;;
@@ -1490,7 +1569,7 @@ case $basic_machine in
 esac
 
 echo $basic_machine$os
-exit 0
+exit
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
index 6e48ffb..6a9a049 100644 (file)
@@ -43,7 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -87,6 +87,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -172,6 +174,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index 090f804..4f7477c 100644 (file)
     
     <!-- A persistent id attribute that supports personalized anonymous access. -->
     
-    <!-- First, the deprecated version: -->
+    <!-- First, the deprecated version, decoded as a scoped string: -->
     <Attribute name="urn:mace:dir:attribute-def:eduPersonTargetedID" id="targeted-id">
         <AttributeDecoder xsi:type="ScopedAttributeDecoder"/>
+        <!-- <AttributeDecoder xsi:type="NameIDFromScopedAttributeDecoder" formatter="$NameQualifier!$SPNameQualifier!$Name"/> -->
     </Attribute>
-
-    <!-- Second, the new version (note the OID-style name): -->
+    
+    <!-- Second, an alternate decoder that will turn the deprecated form into the newer form. -->
+    <!--
+    <Attribute name="urn:mace:dir:attribute-def:eduPersonTargetedID" id="persistent-id">
+        <AttributeDecoder xsi:type="NameIDFromScopedAttributeDecoder" formatter="$NameQualifier!$SPNameQualifier!$Name"/>
+    </Attribute>
+    -->
+    
+    <!-- Third, the new version (note the OID-style name): -->
     <Attribute name="urn:oid:1.3.6.1.4.1.5923.1.1.1.10" id="persistent-id">
         <AttributeDecoder xsi:type="NameIDAttributeDecoder" formatter="$NameQualifier!$SPNameQualifier!$Name"/>
     </Attribute>
 
-    <!-- Third, the SAML 2.0 NameID Format: -->
+    <!-- Fourth, the SAML 2.0 NameID Format: -->
     <Attribute name="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" id="persistent-id">
         <AttributeDecoder xsi:type="NameIDAttributeDecoder" formatter="$NameQualifier!$SPNameQualifier!$Name"/>
     </Attribute>
index c19ed16..22ae662 100644 (file)
@@ -13,6 +13,7 @@
         <Rule xsi:type="AttributeValueString" value="member"/>
         <Rule xsi:type="AttributeValueString" value="affiliate"/>
         <Rule xsi:type="AttributeValueString" value="employee"/>
+        <Rule xsi:type="AttributeValueString" value="library-walk-in"/>
     </afp:PermitValueRule>
     
     <!--
index aa47b68..0729fe3 100755 (executable)
@@ -66,4 +66,5 @@ else
     openssl req -config sp-cert.cnf -new -x509 -days $DAYS -keyout sp-key.pem -out sp-cert.pem 2> /dev/null
 fi
 
+chmod 600 sp-key.pem
 rm sp-cert.cnf
index fa230c5..afe286d 100644 (file)
@@ -92,7 +92,7 @@
         -->
         <Sessions lifetime="28800" timeout="3600" checkAddress="false"
             handlerURL="/Shibboleth.sso" handlerSSL="false"
-            exportLocation="http://localhost/Shibboleth.sso/GetAssertion"
+            exportLocation="http://localhost/Shibboleth.sso/GetAssertion" exportACL="127.0.0.1"
             idpHistory="false" idpHistoryDays="7">
             
             <!--
             <!-- Default example directs to a specific IdP's SSO service (favoring SAML 2 over Shib 1). -->
             <SessionInitiator type="Chaining" Location="/Login" isDefault="true" id="Intranet"
                     relayState="cookie" entityID="https://idp.example.org/shibboleth">
-                <SessionInitiator type="SAML2" defaultACSIndex="1" template="bindingTemplate.html"/>
+                <SessionInitiator type="SAML2" defaultACSIndex="1" acsByIndex="false" template="bindingTemplate.html"/>
                 <SessionInitiator type="Shib1" defaultACSIndex="5"/>
             </SessionInitiator>
             
             <!-- An example using an old-style WAYF, which means Shib 1 only unless an entityID is provided. -->
             <SessionInitiator type="Chaining" Location="/WAYF" id="WAYF" relayState="cookie">
-                <SessionInitiator type="SAML2" defaultACSIndex="1" template="bindingTemplate.html"/>
+                <SessionInitiator type="SAML2" defaultACSIndex="1" acsByIndex="false" template="bindingTemplate.html"/>
                 <SessionInitiator type="Shib1" defaultACSIndex="5"/>
                 <SessionInitiator type="WAYF" defaultACSIndex="5" URL="https://wayf.example.org/WAYF"/>
             </SessionInitiator>
 
             <!-- An example supporting the new-style of discovery service. -->
             <SessionInitiator type="Chaining" Location="/DS" id="DS" relayState="cookie">
-                <SessionInitiator type="SAML2" defaultACSIndex="1" template="bindingTemplate.html"/>
+                <SessionInitiator type="SAML2" defaultACSIndex="1" acsByIndex="false" template="bindingTemplate.html"/>
                 <SessionInitiator type="Shib1" defaultACSIndex="5"/>
                 <SessionInitiator type="SAMLDS" URL="https://ds.example.org/DS"/>
             </SessionInitiator>
             <Handler type="Status" Location="/Status" acl="127.0.0.1"/>
 
             <!-- Session diagnostic service. -->
-            <Handler type="Session" Location="/Session"/>
+            <Handler type="Session" Location="/Session" showAttributeValues="false"/>
 
         </Sessions>
 
index f1d3931..e3cf3b9 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for shibboleth 2.0.
+# Generated by GNU Autoconf 2.59 for shibboleth 2.1.
 #
 # Report bugs to <shibboleth-users@internet2.edu>.
 #
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='shibboleth'
 PACKAGE_TARNAME='shibboleth'
-PACKAGE_VERSION='2.0'
-PACKAGE_STRING='shibboleth 2.0'
+PACKAGE_VERSION='2.1'
+PACKAGE_STRING='shibboleth 2.1'
 PACKAGE_BUGREPORT='shibboleth-users@internet2.edu'
 
 # Factoring default headers for most tests.
@@ -464,7 +464,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DX_PROJECT DX_CONFIG DX_DOCDIR DX_ENV DX_FLAG_doc DX_DOXYGEN ac_pt_DX_DOXYGEN DX_FLAG_[]DX_CURRENT_FEATURE DX_PERL ac_pt_DX_PERL DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_doc_TRUE DX_COND_doc_FALSE DX_FLAG_dot DX_FLAG_[]DX_CURRENT_FEATURE DX_DOT ac_pt_DX_DOT DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_dot_TRUE DX_COND_dot_FALSE DX_FLAG_man DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_man_TRUE DX_COND_man_FALSE DX_FLAG_rtf DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_rtf_TRUE DX_COND_rtf_FALSE DX_FLAG_xml DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_xml_TRUE DX_COND_xml_FALSE DX_FLAG_chm DX_FLAG_[]DX_CURRENT_FEATURE DX_HHC ac_pt_DX_HHC DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_chm_TRUE DX_COND_chm_FALSE DX_FLAG_chi DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_chi_TRUE DX_COND_chi_FALSE DX_FLAG_html DX_FLAG_[]DX_CURRENT_FEATURE DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_html_TRUE DX_COND_html_FALSE DX_FLAG_ps DX_FLAG_[]DX_CURRENT_FEATURE DX_LATEX ac_pt_DX_LATEX DX_FLAG_[]DX_CURRENT_FEATURE DX_MAKEINDEX ac_pt_DX_MAKEINDEX DX_FLAG_[]DX_CURRENT_FEATURE DX_DVIPS ac_pt_DX_DVIPS DX_FLAG_[]DX_CURRENT_FEATURE DX_EGREP ac_pt_DX_EGREP DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_ps_TRUE DX_COND_ps_FALSE DX_FLAG_pdf DX_FLAG_[]DX_CURRENT_FEATURE DX_PDFLATEX ac_pt_DX_PDFLATEX DX_FLAG_[]DX_CURRENT_FEATURE DX_FLAG_[]DX_CURRENT_FEATURE DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_pdf_TRUE DX_COND_pdf_FALSE DX_COND_latex_TRUE DX_COND_latex_FALSE DOXYGEN_PAPER_SIZE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS PKG_CONFIG LOG4SHIB_CONFIG LOG4CPP_CONFIG XMLTOOLINGXMLDIR OPENSAMLXMLDIR LITE_LIBS XMLSEC_LIBS NSAPI_INCLUDE BUILD_NSAPI_TRUE BUILD_NSAPI_FALSE FASTCGI_INCLUDE FASTCGI_LDFLAGS FASTCGI_LIBS BUILD_FASTCGI_TRUE BUILD_FASTCGI_FALSE xs APXS APXS_CFLAGS APXS_INCLUDE APXS2 APR_CONFIG APXS2_CFLAGS APXS2_INCLUDE APXS22 APR1_CONFIG APXS22_CFLAGS APXS22_INCLUDE BUILD_AP13_TRUE BUILD_AP13_FALSE BUILD_AP20_TRUE BUILD_AP20_FALSE BUILD_AP22_TRUE BUILD_AP22_FALSE ODBC_CONFIG ODBC_CFLAGS ODBC_LIBS WANT_SUBDIRS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DX_PROJECT DX_CONFIG DX_DOCDIR DX_ENV DX_FLAG_doc DX_DOXYGEN ac_pt_DX_DOXYGEN DX_FLAG_[]DX_CURRENT_FEATURE DX_PERL ac_pt_DX_PERL DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_doc_TRUE DX_COND_doc_FALSE DX_FLAG_dot DX_FLAG_[]DX_CURRENT_FEATURE DX_DOT ac_pt_DX_DOT DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_dot_TRUE DX_COND_dot_FALSE DX_FLAG_man DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_man_TRUE DX_COND_man_FALSE DX_FLAG_rtf DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_rtf_TRUE DX_COND_rtf_FALSE DX_FLAG_xml DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_xml_TRUE DX_COND_xml_FALSE DX_FLAG_chm DX_FLAG_[]DX_CURRENT_FEATURE DX_HHC ac_pt_DX_HHC DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_chm_TRUE DX_COND_chm_FALSE DX_FLAG_chi DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_chi_TRUE DX_COND_chi_FALSE DX_FLAG_html DX_FLAG_[]DX_CURRENT_FEATURE DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_html_TRUE DX_COND_html_FALSE DX_FLAG_ps DX_FLAG_[]DX_CURRENT_FEATURE DX_LATEX ac_pt_DX_LATEX DX_FLAG_[]DX_CURRENT_FEATURE DX_MAKEINDEX ac_pt_DX_MAKEINDEX DX_FLAG_[]DX_CURRENT_FEATURE DX_DVIPS ac_pt_DX_DVIPS DX_FLAG_[]DX_CURRENT_FEATURE DX_EGREP ac_pt_DX_EGREP DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_ps_TRUE DX_COND_ps_FALSE DX_FLAG_pdf DX_FLAG_[]DX_CURRENT_FEATURE DX_PDFLATEX ac_pt_DX_PDFLATEX DX_FLAG_[]DX_CURRENT_FEATURE DX_FLAG_[]DX_CURRENT_FEATURE DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_pdf_TRUE DX_COND_pdf_FALSE DX_COND_latex_TRUE DX_COND_latex_FALSE DOXYGEN_PAPER_SIZE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS PKG_CONFIG LOG4SHIB_CONFIG LOG4CPP_CONFIG XMLTOOLINGXMLDIR OPENSAMLXMLDIR LITE_LIBS XMLSEC_LIBS NSAPI_INCLUDE BUILD_NSAPI_TRUE BUILD_NSAPI_FALSE FASTCGI_INCLUDE FASTCGI_LDFLAGS FASTCGI_LIBS BUILD_FASTCGI_TRUE BUILD_FASTCGI_FALSE MEMCACHED_INCLUDE MEMCACHED_LDFLAGS MEMCACHED_LIBS BUILD_MEMCACHED_TRUE BUILD_MEMCACHED_FALSE xs APXS APXS_CFLAGS APXS_INCLUDE APXS2 APR_CONFIG APXS2_CFLAGS APXS2_INCLUDE APXS22 APR1_CONFIG APXS22_CFLAGS APXS22_INCLUDE BUILD_AP13_TRUE BUILD_AP13_FALSE BUILD_AP20_TRUE BUILD_AP20_FALSE BUILD_AP22_TRUE BUILD_AP22_FALSE ODBC_CONFIG ODBC_CFLAGS ODBC_LIBS WANT_SUBDIRS LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -957,7 +957,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures shibboleth 2.0 to adapt to many kinds of systems.
+\`configure' configures shibboleth 2.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1023,7 +1023,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of shibboleth 2.0:";;
+     short | recursive ) echo "Configuration of shibboleth 2.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1074,6 +1074,7 @@ Optional Packages:
   --with-saml=PATH        where saml is installed
   --with-nsapi=DIR        Build NSAPI module for Netscape/iPlanet/SunONE
   --with-fastcgi=DIR      Build FastCGI support
+  --with-memcached=DIR    Build Memcached support
   --with-apxs=FILE        Specifies where to find the Apache 1.3 apxs script.
   --with-apxs2=FILE       Specifies where to find the Apache 2.0 apxs script.
   --with-apr=PATH         where apr-config is installed
@@ -1196,7 +1197,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-shibboleth configure 2.0
+shibboleth configure 2.1
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1210,7 +1211,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by shibboleth $as_me 2.0, which was
+It was created by shibboleth $as_me 2.1, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1855,7 +1856,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=shibboleth
- VERSION=2.0
+ VERSION=2.1
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5534,7 +5535,10 @@ else
                        if test "$CXX" = "CC" ; then
                                CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp"
                        fi
-               ;;
+                       ;;
+               *osf*)
+                       CXXFLAGS="$CXXFLAGS -D_POSIX_PII_SOCKET"
+                       ;;
        esac
 fi
 
@@ -6093,7 +6097,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6096 "configure"' > conftest.$ac_ext
+  echo '#line 6100 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7201,7 +7205,7 @@ fi
 
 
 # Provide some information about the compiler.
-echo "$as_me:7204:" \
+echo "$as_me:7208:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -8239,11 +8243,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8242: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8246: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8246: \$? = $ac_status" >&5
+   echo "$as_me:8250: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -8472,11 +8476,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8475: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8479: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8479: \$? = $ac_status" >&5
+   echo "$as_me:8483: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -8532,11 +8536,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8535: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8539: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8539: \$? = $ac_status" >&5
+   echo "$as_me:8543: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9866,7 +9870,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 9869 "configure"' > conftest.$ac_ext
+    echo '#line 9873 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -10737,7 +10741,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10740 "configure"
+#line 10744 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10835,7 +10839,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10838 "configure"
+#line 10842 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13018,11 +13022,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13021: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13025: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13025: \$? = $ac_status" >&5
+   echo "$as_me:13029: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -13078,11 +13082,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13081: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13085: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13085: \$? = $ac_status" >&5
+   echo "$as_me:13089: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -13589,7 +13593,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 13592 "configure"' > conftest.$ac_ext
+    echo '#line 13596 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -14460,7 +14464,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 14463 "configure"
+#line 14467 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14558,7 +14562,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 14561 "configure"
+#line 14565 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15385,11 +15389,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15388: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15392: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15392: \$? = $ac_status" >&5
+   echo "$as_me:15396: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -15445,11 +15449,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15448: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15452: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15452: \$? = $ac_status" >&5
+   echo "$as_me:15456: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16759,7 +16763,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 16762 "configure"' > conftest.$ac_ext
+    echo '#line 16766 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -17504,11 +17508,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17507: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17511: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17511: \$? = $ac_status" >&5
+   echo "$as_me:17515: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -17737,11 +17741,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17740: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17744: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17744: \$? = $ac_status" >&5
+   echo "$as_me:17748: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
@@ -17797,11 +17801,11 @@ else
    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17800: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17804: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17804: \$? = $ac_status" >&5
+   echo "$as_me:17808: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -19131,7 +19135,7 @@ linux*)
   libsuff=
   case "$host_cpu" in
   x86_64*|s390x*|powerpc64*)
-    echo '#line 19134 "configure"' > conftest.$ac_ext
+    echo '#line 19138 "configure"' > conftest.$ac_ext
     if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -20002,7 +20006,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 20005 "configure"
+#line 20009 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -20100,7 +20104,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 20103 "configure"
+#line 20107 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -24860,6 +24864,200 @@ if test ! "$WANT_FASTCGI" = "no" ; then
     WANT_SUBDIRS="$WANT_SUBDIRS fastcgi"
 fi
 
+#
+# Build Memcached support?
+#
+echo "$as_me:$LINENO: checking for Memcached support" >&5
+echo $ECHO_N "checking for Memcached support... $ECHO_C" >&6
+
+# Check whether --with-memcached or --without-memcached was given.
+if test "${with_memcached+set}" = set; then
+  withval="$with_memcached"
+  WANT_MEMCACHED=$withval
+else
+  WANT_MEMCACHED=no
+fi;
+echo "$as_me:$LINENO: result: $WANT_MEMCACHED" >&5
+echo "${ECHO_T}$WANT_MEMCACHED" >&6
+
+if test "$WANT_MEMCACHED" != "no"; then
+    if test "$WANT_MEMCACHED" != "yes"; then
+        if test x_$WANT_MEMCACHED != x_/usr; then
+            MEMCACHED_INCLUDE="-I$WANT_MEMCACHED/include"
+            MEMCACHED_LDFLAGS="-L$WANT_MEMCACHED/lib"
+        fi
+    fi
+    if test "${ac_cv_header_libmemcached_memcached_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for libmemcached/memcached.h" >&5
+echo $ECHO_N "checking for libmemcached/memcached.h... $ECHO_C" >&6
+if test "${ac_cv_header_libmemcached_memcached_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libmemcached_memcached_h" >&5
+echo "${ECHO_T}$ac_cv_header_libmemcached_memcached_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking libmemcached/memcached.h usability" >&5
+echo $ECHO_N "checking libmemcached/memcached.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <libmemcached/memcached.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_cxx_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking libmemcached/memcached.h presence" >&5
+echo $ECHO_N "checking libmemcached/memcached.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <libmemcached/memcached.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: libmemcached/memcached.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libmemcached/memcached.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libmemcached/memcached.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libmemcached/memcached.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: libmemcached/memcached.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libmemcached/memcached.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libmemcached/memcached.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libmemcached/memcached.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libmemcached/memcached.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libmemcached/memcached.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libmemcached/memcached.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libmemcached/memcached.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libmemcached/memcached.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libmemcached/memcached.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: libmemcached/memcached.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libmemcached/memcached.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## --------------------------------------------- ##
+## Report this to shibboleth-users@internet2.edu ##
+## --------------------------------------------- ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for libmemcached/memcached.h" >&5
+echo $ECHO_N "checking for libmemcached/memcached.h... $ECHO_C" >&6
+if test "${ac_cv_header_libmemcached_memcached_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_libmemcached_memcached_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libmemcached_memcached_h" >&5
+echo "${ECHO_T}$ac_cv_header_libmemcached_memcached_h" >&6
+
+fi
+if test $ac_cv_header_libmemcached_memcached_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: unable to find Memcached header files" >&5
+echo "$as_me: error: unable to find Memcached header files" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+    MEMCACHED_LIBS="-lmemcached"
+fi
+
+
+
+
+
+# always output the Makefile, even if you don't use it
+          ac_config_files="$ac_config_files memcache-store/Makefile"
+
+
+
+if test ! "$WANT_MEMCACHED" = "no"; then
+  BUILD_MEMCACHED_TRUE=
+  BUILD_MEMCACHED_FALSE='#'
+else
+  BUILD_MEMCACHED_TRUE='#'
+  BUILD_MEMCACHED_FALSE=
+fi
+
+
+if test ! "$WANT_MEMCACHED" = "no" ; then
+    WANT_SUBDIRS="$WANT_SUBDIRS memcache-store"
+fi
+
 
 #
 # If no --enable-apache-xx specified
@@ -26268,6 +26466,13 @@ echo "$as_me: error: conditional \"BUILD_FASTCGI\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${BUILD_MEMCACHED_TRUE}" && test -z "${BUILD_MEMCACHED_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"BUILD_MEMCACHED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"BUILD_MEMCACHED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${BUILD_AP13_TRUE}" && test -z "${BUILD_AP13_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"BUILD_AP13\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -26560,7 +26765,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by shibboleth $as_me 2.0, which was
+This file was extended by shibboleth $as_me 2.1, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -26623,7 +26828,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-shibboleth config.status 2.0
+shibboleth config.status 2.1
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -26744,6 +26949,7 @@ do
   "adfs/Makefile" ) CONFIG_FILES="$CONFIG_FILES adfs/Makefile" ;;
   "nsapi_shib/Makefile" ) CONFIG_FILES="$CONFIG_FILES nsapi_shib/Makefile" ;;
   "fastcgi/Makefile" ) CONFIG_FILES="$CONFIG_FILES fastcgi/Makefile" ;;
+  "memcache-store/Makefile" ) CONFIG_FILES="$CONFIG_FILES memcache-store/Makefile" ;;
   "apache/Makefile" ) CONFIG_FILES="$CONFIG_FILES apache/Makefile" ;;
   "odbc-store/Makefile" ) CONFIG_FILES="$CONFIG_FILES odbc-store/Makefile" ;;
   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
@@ -26993,6 +27199,11 @@ s,@FASTCGI_LDFLAGS@,$FASTCGI_LDFLAGS,;t t
 s,@FASTCGI_LIBS@,$FASTCGI_LIBS,;t t
 s,@BUILD_FASTCGI_TRUE@,$BUILD_FASTCGI_TRUE,;t t
 s,@BUILD_FASTCGI_FALSE@,$BUILD_FASTCGI_FALSE,;t t
+s,@MEMCACHED_INCLUDE@,$MEMCACHED_INCLUDE,;t t
+s,@MEMCACHED_LDFLAGS@,$MEMCACHED_LDFLAGS,;t t
+s,@MEMCACHED_LIBS@,$MEMCACHED_LIBS,;t t
+s,@BUILD_MEMCACHED_TRUE@,$BUILD_MEMCACHED_TRUE,;t t
+s,@BUILD_MEMCACHED_FALSE@,$BUILD_MEMCACHED_FALSE,;t t
 s,@xs@,$xs,;t t
 s,@APXS@,$APXS,;t t
 s,@APXS_CFLAGS@,$APXS_CFLAGS,;t t
index ef10e95..effa6af 100644 (file)
@@ -1,7 +1,7 @@
 AC_PREREQ([2.50])
-AC_INIT([shibboleth], [2.0], [shibboleth-users@internet2.edu], [shibboleth])
+AC_INIT([shibboleth], [2.1], [shibboleth-users@internet2.edu], [shibboleth])
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE([shibboleth],[2.0])
+AM_INIT_AUTOMAKE([shibboleth],[2.1])
 
 sinclude(doxygen.m4)
 sinclude(acx_pthread.m4)
@@ -52,7 +52,10 @@ else
                        if test "$CXX" = "CC" ; then
                                CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp"
                        fi
-               ;;
+                       ;;
+               *osf*)
+                       CXXFLAGS="$CXXFLAGS -D_POSIX_PII_SOCKET"
+                       ;;
        esac
 fi
 
@@ -436,6 +439,39 @@ if test ! "$WANT_FASTCGI" = "no" ; then
     WANT_SUBDIRS="$WANT_SUBDIRS fastcgi"
 fi
 
+#
+# Build Memcached support?
+#
+AC_MSG_CHECKING(for Memcached support)
+AC_ARG_WITH(memcached,
+    AC_HELP_STRING([--with-memcached=DIR], [Build Memcached support]),
+    [WANT_MEMCACHED=$withval],[WANT_MEMCACHED=no])
+AC_MSG_RESULT($WANT_MEMCACHED)
+
+if test "$WANT_MEMCACHED" != "no"; then
+    if test "$WANT_MEMCACHED" != "yes"; then
+        if test x_$WANT_MEMCACHED != x_/usr; then
+            MEMCACHED_INCLUDE="-I$WANT_MEMCACHED/include"
+            MEMCACHED_LDFLAGS="-L$WANT_MEMCACHED/lib"
+        fi
+    fi
+    AC_CHECK_HEADER([libmemcached/memcached.h],,
+        AC_MSG_ERROR([unable to find Memcached header files]))
+    MEMCACHED_LIBS="-lmemcached"
+fi
+
+AC_SUBST(MEMCACHED_INCLUDE)
+AC_SUBST(MEMCACHED_LDFLAGS)
+AC_SUBST(MEMCACHED_LIBS)
+
+# always output the Makefile, even if you don't use it
+AC_CONFIG_FILES([memcache-store/Makefile])
+AM_CONDITIONAL(BUILD_MEMCACHED,test ! "$WANT_MEMCACHED" = "no")
+
+if test ! "$WANT_MEMCACHED" = "no" ; then
+    WANT_SUBDIRS="$WANT_SUBDIRS memcache-store"
+fi
+
 
 #
 # If no --enable-apache-xx specified 
diff --git a/depcomp b/depcomp
index edb5d38..04701da 100755 (executable)
--- a/depcomp
+++ b/depcomp
@@ -1,7 +1,9 @@
 #! /bin/sh
-
 # depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
+
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,8 +17,8 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 
 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
 
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
 fi
-# `libtool' can also be set to `yes' or `no'.
-
-if test -z "$depfile"; then
-   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
-   dir=`echo "$object" | sed 's,/.*$,/,'`
-   if test "$dir" = "$object"; then
-      dir=
-   fi
-   # FIXME: should be _deps on DOS.
-   depfile="$dir.deps/$base"
-fi
 
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
 
 rm -f "$tmpdepfile"
@@ -262,27 +287,43 @@ tru64)
    base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
 
    if test "$libtool" = yes; then
-      tmpdepfile1="$dir.libs/$base.lo.d"
-      tmpdepfile2="$dir.libs/$base.d"
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mecanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
       "$@" -Wc,-MD
    else
-      tmpdepfile1="$dir$base.o.d"
-      tmpdepfile2="$dir$base.d"
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
       "$@" -MD
    fi
 
    stat=$?
    if test $stat -eq 0; then :
    else
-      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
       exit $stat
    fi
 
-   if test -f "$tmpdepfile1"; then
-      tmpdepfile="$tmpdepfile1"
-   else
-      tmpdepfile="$tmpdepfile2"
-   fi
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
    if test -f "$tmpdepfile"; then
       sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
       # That's a tab and a space in the [].
@@ -426,7 +467,8 @@ cpp)
   done
 
   "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
     sed '$ s: \\$::' > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
@@ -477,3 +519,12 @@ none)
 esac
 
 exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/depend b/depend
index 1e7190a..5cd3481 100644 (file)
--- a/depend
+++ b/depend
@@ -5,8 +5,8 @@ P SHIBxerces xerces-c
 P SHIBxmlsec xml-security-c
        1.4.0
 P SHIBxmltool xmltooling-c
-    1.0
+    1.1
 P SHIBosaml opensaml-c
-       2.0
+       2.1
 P SHIBlog4shib log4shib
     1.0
index 7cf7828..7e4107e 100644 (file)
@@ -44,7 +44,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -87,6 +87,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -172,6 +174,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index 620c3ad..7b15351 100644 (file)
@@ -1,5 +1,5 @@
-March 17, 2008
-Version 2.0
+August 8, 2008
+Version 2.1
 
 Welcome to Internet2's Shibboleth
 
@@ -23,6 +23,5 @@ site. Mailing lists and a bug database (https://bugs.internet2.edu/) are also
 available. Not all of the lists are open, but a general support list is
 available and is open.
 
-For basic information on installing binaries and deploying Shibboleth, refer
-to the web site and Wiki for the latest documentation. For source build assistance,
-see the INSTALL.txt file and the Wiki.
+For basic information on building from source, installing binaries, and deploying
+Shibboleth, refer to the web site and Wiki for the latest documentation.
index 4c1370a..3efe64b 100644 (file)
@@ -1,13 +1,14 @@
 Release Notes
 
 Shibboleth Native SP
-2.0
-3/17/2008
+2.1
+8/8/2008
 
 NOTE: The shibboleth2.xml configuration format in this release
-is compatible with the RC1 release. Upgrading from earlier
-releases is NOT supported without replacing the configuration
-file and reapplying changes.
+is fully compatible with the 2.0 release.
+
+List of issues addressed by this release:
+https://bugs.internet2.edu/jira/secure/IssueNavigator.jspa?reset=true&&pid=10011&fixfor=10129&status=5&status=6&sorter/field=issuekey&sorter/order=ASC
 
 Fully Supported
 
index edb6b30..a9af072 100644 (file)
@@ -46,7 +46,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 am__installdirs = "$(DESTDIR)$(fastcgidir)"
@@ -109,6 +109,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -194,6 +196,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index 65fc832..282dad9 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  *  Copyright 2001-2007 Internet2\r
- * \r
+ *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
  * You may obtain a copy of the License at\r
@@ -124,7 +124,7 @@ public:
             cerr << "shib: " << msg;\r
     }\r
     void clearHeader(const char* rawname, const char* cginame) {\r
-        // no need, since request headers turn into actual environment variables\r
+        // No need, since we use environment variables.\r
     }\r
     void setHeader(const char* name, const char* value) {\r
         if (value)\r
@@ -132,12 +132,28 @@ public:
         else\r
             m_request_headers.erase(name);\r
     }\r
-    virtual string getHeader(const char* name) const {\r
+    string getHeader(const char* name) const {\r
+        // Look in the local map first.\r
         map<string,string>::const_iterator i = m_request_headers.find(name);\r
         if (i != m_request_headers.end())\r
             return i->second;\r
-        else\r
-            return "";\r
+        // Nothing set locally and this isn't a "secure" call, so check the request.\r
+        string hdr("HTTP_");\r
+        for (; *name; ++name) {\r
+            if (*name=='-')\r
+                hdr += '_';\r
+            else\r
+                hdr += toupper(*name);\r
+        }\r
+        char* s = FCGX_GetParam(hdr.c_str(), m_req->envp);\r
+        return s ? s : "";\r
+    }\r
+    string getSecureHeader(const char* name) const {\r
+        // Look in the local map only.\r
+        map<string,string>::const_iterator i = m_request_headers.find(name);\r
+        if (i != m_request_headers.end())\r
+            return i->second;\r
+        return "";\r
     }\r
     void setRemoteUser(const char* user) {\r
         if (user)\r
@@ -169,7 +185,7 @@ public:
     const char* getRequestBody() const {\r
         throw runtime_error("getRequestBody not implemented by FastCGI authorizer.");\r
     }\r
\r
+\r
     long sendResponse(istream& in, long status) {\r
         string hdr = string("Connection: close\r\n");\r
         for (multimap<string,string>::const_iterator i=m_response_headers.begin(); i!=m_response_headers.end(); ++i)\r
@@ -206,7 +222,7 @@ public:
         return SHIB_RETURN_DONE;\r
     }\r
 \r
-    long returnDecline() { \r
+    long returnDecline() {\r
         return SHIB_RETURN_KO;\r
     }\r
 \r
@@ -250,20 +266,9 @@ int main(void)
         exit(1);\r
     }\r
 \r
-    const char* config=getenv("SHIBSP_CONFIG");\r
-    if (!config)\r
-        config=SHIBSP_CONFIG;\r
-\r
     try {\r
-        DOMDocument* dummydoc=XMLToolingConfig::getConfig().getParser().newDocument();\r
-        XercesJanitor<DOMDocument> docjanitor(dummydoc);\r
-        DOMElement* dummy = dummydoc->createElementNS(NULL,path);\r
-        auto_ptr_XMLCh src(config);\r
-        dummy->setAttributeNS(NULL,path,src.get());\r
-        dummy->setAttributeNS(NULL,validate,xmlconstants::XML_ONE);\r
-\r
-        g_Config->setServiceProvider(g_Config->ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER,dummy));\r
-        g_Config->getServiceProvider()->init();\r
+        if (!g_Config->instantiate(NULL, true))\r
+            throw runtime_error("unknown error");\r
     }\r
     catch (exception& ex) {\r
         g_Config->term();\r
@@ -293,7 +298,7 @@ int main(void)
 \r
     FCGX_Init();\r
     FCGX_InitRequest(&request, 0, 0);\r
-    \r
+\r
     cout << "Shibboleth initialization complete. Starting request loop." << endl;\r
     while (FCGX_Accept_r(&request) == 0)\r
     {\r
@@ -309,48 +314,44 @@ int main(void)
         try {\r
             xmltooling::NDC ndc("FastCGI shibauthorizer");\r
             ShibTargetFCGIAuth sta(&request, g_ServerScheme.c_str(), g_ServerName.c_str(), g_ServerPort);\r
-          \r
+\r
             pair<bool,long> res = sta.getServiceProvider().doAuthentication(sta);\r
             if (res.first) {\r
-#ifdef _DEBUG\r
-                cerr << "shib: doAuthentication handled the request" << endl;\r
-#endif\r
+                sta.log(SPRequest::SPDebug, "shib: doAuthentication handled the request");\r
                 switch(res.second) {\r
                     case SHIB_RETURN_OK:\r
                         print_ok(sta.m_request_headers);\r
                         continue;\r
-              \r
+\r
                     case SHIB_RETURN_KO:\r
                         print_ok(sta.m_request_headers);\r
                         continue;\r
 \r
                     case SHIB_RETURN_DONE:\r
                         continue;\r
-              \r
+\r
                     default:\r
                         cerr << "shib: doAuthentication returned an unexpected result: " << res.second << endl;\r
                         print_error("<html><body>FastCGI Shibboleth authorizer returned an unexpected result.</body></html>");\r
                         continue;\r
                 }\r
             }\r
-          \r
+\r
             res = sta.getServiceProvider().doExport(sta);\r
             if (res.first) {\r
-#ifdef _DEBUG\r
-                cerr << "shib: doExport handled request" << endl;\r
-#endif\r
+                sta.log(SPRequest::SPDebug, "shib: doExport handled request");\r
                 switch(res.second) {\r
                     case SHIB_RETURN_OK:\r
                         print_ok(sta.m_request_headers);\r
                         continue;\r
-              \r
+\r
                     case SHIB_RETURN_KO:\r
                         print_ok(sta.m_request_headers);\r
                         continue;\r
 \r
                     case SHIB_RETURN_DONE:\r
                         continue;\r
-              \r
+\r
                     default:\r
                         cerr << "shib: doExport returned an unexpected result: " << res.second << endl;\r
                         print_error("<html><body>FastCGI Shibboleth authorizer returned an unexpected result.</body></html>");\r
@@ -360,21 +361,19 @@ int main(void)
 \r
             res = sta.getServiceProvider().doAuthorization(sta);\r
             if (res.first) {\r
-#ifdef _DEBUG\r
-                cerr << "shib: doAuthorization handled request" << endl;\r
-#endif\r
+                sta.log(SPRequest::SPDebug, "shib: doAuthorization handled request");\r
                 switch(res.second) {\r
                     case SHIB_RETURN_OK:\r
                         print_ok(sta.m_request_headers);\r
                         continue;\r
-              \r
+\r
                     case SHIB_RETURN_KO:\r
                         print_ok(sta.m_request_headers);\r
                         continue;\r
 \r
                     case SHIB_RETURN_DONE:\r
                         continue;\r
-              \r
+\r
                     default:\r
                         cerr << "shib: doAuthorization returned an unexpected result: " << res.second << endl;\r
                         print_error("<html><body>FastCGI Shibboleth authorizer returned an unexpected result.</body></html>");\r
@@ -383,7 +382,7 @@ int main(void)
             }\r
 \r
             print_ok(sta.m_request_headers);\r
-          \r
+\r
         }\r
         catch (exception& e) {\r
             cerr << "shib: FastCGI authorizer caught an exception: " << e.what() << endl;\r
@@ -402,6 +401,6 @@ int main(void)
 \r
     if (g_Config)\r
         g_Config->term();\r
\r
+\r
     return 0;\r
 }\r
index ef47610..4a2069a 100644 (file)
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 2,0,0,0\r
- PRODUCTVERSION 2,0,0,0\r
+ FILEVERSION 2,1,0,0\r
+ PRODUCTVERSION 2,1,0,0\r
  FILEFLAGSMASK 0x3fL\r
 #ifdef _DEBUG\r
  FILEFLAGS 0x1L\r
@@ -47,14 +47,14 @@ BEGIN
             VALUE "Comments", "\0"\r
             VALUE "CompanyName", "Internet2\0"\r
             VALUE "FileDescription", "Shibboleth FastCGI Authorizer\0"\r
-            VALUE "FileVersion", "2, 0, 0, 0\0"\r
+            VALUE "FileVersion", "2, 1, 0, 0\0"\r
             VALUE "InternalName", "shibauthorizer\0"\r
-            VALUE "LegalCopyright", "Copyright Â© 2007 Internet2\0"\r
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"\r
             VALUE "LegalTrademarks", "\0"\r
             VALUE "OriginalFilename", "shibauthorizer.exe\0"\r
             VALUE "PrivateBuild", "\0"\r
-            VALUE "ProductName", "Shibboleth 2.0\0"\r
-            VALUE "ProductVersion", "2, 0, 0, 0\0"\r
+            VALUE "ProductName", "Shibboleth 2.1\0"\r
+            VALUE "ProductVersion", "2, 1, 0, 0\0"\r
             VALUE "SpecialBuild", "\0"\r
         END\r
     END\r
index 8bf4121..e8f395a 100644 (file)
@@ -9,6 +9,9 @@
                <Platform\r
                        Name="Win32"\r
                />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
        </Platforms>\r
        <ToolFiles>\r
        </ToolFiles>\r
@@ -16,7 +19,7 @@
                <Configuration\r
                        Name="Release|Win32"\r
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
-                       IntermediateDirectory=".\shibauthorizer___Win32_$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ProjectName)-$(ConfigurationName)"\r
                        ConfigurationType="1"\r
                        InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
                        UseOfMFC="0"\r
@@ -69,7 +72,6 @@
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;,\fcgi-2.4.0-VC8\libfcgi\$(ConfigurationName)"\r
-                               ProgramDatabaseFile=".\shibauthorizer___Win32_Release/shibauthorizer.pdb"\r
                                SubSystem="1"\r
                                TargetMachine="1"\r
                        />\r
                <Configuration\r
                        Name="Debug|Win32"\r
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
-                       IntermediateDirectory=".\shibauthorizer___Win32_$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ProjectName)-$(ConfigurationName)"\r
                        ConfigurationType="1"\r
                        InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
                        UseOfMFC="0"\r
                                SuppressStartupBanner="true"\r
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;,\fcgi-2.4.0-VC8\libfcgi\$(ConfigurationName)"\r
                                GenerateDebugInformation="true"\r
-                               ProgramDatabaseFile=".\shibauthorizer___Win32_Debug/shibauthorizer.pdb"\r
                                SubSystem="1"\r
                                TargetMachine="1"\r
                        />\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName=".\shibauthorizer___Win32_Release/shibauthorizer.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="xerces-c_2.lib xmltooling1.lib libfcgi.lib"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;,\fcgi-2.4.0-VC8\libfcgi\$(ConfigurationName)"\r
+                               ProgramDatabaseFile=".\shibauthorizer___Win32_Release/shibauthorizer.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName=".\shibauthorizer___Win32_Debug/shibauthorizer.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="xerces-c_2D.lib xmltooling1D.lib libfcgi.lib"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;,\fcgi-2.4.0-VC8\libfcgi\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile=".\shibauthorizer___Win32_Debug/shibauthorizer.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
        </Configurations>\r
        <References>\r
        </References>\r
                                        PreprocessorDefinitions=""\r
                                />\r
                        </FileConfiguration>\r
+                       <FileConfiguration\r
+                               Name="Release|x64"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCCLCompilerTool"\r
+                                       AdditionalIncludeDirectories=""\r
+                                       PreprocessorDefinitions=""\r
+                               />\r
+                       </FileConfiguration>\r
+                       <FileConfiguration\r
+                               Name="Debug|x64"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCCLCompilerTool"\r
+                                       AdditionalIncludeDirectories=""\r
+                                       PreprocessorDefinitions=""\r
+                               />\r
+                       </FileConfiguration>\r
                </File>\r
                <File\r
                        RelativePath=".\shibauthorizer.rc"\r
index f40a2e7..3582833 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  *  Copyright 2001-2007 Internet2\r
- * \r
+ *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
  * You may obtain a copy of the License at\r
@@ -209,7 +209,7 @@ public:
     virtual void clearHeader(const char* rawname, const char* cginame) {\r
         throw runtime_error("clearHeader not implemented by FastCGI responder.");\r
     }\r
-  \r
+\r
     virtual void setHeader(const char* name, const char* value) {\r
         throw runtime_error("setHeader not implemented by FastCGI responder.");\r
     }\r
@@ -283,20 +283,9 @@ int main(void)
         exit(1);\r
     }\r
 \r
-    const char* config=getenv("SHIBSP_CONFIG");\r
-    if (!config)\r
-        config=SHIBSP_CONFIG;\r
-\r
     try {\r
-        DOMDocument* dummydoc=XMLToolingConfig::getConfig().getParser().newDocument();\r
-        XercesJanitor<DOMDocument> docjanitor(dummydoc);\r
-        DOMElement* dummy = dummydoc->createElementNS(NULL,path);\r
-        auto_ptr_XMLCh src(config);\r
-        dummy->setAttributeNS(NULL,path,src.get());\r
-        dummy->setAttributeNS(NULL,validate,xmlconstants::XML_ONE);\r
-\r
-        g_Config->setServiceProvider(g_Config->ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER,dummy));\r
-        g_Config->getServiceProvider()->init();\r
+        if (!g_Config->instantiate(NULL, true))\r
+            throw runtime_error("unknown error");\r
     }\r
     catch (exception& ex) {\r
         g_Config->term();\r
@@ -327,7 +316,7 @@ int main(void)
 \r
     FCGX_Init();\r
     FCGX_InitRequest(&request, 0, 0);\r
-    \r
+\r
     cout << "Shibboleth initialization complete. Starting request loop." << endl;\r
     while (FCGX_Accept_r(&request) == 0) {\r
         // Note that the default bufsize (0) will cause the use of iostream\r
@@ -350,17 +339,15 @@ int main(void)
         try {\r
             xmltooling::NDC ndc("FastCGI shibresponder");\r
             ShibTargetFCGI stf(&request, content, g_ServerScheme.c_str(), g_ServerName.c_str(), g_ServerPort);\r
-          \r
+\r
             pair<bool,long> res = stf.getServiceProvider().doHandler(stf);\r
             if (res.first) {\r
-#ifdef _DEBUG\r
-                cerr << "shib: doHandler handled the request" << endl;\r
-#endif\r
+                stf.log(SPRequest::SPDebug, "shib: doHandler handled the request");\r
                 switch(res.second) {\r
                     case SHIB_RETURN_OK:\r
                         print_ok();\r
                         break;\r
-              \r
+\r
                     case SHIB_RETURN_KO:\r
                         cerr << "shib: doHandler failed to handle the request" << endl;\r
                         print_error("<html><body>FastCGI Shibboleth responder should only be used for Shibboleth protocol requests.</body></html>");\r
@@ -369,7 +356,7 @@ int main(void)
                     case SHIB_RETURN_DONE:\r
                         // response already handled\r
                         break;\r
-              \r
+\r
                     default:\r
                         cerr << "shib: doHandler returned an unexpected result: " << res.second << endl;\r
                         print_error("<html><body>FastCGI Shibboleth responder returned an unexpected result.</body></html>");\r
@@ -379,8 +366,8 @@ int main(void)
             else {\r
                 cerr << "shib: doHandler failed to handle request." << endl;\r
                 print_error("<html><body>FastCGI Shibboleth responder failed to process request.</body></html>");\r
-            }          \r
-          \r
+            }\r
+\r
         }\r
         catch (exception& e) {\r
             cerr << "shib: FastCGI responder caught an exception: " << e.what() << endl;\r
@@ -403,6 +390,6 @@ int main(void)
 \r
     if (g_Config)\r
         g_Config->term();\r
\r
+\r
     return 0;\r
 }\r
index 0f0311a..c8bded3 100644 (file)
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 2,0,0,0\r
- PRODUCTVERSION 2,0,0,0\r
+ FILEVERSION 2,1,0,0\r
+ PRODUCTVERSION 2,1,0,0\r
  FILEFLAGSMASK 0x3fL\r
 #ifdef _DEBUG\r
  FILEFLAGS 0x1L\r
@@ -47,14 +47,14 @@ BEGIN
             VALUE "Comments", "\0"\r
             VALUE "CompanyName", "Internet2\0"\r
             VALUE "FileDescription", "Shibboleth FastCGI Responder\0"\r
-            VALUE "FileVersion", "2, 0, 0, 0\0"\r
+            VALUE "FileVersion", "2, 1, 0, 0\0"\r
             VALUE "InternalName", "shibresponder\0"\r
-            VALUE "LegalCopyright", "Copyright Â© 2007 Internet2\0"\r
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"\r
             VALUE "LegalTrademarks", "\0"\r
             VALUE "OriginalFilename", "shibresponder.exe\0"\r
             VALUE "PrivateBuild", "\0"\r
-            VALUE "ProductName", "Shibboleth 2.0\0"\r
-            VALUE "ProductVersion", "2, 0, 0, 0\0"\r
+            VALUE "ProductName", "Shibboleth 2.1\0"\r
+            VALUE "ProductVersion", "2, 1, 0, 0\0"\r
             VALUE "SpecialBuild", "\0"\r
         END\r
     END\r
index c62262b..0d6518f 100644 (file)
@@ -9,6 +9,9 @@
                <Platform\r
                        Name="Win32"\r
                />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
        </Platforms>\r
        <ToolFiles>\r
        </ToolFiles>\r
@@ -16,7 +19,7 @@
                <Configuration\r
                        Name="Release|Win32"\r
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
-                       IntermediateDirectory=".\shibresponder___Win32_$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ProjectName)-$(ConfigurationName)"\r
                        ConfigurationType="1"\r
                        InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
                        UseOfMFC="0"\r
@@ -69,7 +72,6 @@
                                LinkIncremental="1"\r
                                SuppressStartupBanner="true"\r
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;,\fcgi-2.4.0-VC8\libfcgi\$(ConfigurationName)"\r
-                               ProgramDatabaseFile=".\shibresponder___Win32_Release/shibresponder.pdb"\r
                                SubSystem="1"\r
                                TargetMachine="1"\r
                        />\r
                <Configuration\r
                        Name="Debug|Win32"\r
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
-                       IntermediateDirectory=".\shibresponder___Win32_$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ProjectName)-$(ConfigurationName)"\r
                        ConfigurationType="1"\r
                        InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
                        UseOfMFC="0"\r
                                SuppressStartupBanner="true"\r
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;,\fcgi-2.4.0-VC8\libfcgi\$(ConfigurationName)"\r
                                GenerateDebugInformation="true"\r
-                               ProgramDatabaseFile=".\shibresponder___Win32_Debug/shibresponder.pdb"\r
                                SubSystem="1"\r
                                TargetMachine="1"\r
                        />\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName=".\shibresponder___Win32_Release/shibresponder.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="xerces-c_2.lib xmltooling1.lib libfcgi.lib"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;,\fcgi-2.4.0-VC8\libfcgi\$(ConfigurationName)"\r
+                               ProgramDatabaseFile=".\shibresponder___Win32_Release/shibresponder.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName=".\shibresponder___Win32_Debug/shibresponder.tlb"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="xerces-c_2D.lib xmltooling1D.lib libfcgi.lib"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;,\fcgi-2.4.0-VC8\libfcgi\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile=".\shibresponder___Win32_Debug/shibresponder.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
        </Configurations>\r
        <References>\r
        </References>\r
                                        PreprocessorDefinitions=""\r
                                />\r
                        </FileConfiguration>\r
+                       <FileConfiguration\r
+                               Name="Release|x64"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCCLCompilerTool"\r
+                                       AdditionalIncludeDirectories=""\r
+                                       PreprocessorDefinitions=""\r
+                               />\r
+                       </FileConfiguration>\r
+                       <FileConfiguration\r
+                               Name="Debug|x64"\r
+                               >\r
+                               <Tool\r
+                                       Name="VCCLCompilerTool"\r
+                                       AdditionalIncludeDirectories=""\r
+                                       PreprocessorDefinitions=""\r
+                               />\r
+                       </FileConfiguration>\r
                </File>\r
                <File\r
                        RelativePath=".\shibresponder.rc"\r
index 6ce63b9..4d4a951 100755 (executable)
@@ -1,7 +1,8 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-#
+
+scriptversion=2005-05-14.22
+
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
 # following copyright and license.
 # from scratch.  It can only install one file at a time, a restriction
 # shared with many OS's install programs.
 
-
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
 doit="${DOITPROG-}"
 
-
 # put in absolute paths if you don't have them in your path; or use env. vars.
 
 mvprog="${MVPROG-mv}"
@@ -59,236 +58,266 @@ stripprog="${STRIPPROG-strip}"
 rmprog="${RMPROG-rm}"
 mkdirprog="${MKDIRPROG-mkdir}"
 
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
 chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+chowncmd=
+chgrpcmd=
+stripcmd=
 rmcmd="$rmprog -f"
 mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-       -c) instcmd=$cpprog
-           shift
-           continue;;
-
-       -d) dir_arg=true
-           shift
-           continue;;
-
-       -m) chmodcmd="$chmodprog $2"
-           shift
-           shift
-           continue;;
-
-       -o) chowncmd="$chownprog $2"
-           shift
-           shift
-           continue;;
-
-       -g) chgrpcmd="$chgrpprog $2"
-           shift
-           shift
-           continue;;
-
-       -s) stripcmd=$stripprog
-           shift
-           continue;;
-
-       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
-           shift
-           continue;;
-
-       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-           shift
-           continue;;
-
-       *)  if [ x"$src" = x ]
-           then
-               src=$1
-           else
-               # this colon is to work around a 386BSD /bin/sh bug
-               :
-               dst=$1
-           fi
-           shift
-           continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-       echo "$0: no input file specified" >&2
-       exit 1
-else
-       :
-fi
-
-if [ x"$dir_arg" != x ]; then
-       dst=$src
-       src=""
-
-       if [ -d "$dst" ]; then
-               instcmd=:
-               chmodcmd=""
-       else
-               instcmd=$mkdirprog
-       fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
-       if [ -f "$src" ] || [ -d "$src" ]
-       then
-               :
-       else
-               echo "$0: $src does not exist" >&2
-               exit 1
-       fi
-
-       if [ x"$dst" = x ]
-       then
-               echo "$0: no destination specified" >&2
-               exit 1
-       else
-               :
-       fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-       if [ -d "$dst" ]
-       then
-               dst=$dst/`basename "$src"`
-       else
-               :
-       fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
-       '
-IFS="${IFS-$defaultIFS}"
-
-oIFS=$IFS
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS=$oIFS
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-       pathcomp=$pathcomp$1
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
        shift
+       shift
+       continue;;
 
-       if [ ! -d "$pathcomp" ] ;
-        then
-               $mkdirprog "$pathcomp"
-       else
-               :
-       fi
-
-       pathcomp=$pathcomp/
+    -T) no_target_directory=true
+       shift
+       continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+       # When -t is used, the destination is already specified.
+       test -n "$dir_arg$dstarg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+       for arg
+       do
+          if test -n "$dstarg"; then
+           # $@ is not empty: it contains at least $arg.
+           set fnord "$@" "$dstarg"
+           shift # fnord
+         fi
+         shift # arg
+         dstarg=$arg
+       done
+       break;;
+  esac
 done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-       $doit $instcmd "$dst" &&
 
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-       if [ x"$transformarg" = x ]
-       then
-               dstfile=`basename "$dst"`
-       else
-               dstfile=`basename "$dst" $transformbasename |
-                       sed $transformarg`$transformbasename
-       fi
-
-# don't allow the sed command to completely eliminate the filename
-
-       if [ x"$dstfile" = x ]
-       then
-               dstfile=`basename "$dst"`
-       else
-               :
-       fi
-
-# Make a couple of temp file names in the proper directory.
-
-       dsttmp=$dstdir/_inst.$$_
-       rmtmp=$dstdir/_rm.$$_
-
-# Trap to clean up temp files at exit.
-
-       trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
-       trap '(exit $?); exit' 1 2 13 15
-
-# Move or copy the file name to the temp name
-
-       $doit $instcmd "$src" "$dsttmp" &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
-
-# Now remove or move aside any old file at destination location.  We try this
-# two ways since rm can't unlink itself on some systems and the destination
-# file might be busy for other reasons.  In this case, the final cleanup
-# might fail but the new file should still install successfully.
-
-{
-       if [ -f "$dstdir/$dstfile" ]
-       then
-               $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
-               $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
-               {
-                 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-                 (exit 1); exit
-               }
-       else
-               :
-       fi
-} &&
-
-# Now rename the file to the real destination.
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
 
-       $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
+    else
+      mkdircmd=$mkdirprog
+    fi
+  else
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
 
-fi &&
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+       echo "$0: $dstarg: Is a directory" >&2
+       exit 1
+      fi
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+        '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+       # mkdir can fail with a `File exist' error in case several
+       # install-sh are creating the directory concurrently.  This
+       # is OK.
+       test -d "$pathcomp" || exit
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    dstfile=`basename "$dst"`
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+          # The rename failed, perhaps because mv can't rename something else
+          # to itself, or perhaps because mv is so ancient that it does not
+          # support -f.
+
+          # Now remove or move aside any old file at destination location.
+          # We try this two ways since rm can't unlink itself on some
+          # systems and the destination file might be busy for other
+          # reasons.  In this case, the final cleanup might fail but the new
+          # file should still install successfully.
+          {
+            if test -f "$dstdir/$dstfile"; then
+              $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+              || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+              || {
+                echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+                (exit 1); exit 1
+              }
+            else
+              :
+            fi
+          } &&
+
+          # Now rename the file to the real destination.
+          $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+        }
+    }
+  fi || { (exit 1); exit 1; }
+done
 
 # The final little trick to "correctly" pass the exit status to the exit trap.
-
 {
-       (exit 0); exit
+  (exit 0); exit 0
 }
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
index 1f01f44..38ea0c2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * isapi_shib.cpp
- * 
+ *
  * Shibboleth ISAPI filter
  */
 
@@ -40,6 +40,7 @@
 #include <set>
 #include <sstream>
 #include <fstream>
+#include <stdexcept>
 #include <process.h>
 
 #include <windows.h>
@@ -60,9 +61,7 @@ namespace {
     static const XMLCh sslport[] =          UNICODE_LITERAL_7(s,s,l,p,o,r,t);
     static const XMLCh scheme[] =           UNICODE_LITERAL_6(s,c,h,e,m,e);
     static const XMLCh id[] =               UNICODE_LITERAL_2(i,d);
-    static const XMLCh ISAPI[] =            UNICODE_LITERAL_5(I,S,A,P,I);
     static const XMLCh Alias[] =            UNICODE_LITERAL_5(A,l,i,a,s);
-    static const XMLCh normalizeRequest[] = UNICODE_LITERAL_16(n,o,r,m,a,l,i,z,e,R,e,q,u,e,s,t);
     static const XMLCh Site[] =             UNICODE_LITERAL_4(S,i,t,e);
 
     struct site_t {
@@ -93,7 +92,7 @@ namespace {
        char* m_user;
        bool m_checked;
     };
-    
+
     HINSTANCE g_hinstDLL;
     SPConfig* g_Config = NULL;
     map<string,site_t> g_Sites;
@@ -112,7 +111,7 @@ BOOL LogEvent(
     LPCSTR  message)
 {
     LPCSTR  messages[] = {message, NULL};
-    
+
     HANDLE hElog = RegisterEventSource(lpUNCServerName, "Shibboleth ISAPI Filter");
     BOOL res = ReportEvent(hElog, wType, 0, dwEventID, lpUserSid, 1, 0, messages, NULL);
     return (DeregisterEventSource(hElog) && res);
@@ -129,7 +128,7 @@ extern "C" BOOL WINAPI GetExtensionVersion(HSE_VERSION_INFO* pVer)
 {
     if (!pVer)
         return FALSE;
-        
+
     if (!g_Config) {
         LogEvent(NULL, EVENTLOG_ERROR_TYPE, 2100, NULL,
                 "Extension mode startup not possible, is the DLL loaded as a filter?");
@@ -172,20 +171,9 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
         return FALSE;
     }
 
-    LPCSTR config=getenv("SHIBSP_CONFIG");
-    if (!config)
-        config=SHIBSP_CONFIG;
-
     try {
-        DOMDocument* dummydoc=XMLToolingConfig::getConfig().getParser().newDocument();
-        XercesJanitor<DOMDocument> docjanitor(dummydoc);
-        DOMElement* dummy = dummydoc->createElementNS(NULL,path);
-        auto_ptr_XMLCh src(config);
-        dummy->setAttributeNS(NULL,path,src.get());
-        dummy->setAttributeNS(NULL,validate,xmlconstants::XML_ONE);
-
-        g_Config->setServiceProvider(g_Config->ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER,dummy));
-        g_Config->getServiceProvider()->init();
+        if (!g_Config->instantiate(NULL, true))
+            throw runtime_error("unknown error");
     }
     catch (exception& ex) {
         g_Config->term();
@@ -195,7 +183,7 @@ extern "C" BOOL WINAPI GetFilterVersion(PHTTP_FILTER_VERSION pVer)
                 "Filter startup failed to load configuration, check native log for details.");
         return FALSE;
     }
-    
+
     // Access implementation-specifics and site mappings.
     ServiceProvider* sp=g_Config->getServiceProvider();
     Locker locker(sp);
@@ -381,7 +369,7 @@ public:
     else {
         m_port = atoi(site.m_port.c_str());
     }
-    
+
     // Scheme may come from site def or be derived from IIS.
     m_scheme=site.m_scheme;
     if (m_scheme.empty() || !g_bNormalizeRequest)
@@ -393,14 +381,14 @@ public:
     m_hostname = var;
     if (site.m_name!=m_hostname && site.m_aliases.find(m_hostname)==site.m_aliases.end())
         m_hostname=site.m_name;
-    
+
     if (!pfc->pFilterContext) {
         pfc->pFilterContext = pfc->AllocMem(pfc, sizeof(context_t), NULL);
         if (static_cast<context_t*>(pfc->pFilterContext)) {
             static_cast<context_t*>(pfc->pFilterContext)->m_user = NULL;
             static_cast<context_t*>(pfc->pFilterContext)->m_checked = false;
         }
-    }    
+    }
   }
   ~ShibTargetIsapiF() { }
 
@@ -537,7 +525,7 @@ public:
   const vector<string>& getClientCertificates() const {
       return g_NoCerts;
   }
-  
+
   // The filter never processes the POST, so stub these methods.
   const char* getQueryString() const { throw IOException("getQueryString not implemented"); }
   const char* getRequestBody() const { throw IOException("getRequestBody not implemented"); }
@@ -563,9 +551,8 @@ DWORD WriteClientError(PHTTP_FILTER_CONTEXT pfc, const char* msg)
 extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificationType, LPVOID pvNotification)
 {
     // Is this a log notification?
-    if (notificationType==SF_NOTIFY_LOG)
-    {
-        if (pfc->pFilterContext)
+    if (notificationType==SF_NOTIFY_LOG) {
+        if (pfc->pFilterContext && static_cast<context_t*>(pfc->pFilterContext)->m_user)
                ((PHTTP_FILTER_LOG)pvNotification)->pszClientUserName=static_cast<context_t*>(pfc->pFilterContext)->m_user;
         return SF_STATUS_REQ_NEXT_NOTIFICATION;
     }
@@ -581,7 +568,7 @@ extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificat
         map<string,site_t>::const_iterator map_i=g_Sites.find(static_cast<char*>(buf));
         if (map_i==g_Sites.end())
             return SF_STATUS_REQ_NEXT_NOTIFICATION;
-            
+
         ostringstream threadid;
         threadid << "[" << getpid() << "] isapi_shib" << '\0';
         xmltooling::NDC ndc(threadid.str().c_str());
@@ -625,7 +612,7 @@ extern "C" DWORD WINAPI HttpFilterProc(PHTTP_FILTER_CONTEXT pfc, DWORD notificat
 
     return WriteClientError(pfc,"Shibboleth Filter reached unreachable code, save my walrus!");
 }
-        
+
 
 /****************************************************************************/
 // ISAPI Extension
@@ -657,7 +644,7 @@ class ShibTargetIsapiE : public AbstractSPRequest
   int m_port;
   string m_scheme,m_hostname,m_uri;
   mutable string m_remote_addr,m_remote_user;
-  
+
 public:
   ShibTargetIsapiE(LPEXTENSION_CONTROL_BLOCK lpECB, const site_t& site)
       : AbstractSPRequest(SHIBSP_LOGCAT".ISAPI"), m_lpECB(lpECB), m_gotBody(false) {
@@ -701,18 +688,18 @@ public:
      * the server is set up for proper PATH_INFO handling, or "IIS sucks rabid weasels mode",
      * which is the default. No perfect way to tell, but we can take a good guess by checking
      * whether the URL is a substring of the PATH_INFO:
-     * 
+     *
      * e.g. for /Shibboleth.sso/SAML/POST
-     * 
+     *
      *  Bad mode (default):
      *      URL:        /Shibboleth.sso
      *      PathInfo:   /Shibboleth.sso/SAML/POST
-     * 
+     *
      *  Good mode:
      *      URL:        /Shibboleth.sso
      *      PathInfo:   /SAML/POST
      */
-    
+
     string uri;
 
     // Clearly we're only in bad mode if path info exists at all.
@@ -728,7 +715,7 @@ public:
     else {
         uri = url;
     }
-    
+
     // For consistency with Apache, let's add the query string.
     if (lpECB->lpszQueryString && *(lpECB->lpszQueryString)) {
         uri += '?';
@@ -920,7 +907,7 @@ extern "C" DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
         ShibTargetIsapiE ste(lpECB, map_i->second);
         pair<bool,long> res = ste.getServiceProvider().doHandler(ste);
         if (res.first) return res.second;
-        
+
         return WriteClientError(lpECB, "Shibboleth Extension failed to process request");
 
     }
index 6ae70f3..26733a8 100644 (file)
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,0
- PRODUCTVERSION 2,0,0,0
+ FILEVERSION 2,1,0,0
+ PRODUCTVERSION 2,1,0,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -47,14 +47,14 @@ BEGIN
             VALUE "Comments", "\0"
             VALUE "CompanyName", "Internet2\0"
             VALUE "FileDescription", "Shibboleth ISAPI Filter / Extension\0"
-            VALUE "FileVersion", "2, 0, 0, 0\0"
+            VALUE "FileVersion", "2, 1, 0, 0\0"
             VALUE "InternalName", "isapi_shib\0"
-            VALUE "LegalCopyright", "Copyright Â© 2007 Internet2\0"
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "isapi_shib.dll\0"
             VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Shibboleth 2.0\0"
-            VALUE "ProductVersion", "2, 0, 0, 0\0"
+            VALUE "ProductName", "Shibboleth 2.1\0"
+            VALUE "ProductVersion", "2, 1, 0, 0\0"
             VALUE "SpecialBuild", "\0"
         END
     END
index 216a23c..3f1bad4 100644 (file)
@@ -9,6 +9,9 @@
                <Platform
                        Name="Win32"
                />
+               <Platform
+                       Name="x64"
+               />
        </Platforms>
        <ToolFiles>
        </ToolFiles>
@@ -77,8 +80,6 @@
                                LinkIncremental="1"
                                SuppressStartupBanner="true"
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;"
-                               ProgramDatabaseFile=".\Release/isapi_shib.pdb"
-                               ImportLibrary=".\Release/isapi_shib.lib"
                                TargetMachine="1"
                        />
                        <Tool
                                SuppressStartupBanner="true"
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;"
                                GenerateDebugInformation="true"
-                               ImportLibrary=".\Debug/isapi_shib.lib"
                                TargetMachine="1"
                        />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+                       ConfigurationType="2"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               MkTypLibCompatible="true"
+                               SuppressStartupBanner="true"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\Release/isapi_shib.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               InlineFunctionExpansion="1"
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-xmltooling&quot;"
+                               PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x0400"
+                               StringPooling="true"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/export:GetExtensionVersion /export:GetFilterVersion /export:TerminateExtension /export:TerminateFilter /export:HttpFilterProc /export:HttpExtensionProc"
+                               AdditionalDependencies="xerces-c_2.lib xmltooling-lite1.lib"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;"
+                               ProgramDatabaseFile=".\Release/isapi_shib.pdb"
+                               TargetMachine="17"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+                       ConfigurationType="2"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               MkTypLibCompatible="true"
+                               SuppressStartupBanner="true"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\Debug/isapi_shib.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-xmltooling&quot;"
+                               PreprocessorDefinitions="_WINDOWS;WIN32;_DEBUG;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x0400"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalOptions="/export:GetExtensionVersion /export:GetFilterVersion /export:TerminateExtension /export:TerminateFilter /export:HttpFilterProc /export:HttpExtensionProc"
+                               AdditionalDependencies="xerces-c_2D.lib xmltooling-lite1D.lib"
+                               LinkIncremental="2"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;"
+                               GenerateDebugInformation="true"
+                               TargetMachine="17"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
        </Configurations>
        <References>
        </References>
diff --git a/memcache-store/Makefile.am b/memcache-store/Makefile.am
new file mode 100644 (file)
index 0000000..9d46119
--- /dev/null
@@ -0,0 +1,20 @@
+AUTOMAKE_OPTIONS = foreign\r
+\r
+plugindir = $(libdir)/@PACKAGE@\r
+plugin_LTLIBRARIES = memcache-store.la\r
+\r
+AM_CFLAGS = $(MEMCACHED_CFLAGS)\r
+AM_CXXFLAGS = $(MEMCACHED_CFLAGS)\r
+\r
+memcache_store_la_LIBADD = \\r
+       $(MEMCACHED_LIBS)\r
+\r
+memcache_store_la_SOURCES = \\r
+       memcache-store.cpp\r
+\r
+memcache_store_la_LDFLAGS = -module -avoid-version $(XMLSEC_LIBS)\r
+\r
+install-exec-hook:\r
+       for la in $(plugin_LTLIBRARIES) ; do rm -f $(DESTDIR)$(plugindir)/$$la ; done\r
+\r
+EXTRA_DIST = memcache-store.vcproj memcache-store.rc resource.h\r
diff --git a/memcache-store/Makefile.in b/memcache-store/Makefile.in
new file mode 100644 (file)
index 0000000..105883a
--- /dev/null
@@ -0,0 +1,568 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = memcache-store
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
+       $(top_srcdir)/acinclude.m4 $(top_srcdir)/doxygen.m4 \
+       $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(plugindir)"
+pluginLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(plugin_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+memcache_store_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_memcache_store_la_OBJECTS = memcache-store.lo
+memcache_store_la_OBJECTS = $(am_memcache_store_la_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
+       $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+       $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+       $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(memcache_store_la_SOURCES)
+DIST_SOURCES = $(memcache_store_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+APR1_CONFIG = @APR1_CONFIG@
+APR_CONFIG = @APR_CONFIG@
+APXS = @APXS@
+APXS2 = @APXS2@
+APXS22 = @APXS22@
+APXS22_CFLAGS = @APXS22_CFLAGS@
+APXS22_INCLUDE = @APXS22_INCLUDE@
+APXS2_CFLAGS = @APXS2_CFLAGS@
+APXS2_INCLUDE = @APXS2_INCLUDE@
+APXS_CFLAGS = @APXS_CFLAGS@
+APXS_INCLUDE = @APXS_INCLUDE@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_AP13_FALSE = @BUILD_AP13_FALSE@
+BUILD_AP13_TRUE = @BUILD_AP13_TRUE@
+BUILD_AP20_FALSE = @BUILD_AP20_FALSE@
+BUILD_AP20_TRUE = @BUILD_AP20_TRUE@
+BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
+BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
+BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
+BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
+BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
+BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
+DX_COND_chi_FALSE = @DX_COND_chi_FALSE@
+DX_COND_chi_TRUE = @DX_COND_chi_TRUE@
+DX_COND_chm_FALSE = @DX_COND_chm_FALSE@
+DX_COND_chm_TRUE = @DX_COND_chm_TRUE@
+DX_COND_doc_FALSE = @DX_COND_doc_FALSE@
+DX_COND_doc_TRUE = @DX_COND_doc_TRUE@
+DX_COND_dot_FALSE = @DX_COND_dot_FALSE@
+DX_COND_dot_TRUE = @DX_COND_dot_TRUE@
+DX_COND_html_FALSE = @DX_COND_html_FALSE@
+DX_COND_html_TRUE = @DX_COND_html_TRUE@
+DX_COND_latex_FALSE = @DX_COND_latex_FALSE@
+DX_COND_latex_TRUE = @DX_COND_latex_TRUE@
+DX_COND_man_FALSE = @DX_COND_man_FALSE@
+DX_COND_man_TRUE = @DX_COND_man_TRUE@
+DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@
+DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@
+DX_COND_ps_FALSE = @DX_COND_ps_FALSE@
+DX_COND_ps_TRUE = @DX_COND_ps_TRUE@
+DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@
+DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@
+DX_COND_xml_FALSE = @DX_COND_xml_FALSE@
+DX_COND_xml_TRUE = @DX_COND_xml_TRUE@
+DX_CONFIG = @DX_CONFIG@
+DX_DOCDIR = @DX_DOCDIR@
+DX_DOT = @DX_DOT@
+DX_DOXYGEN = @DX_DOXYGEN@
+DX_DVIPS = @DX_DVIPS@
+DX_EGREP = @DX_EGREP@
+DX_ENV = @DX_ENV@
+DX_FLAG_chi = @DX_FLAG_chi@
+DX_FLAG_chm = @DX_FLAG_chm@
+DX_FLAG_doc = @DX_FLAG_doc@
+DX_FLAG_dot = @DX_FLAG_dot@
+DX_FLAG_html = @DX_FLAG_html@
+DX_FLAG_man = @DX_FLAG_man@
+DX_FLAG_pdf = @DX_FLAG_pdf@
+DX_FLAG_ps = @DX_FLAG_ps@
+DX_FLAG_rtf = @DX_FLAG_rtf@
+DX_FLAG_xml = @DX_FLAG_xml@
+DX_HHC = @DX_HHC@
+DX_LATEX = @DX_LATEX@
+DX_MAKEINDEX = @DX_MAKEINDEX@
+DX_PDFLATEX = @DX_PDFLATEX@
+DX_PERL = @DX_PERL@
+DX_PROJECT = @DX_PROJECT@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FASTCGI_INCLUDE = @FASTCGI_INCLUDE@
+FASTCGI_LDFLAGS = @FASTCGI_LDFLAGS@
+FASTCGI_LIBS = @FASTCGI_LIBS@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LITE_LIBS = @LITE_LIBS@
+LN_S = @LN_S@
+LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
+LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
+NSAPI_INCLUDE = @NSAPI_INCLUDE@
+OBJEXT = @OBJEXT@
+ODBC_CFLAGS = @ODBC_CFLAGS@
+ODBC_CONFIG = @ODBC_CONFIG@
+ODBC_LIBS = @ODBC_LIBS@
+OPENSAMLXMLDIR = @OPENSAMLXMLDIR@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WANT_SUBDIRS = @WANT_SUBDIRS@
+XMLSEC_LIBS = @XMLSEC_LIBS@
+XMLTOOLINGXMLDIR = @XMLTOOLINGXMLDIR@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+ac_pt_DX_DOT = @ac_pt_DX_DOT@
+ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@
+ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@
+ac_pt_DX_EGREP = @ac_pt_DX_EGREP@
+ac_pt_DX_HHC = @ac_pt_DX_HHC@
+ac_pt_DX_LATEX = @ac_pt_DX_LATEX@
+ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@
+ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@
+ac_pt_DX_PERL = @ac_pt_DX_PERL@
+acx_pthread_config = @acx_pthread_config@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+xs = @xs@
+AUTOMAKE_OPTIONS = foreign
+plugindir = $(libdir)/@PACKAGE@
+plugin_LTLIBRARIES = memcache-store.la
+AM_CFLAGS = $(MEMCACHED_CFLAGS)
+AM_CXXFLAGS = $(MEMCACHED_CFLAGS)
+memcache_store_la_LIBADD = \
+       $(MEMCACHED_LIBS)
+
+memcache_store_la_SOURCES = \
+       memcache-store.cpp
+
+memcache_store_la_LDFLAGS = -module -avoid-version $(XMLSEC_LIBS)
+EXTRA_DIST = memcache-store.vcproj memcache-store.rc resource.h
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  memcache-store/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --foreign  memcache-store/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)"
+       @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+         if test -f $$p; then \
+           f=$(am__strip_dir) \
+           echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
+           $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \
+         else :; fi; \
+       done
+
+uninstall-pluginLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+         p=$(am__strip_dir) \
+         echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \
+         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \
+       done
+
+clean-pluginLTLIBRARIES:
+       -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES)
+       @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+memcache-store.la: $(memcache_store_la_OBJECTS) $(memcache_store_la_DEPENDENCIES) 
+       $(CXXLINK) -rpath $(plugindir) $(memcache_store_la_LDFLAGS) $(memcache_store_la_OBJECTS) $(memcache_store_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcache-store.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@  if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+distclean-libtool:
+       -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+           $$tags $$unique; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       tags=; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '    { files[$$0] = 1; } \
+              END { for (i in files) print i; }'`; \
+       test -z "$(CTAGS_ARGS)$$tags$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$tags $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && cd $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+           $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+         esac; \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           dir="/$$dir"; \
+           $(mkdir_p) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
+         fi; \
+         if test -d $$d/$$file; then \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+       for dir in "$(DESTDIR)$(plugindir)"; do \
+         test -z "$$dir" || $(mkdir_p) "$$dir"; \
+       done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pluginLTLIBRARIES
+
+install-exec-am:
+       @$(NORMAL_INSTALL)
+       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-pluginLTLIBRARIES
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-pluginLTLIBRARIES ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-exec \
+       install-exec-am install-exec-hook install-info install-info-am \
+       install-man install-pluginLTLIBRARIES install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       tags uninstall uninstall-am uninstall-info-am \
+       uninstall-pluginLTLIBRARIES
+
+
+install-exec-hook:
+       for la in $(plugin_LTLIBRARIES) ; do rm -f $(DESTDIR)$(plugindir)/$$la ; done
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/memcache-store/memcache-store.cpp b/memcache-store/memcache-store.cpp
new file mode 100644 (file)
index 0000000..d1fb373
--- /dev/null
@@ -0,0 +1,738 @@
+/*\r
+ *  Copyright 2001-2008 Internet2\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/**\r
+ * memcache-store.cpp\r
+ *\r
+ * Storage Service using memcache (pre memcache tags)\r
+ */\r
+\r
+#if defined (_MSC_VER) || defined(__BORLANDC__)\r
+# include "config_win32.h"\r
+#else\r
+# include "config.h"\r
+#endif\r
+\r
+#include <xercesc/util/XMLUniDefs.hpp>\r
+\r
+#include <xmltooling/logging.h>\r
+\r
+#include <xmltooling/XMLToolingConfig.h>\r
+#include <xmltooling/util/NDC.h>\r
+#include <xmltooling/util/StorageService.h>\r
+#include <xmltooling/util/XMLHelper.h>\r
+\r
+#include <libmemcached/memcached.h>\r
+\r
+using namespace xmltooling::logging;\r
+using namespace xmltooling;\r
+using namespace xercesc;\r
+using namespace std;\r
+\r
+namespace xmltooling {\r
+  static const XMLCh Hosts[] = UNICODE_LITERAL_5(H,o,s,t,s);\r
+  static const XMLCh prefix[] = UNICODE_LITERAL_6(p,r,e,f,i,x);\r
+  static const XMLCh buildMap[] = UNICODE_LITERAL_8(b,u,i,l,d,M,a,p);\r
+  \r
+  class mc_record {\r
+  public:\r
+    string value;\r
+    time_t expiration;\r
+    mc_record(){};\r
+    mc_record(string _v, time_t _e) :\r
+      value(_v), expiration(_e)\r
+    {}\r
+  };\r
+\r
+  class MemcacheBase {\r
+  public:\r
+    MemcacheBase(const DOMElement* e);\r
+    ~MemcacheBase();\r
+        \r
+    bool addMemcache(const char *key,\r
+                     string &value,\r
+                     time_t timeout,\r
+                     uint32_t flags,\r
+                     bool use_prefix = true);\r
+    bool setMemcache(const char *key,\r
+                     string &value,\r
+                     time_t timeout,\r
+                     uint32_t flags,\r
+                     bool use_prefix = true);\r
+    bool replaceMemcache(const char *key,\r
+                         string &value,\r
+                         time_t timeout,\r
+                         uint32_t flags,\r
+                         bool use_prefix = true);\r
+    bool getMemcache(const char *key,\r
+                     string &dest,\r
+                     uint32_t *flags,\r
+                     bool use_prefix = true);\r
+    bool deleteMemcache(const char *key,\r
+                        time_t timeout,\r
+                        bool use_prefix = true);\r
+\r
+    void serialize(mc_record &source, string &dest);\r
+    void serialize(list<string> &source, string &dest);\r
+    void deserialize(string &source, mc_record &dest);\r
+    void deserialize(string &source, list<string> &dest);\r
+\r
+    bool addSessionToUser(string &key, string &user);\r
+    bool addLock(string what, bool use_prefix = true);\r
+    void deleteLock(string what, bool use_prefix = true);\r
+\r
+  protected:\r
+    const DOMElement* m_root; // can only use this during initialization\r
+    Category& log;\r
+    memcached_st *memc;\r
+    string m_memcacheHosts;\r
+    string m_prefix;\r
+    \r
+  };\r
+  \r
+  class MemcacheStorageService : public StorageService, public MemcacheBase {\r
+\r
+  public:\r
+    MemcacheStorageService(const DOMElement* e);\r
+    ~MemcacheStorageService();\r
+    \r
+    bool createString(const char* context, const char* key, const char* value, time_t expiration);\r
+    int readString(const char* context, const char* key, string* pvalue=NULL, time_t* pexpiration=NULL, int version=0);\r
+    int updateString(const char* context, const char* key, const char* value=NULL, time_t expiration=0, int version=0);\r
+    bool deleteString(const char* context, const char* key);\r
+    \r
+    bool createText(const char* context, const char* key, const char* value, time_t expiration) {\r
+      return createString(context, key, value, expiration);\r
+    }\r
+    int readText(const char* context, const char* key, string* pvalue=NULL, time_t* pexpiration=NULL, int version=0) {\r
+      return readString(context, key, pvalue, pexpiration, version);\r
+    }\r
+    int updateText(const char* context, const char* key, const char* value=NULL, time_t expiration=0, int version=0) {\r
+      return updateString(context, key, value, expiration, version);\r
+    }\r
+    bool deleteText(const char* context, const char* key) {\r
+      return deleteString(context, key);\r
+    }\r
+    \r
+    void reap(const char* context) {}\r
+\r
+    void updateContext(const char* context, time_t expiration);\r
+    void deleteContext(const char* context);\r
+\r
+    private:\r
+\r
+    Category& m_log;\r
+    bool m_buildMap;\r
+\r
+\r
+  };\r
+\r
+  StorageService* MemcacheStorageServiceFactory(const DOMElement* const & e) {\r
+    return new MemcacheStorageService(e);\r
+  }\r
+\r
+};\r
+\r
+bool MemcacheBase::addLock(string what, bool use_prefix) {\r
+  string lock_name = what + ":LOCK";\r
+  string set_val = "1";\r
+  unsigned tries = 5;\r
+  while (!addMemcache(lock_name.c_str(), set_val, 5, 0, use_prefix)) {\r
+    if (tries-- < 0) {\r
+      log.debug("Unable to get lock %s... FAILED.", lock_name.c_str());\r
+      return false;\r
+    }\r
+    log.debug("Unable to get lock %s... Retrying.", lock_name.c_str());\r
+    \r
+    // sleep 100ms\r
+    struct timeval tv = { 0, 100000 };\r
+    select(0, 0, 0, 0, &tv);    \r
+  }\r
+  return true;\r
+}\r
+\r
+void MemcacheBase::deleteLock(string what, bool use_prefix) {\r
+\r
+  string lock_name = what + ":LOCK";\r
+  deleteMemcache(lock_name.c_str(), 0, use_prefix);\r
+  return;\r
+\r
+}  \r
+\r
+void MemcacheBase::deserialize(string &source, mc_record &dest) {\r
+  istringstream is(source, stringstream::in | stringstream::out);\r
+  is >> dest.expiration;\r
+  is.ignore(1); // ignore delimiter\r
+  dest.value = is.str().c_str() + is.tellg();\r
+}\r
+\r
+void MemcacheBase::deserialize(string &source, list<string> &dest) {\r
+  istringstream is(source, stringstream::in | stringstream::out);\r
+  while (!is.eof()) {\r
+    string s;\r
+    is >> s;\r
+    dest.push_back(s);\r
+  }  \r
+}\r
+\r
+void MemcacheBase::serialize(mc_record &source, string &dest) {\r
+  ostringstream os(stringstream::in | stringstream::out);\r
+  os << source.expiration;\r
+  os << "-"; // delimiter\r
+  os << source.value;\r
+  dest = os.str();\r
+}\r
+\r
+void MemcacheBase::serialize(list<string> &source, string &dest) {  \r
+  ostringstream os(stringstream::in | stringstream::out);\r
+  for(list<string>::iterator iter = source.begin(); iter != source.end(); iter++) {\r
+    if (iter != source.begin()) {\r
+      os << endl;\r
+    }\r
+    os << *iter;\r
+  }\r
+  dest = os.str();\r
+}\r
+\r
+bool MemcacheBase::addSessionToUser(string &key, string &user) {\r
+\r
+  if (! addLock(user, false)) {\r
+    return false;\r
+  }\r
+\r
+  // Aquired lock\r
+\r
+  string sessid = m_prefix + key; // add specific prefix to session\r
+  string delimiter = ";";\r
+  string user_key = "UDATA:";\r
+  user_key += user;\r
+  string user_val;\r
+  uint32_t flags;\r
+  bool result = getMemcache(user_key.c_str(), user_val, &flags, false);\r
+\r
+  if (result) {\r
+    bool already_there = false;\r
+    // skip delimiters at beginning.\r
+    string::size_type lastPos = user_val.find_first_not_of(delimiter, 0);\r
+    \r
+    // find first "non-delimiter".\r
+    string::size_type pos = user_val.find_first_of(delimiter, lastPos);\r
+    \r
+    while (string::npos != pos || string::npos != lastPos) {\r
+      // found a token, add it to the vector.\r
+      string session = user_val.substr(lastPos, pos - lastPos);\r
+      if (strcmp(session.c_str(), sessid.c_str()) == 0) {\r
+        already_there = true;\r
+        break;\r
+      }\r
+      \r
+      // skip delimiters.  Note the "not_of"\r
+      lastPos = user_val.find_first_not_of(delimiter, pos);\r
+      \r
+      // find next "non-delimiter"\r
+      pos = user_val.find_first_of(delimiter, lastPos);\r
+    }\r
+    \r
+    if (!already_there) {\r
+      user_val += delimiter + sessid;\r
+      replaceMemcache(user_key.c_str(), user_val, 0, 0, false);\r
+    }\r
+  } else {\r
+    addMemcache(user_key.c_str(), sessid, 0, 0, false);\r
+  }\r
+\r
+  deleteLock(user, false);\r
+  return true;\r
+  \r
+}\r
+\r
+bool MemcacheBase::deleteMemcache(const char *key,\r
+                                  time_t timeout,\r
+                                  bool use_prefix) {\r
+  memcached_return rv;\r
+  string final_key;\r
+  memcached_st clone;\r
+  bool success;\r
+\r
+  if (use_prefix) {\r
+    final_key = m_prefix + key;\r
+  } else {\r
+    final_key = key;\r
+  }\r
+\r
+  if (memcached_clone(&clone, memc) == NULL) {\r
+    throw IOException("MemcacheBase::deleteMemcache(): memcached_clone() failed");\r
+  }\r
+\r
+  rv = memcached_delete(&clone, (char *)final_key.c_str(), final_key.length(), timeout);\r
+  if (rv == MEMCACHED_SUCCESS) {\r
+    success = true;\r
+  } else if (rv == MEMCACHED_NOTFOUND) {\r
+    // Key wasn't there... No biggie.\r
+    success = false;\r
+  } else {\r
+    log.error(string("Memcache::deleteMemcache() Problems: ") + memcached_strerror(&clone, rv));\r
+    // shouldn't be here\r
+    success = false;\r
+  }\r
+\r
+  memcached_free(&clone);\r
+  return success;\r
+}\r
+\r
+bool MemcacheBase::getMemcache(const char *key,\r
+                               string &dest,\r
+                               uint32_t *flags,\r
+                               bool use_prefix) {\r
+  memcached_return rv;\r
+  size_t len;\r
+  char *result;\r
+  string final_key;\r
+  memcached_st clone;\r
+  bool success;\r
+  \r
+  if (use_prefix) {\r
+    final_key = m_prefix + key;\r
+  } else {\r
+    final_key = key;\r
+  }\r
+\r
+  if (memcached_clone(&clone, memc) == NULL) {\r
+    throw IOException("MemcacheBase::getMemcache(): memcached_clone() failed");\r
+  }\r
+\r
+  result = memcached_get(&clone, (char *)final_key.c_str(), final_key.length(), &len, flags, &rv);\r
+  if (rv == MEMCACHED_SUCCESS) {\r
+    dest = result;\r
+    free(result);\r
+    success = true;\r
+  } else if (rv == MEMCACHED_NOTFOUND) {\r
+    log.debug("Key %s not found in memcache...", key);\r
+    success = false;\r
+  } else {\r
+    log.error(string("Memcache::getMemcache() Problems: ") + memcached_strerror(&clone, rv));\r
+    success = false;\r
+  }\r
+\r
+  memcached_free(&clone);\r
+  return success;\r
+}\r
+\r
+bool MemcacheBase::addMemcache(const char *key,\r
+                               string &value,\r
+                               time_t timeout,\r
+                               uint32_t flags,\r
+                               bool use_prefix) {\r
+\r
+  memcached_return rv;\r
+  string final_key;\r
+  memcached_st clone;\r
+  bool success;\r
+\r
+  if (use_prefix) {\r
+    final_key = m_prefix + key;\r
+  } else {\r
+    final_key = key;\r
+  }\r
+\r
+  if (memcached_clone(&clone, memc) == NULL) {\r
+    throw IOException("MemcacheBase::addMemcache(): memcached_clone() failed");\r
+  }\r
+\r
+  rv = memcached_add(&clone, (char *)final_key.c_str(), final_key.length(), (char *)value.c_str(), value.length(), timeout, flags);\r
+  if (rv == MEMCACHED_SUCCESS) {\r
+    success = true;\r
+  } else if (rv == MEMCACHED_NOTSTORED) {\r
+    // already there\r
+    success = false;\r
+  } else {\r
+    // shouldn't be here\r
+    log.error(string("Memcache::addMemcache() Problems: ") + memcached_strerror(&clone, rv));\r
+    success = false;\r
+  }\r
+\r
+  memcached_free(&clone);\r
+  return success;\r
+}\r
+\r
+bool MemcacheBase::setMemcache(const char *key,\r
+                               string &value,\r
+                               time_t timeout,\r
+                               uint32_t flags,\r
+                               bool use_prefix) {\r
+\r
+  memcached_return rv;\r
+  string final_key;\r
+  memcached_st clone;\r
+  bool success;\r
+\r
+  if (use_prefix) {\r
+    final_key = m_prefix + key;\r
+  } else {\r
+    final_key = key;\r
+  }\r
+\r
+  if (memcached_clone(&clone, memc) == NULL) {\r
+    throw IOException("MemcacheBase::setMemcache(): memcached_clone() failed");\r
+  }\r
+\r
+  rv = memcached_set(&clone, (char *)final_key.c_str(), final_key.length(), (char *)value.c_str(), value.length(), timeout, flags);\r
+  if (rv == MEMCACHED_SUCCESS) {\r
+    success = true;\r
+  } else {\r
+    // shouldn't be here\r
+    log.error(string("Memcache::setMemcache() Problems: ") + memcached_strerror(&clone, rv));\r
+    success = false;\r
+  }\r
+\r
+  memcached_free(&clone);\r
+  return success;\r
+}\r
+\r
+bool MemcacheBase::replaceMemcache(const char *key,\r
+                                   string &value,\r
+                                   time_t timeout,\r
+                                   uint32_t flags,\r
+                                   bool use_prefix) {\r
+  \r
+  memcached_return rv;\r
+  string final_key;\r
+  memcached_st clone;\r
+  bool success;\r
+\r
+  if (use_prefix) {\r
+    final_key = m_prefix + key;\r
+  } else {\r
+    final_key = key;\r
+  }\r
+\r
+  if (memcached_clone(&clone, memc) == NULL) {\r
+    throw IOException("MemcacheBase::replaceMemcache(): memcached_clone() failed");\r
+  }\r
+\r
+  rv = memcached_replace(&clone, (char *)final_key.c_str(), final_key.length(), (char *)value.c_str(), value.length(), timeout, flags);\r
+  if (rv == MEMCACHED_SUCCESS) {\r
+    success = true;\r
+  } else if (rv == MEMCACHED_NOTSTORED) {\r
+    // not there\r
+    success = false;\r
+  } else {\r
+    // shouldn't be here\r
+    log.error(string("Memcache::replaceMemcache() Problems: ") + memcached_strerror(&clone, rv));\r
+    success = false;\r
+  }\r
+\r
+  memcached_free(&clone);\r
+  return success;\r
+}\r
+\r
+MemcacheBase::MemcacheBase(const DOMElement* e) : m_root(e), log(Category::getInstance("XMLTooling.MemcacheBase")), m_memcacheHosts(""), m_prefix("") {\r
+\r
+  auto_ptr_char p(e ? e->getAttributeNS(NULL,prefix) : NULL);\r
+  if (p.get() && *p.get()) {\r
+    log.debug("INIT: GOT key prefix: %s", p.get());\r
+    m_prefix = p.get();\r
+  }\r
+\r
+  // Grab hosts from the configuration.\r
+  e = e ? XMLHelper::getFirstChildElement(e,Hosts) : NULL;\r
+  if (!e || !e->hasChildNodes()) {\r
+    throw XMLToolingException("Memcache StorageService requires Hosts element in configuration.");\r
+  }\r
+  auto_ptr_char h(e->getFirstChild()->getNodeValue());\r
+  log.debug("INIT: GOT Hosts: %s", h.get());\r
+  m_memcacheHosts = h.get();\r
+\r
+  memc = memcached_create(NULL);\r
+  if (memc == NULL) {\r
+    throw XMLToolingException("MemcacheBase::Memcache(): memcached_create() failed");\r
+  }\r
+\r
+  log.debug("Memcache created");\r
+\r
+  unsigned int set = MEMCACHED_HASH_CRC;\r
+  memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, set);\r
+  log.debug("CRC hash set");\r
+\r
+  memcached_server_st *servers;\r
+  servers = memcached_servers_parse((char *)m_memcacheHosts.c_str());\r
+  log.debug("Got %u hosts.",  memcached_server_list_count(servers));\r
+  if (memcached_server_push(memc, servers) != MEMCACHED_SUCCESS) {\r
+    throw IOException("MemcacheBase::Memcache(): memcached_server_push() failed");    \r
+  }\r
+  memcached_server_list_free(servers);\r
+\r
+  log.debug("Memcache object initialized");\r
+}\r
+\r
+MemcacheBase::~MemcacheBase() {\r
+  memcached_free(memc);\r
+  log.debug("Base object destroyed");\r
+}\r
+\r
+MemcacheStorageService::MemcacheStorageService(const DOMElement* e)\r
+  : MemcacheBase(e), m_log(Category::getInstance("XMLTooling.MemcacheStorageService")), m_buildMap(false) {\r
+\r
+    const XMLCh* tag=e ? e->getAttributeNS(NULL,buildMap) : NULL;\r
+    if (tag && *tag && XMLString::parseInt(tag) != 0) {\r
+        m_buildMap = true;\r
+        m_log.debug("Cache built with buildMap ON");\r
+    }\r
+\r
+}\r
+\r
+MemcacheStorageService::~MemcacheStorageService() {\r
+\r
+  \r
+}\r
+\r
+bool MemcacheStorageService::createString(const char* context, const char* key, const char* value, time_t expiration) {\r
+\r
+  log.debug("createString ctx: %s - key: %s", context, key);\r
+\r
+  string final_key = string(context) + ":" + string(key);\r
+\r
+  mc_record rec(value, expiration);\r
+  string final_value;\r
+  serialize(rec, final_value);\r
+\r
+  bool result = addMemcache(final_key.c_str(), final_value, expiration, 1); // the flag will be the version\r
+\r
+  if (result && m_buildMap) {\r
+    log.debug("Got result, updating map");\r
+\r
+    string map_name = context;\r
+    // we need to update the context map\r
+    if (! addLock(map_name)) {\r
+      log.error("Unable to get lock for context %s!", context);\r
+      deleteMemcache(final_key.c_str(), 0);\r
+      return false;\r
+    }\r
+\r
+    string ser_arr;\r
+    uint32_t flags;\r
+    bool result = getMemcache(map_name.c_str(), ser_arr, &flags);\r
+    \r
+    list<string> contents;\r
+    if (result) {\r
+      log.debug("Match found. Parsing...");\r
+\r
+      deserialize(ser_arr, contents);\r
+      \r
+      log.debug("Iterating retrieved session map...");\r
+      list<string>::iterator iter;\r
+      for(iter = contents.begin(); \r
+          iter != contents.end();\r
+          iter++) {\r
+        log.debug("value = " + *iter);\r
+      }\r
+\r
+    } else {\r
+      log.debug("New context: %s", map_name.c_str());\r
+\r
+    }\r
+\r
+    contents.push_back(key);\r
+    serialize(contents, ser_arr);    \r
+    setMemcache(map_name.c_str(), ser_arr, expiration, 0);    \r
+    \r
+    deleteLock(map_name);\r
+  }\r
+\r
+  return result;  \r
+\r
+}\r
+\r
+int MemcacheStorageService::readString(const char* context, const char* key, string* pvalue, time_t* pexpiration, int version) {\r
+\r
+  log.debug("readString ctx: %s - key: %s", context, key);\r
+\r
+  string final_key = string(context) + ":" + string(key);\r
+  uint32_t rec_version;\r
+  string value;\r
+\r
+  bool found = getMemcache(final_key.c_str(), value, &rec_version);\r
+  if (!found) {\r
+    return 0;\r
+  }\r
+\r
+  if (version && rec_version <= (uint32_t)version) {\r
+    return version;\r
+  }\r
+\r
+  if (pexpiration || pvalue) {\r
+    mc_record rec;\r
+    deserialize(value, rec);\r
+    \r
+    if (pexpiration) {\r
+      *pexpiration = rec.expiration;\r
+    }\r
+    \r
+    if (pvalue) {\r
+      *pvalue = rec.value;\r
+    }\r
+  }\r
+  \r
+  return rec_version;\r
+\r
+}\r
+\r
+int MemcacheStorageService::updateString(const char* context, const char* key, const char* value, time_t expiration, int version) {\r
+\r
+  log.debug("updateString ctx: %s - key: %s", context, key);\r
+\r
+  time_t final_exp = expiration;\r
+  time_t *want_expiration = NULL;\r
+  if (! final_exp) {\r
+    want_expiration = &final_exp;\r
+  }\r
+\r
+  int read_res = readString(context, key, NULL, want_expiration, version);\r
+\r
+  if (!read_res) {\r
+    // not found\r
+    return read_res;\r
+  }\r
+\r
+  if (version && version != read_res) {\r
+    // version incorrect\r
+    return -1;\r
+  }\r
+\r
+  // Proceding with update\r
+  string final_key = string(context) + ":" + string(key);\r
+  mc_record rec(value, final_exp);\r
+  string final_value;\r
+  serialize(rec, final_value);\r
+\r
+  replaceMemcache(final_key.c_str(), final_value, final_exp, ++version);\r
+  return version;\r
+\r
+}\r
+\r
+bool MemcacheStorageService::deleteString(const char* context, const char* key) {\r
+\r
+  log.debug("deleteString ctx: %s - key: %s", context, key);\r
+  \r
+  string final_key = string(context) + ":" + string(key);\r
+\r
+  // Not updating context map, if there is one. There is no need.\r
+\r
+  return deleteMemcache(final_key.c_str(), 0);\r
+\r
+}\r
+\r
+void MemcacheStorageService::updateContext(const char* context, time_t expiration) {\r
+\r
+  log.debug("updateContext ctx: %s", context);\r
+\r
+  if (!m_buildMap) {\r
+    log.error("updateContext invoked on a Storage with no context map built!");\r
+    return;\r
+  }\r
+\r
+  string map_name = context;\r
+  \r
+  if (! addLock(map_name)) {\r
+    log.error("Unable to get lock for context %s!", context);\r
+    return;\r
+  }\r
+  \r
+  string ser_arr;\r
+  uint32_t flags;\r
+  bool result = getMemcache(map_name.c_str(), ser_arr, &flags);\r
+  \r
+  list<string> contents;\r
+  if (result) {\r
+    log.debug("Match found. Parsing...");\r
+    \r
+    deserialize(ser_arr, contents);\r
+    \r
+    log.debug("Iterating retrieved session map...");\r
+    list<string>::iterator iter;\r
+    for(iter = contents.begin(); \r
+        iter != contents.end();\r
+        iter++) {\r
+\r
+      // Update expiration times\r
+      string value;      \r
+      int read_res = readString(context, iter->c_str(), &value, NULL, 0);\r
+      \r
+      if (!read_res) {\r
+        // not found\r
+        continue;\r
+      }\r
+\r
+      updateString(context, iter->c_str(), value.c_str(), expiration, read_res);\r
+    }\r
+    replaceMemcache(map_name.c_str(), ser_arr, expiration, flags);\r
+  }\r
+  \r
+  deleteLock(map_name);\r
+  \r
+}\r
+\r
+void MemcacheStorageService::deleteContext(const char* context) {\r
+\r
+  log.debug("deleteContext ctx: %s", context);\r
+\r
+  if (!m_buildMap) {\r
+    log.error("deleteContext invoked on a Storage with no context map built!");\r
+    return;\r
+  }\r
+\r
+  string map_name = context;\r
+  \r
+  if (! addLock(map_name)) {\r
+    log.error("Unable to get lock for context %s!", context);\r
+    return;\r
+  }\r
+  \r
+  string ser_arr;\r
+  uint32_t flags;\r
+  bool result = getMemcache(map_name.c_str(), ser_arr, &flags);\r
+  \r
+  list<string> contents;\r
+  if (result) {\r
+    log.debug("Match found. Parsing...");\r
+    \r
+    deserialize(ser_arr, contents);\r
+    \r
+    log.debug("Iterating retrieved session map...");\r
+    list<string>::iterator iter;\r
+    for(iter = contents.begin(); \r
+        iter != contents.end();\r
+        iter++) {\r
+      string final_key = map_name + *iter;\r
+      deleteMemcache(final_key.c_str(), 0);\r
+    }\r
+    \r
+    deleteMemcache(map_name.c_str(), 0);\r
+  }\r
+  \r
+  deleteLock(map_name);\r
+\r
+}\r
+\r
+extern "C" int xmltooling_extension_init(void*) {\r
+    // Register this SS type\r
+    XMLToolingConfig::getConfig().StorageServiceManager.registerFactory("MEMCACHE", MemcacheStorageServiceFactory);\r
+    return 0;\r
+}\r
+\r
+extern "C" void xmltooling_extension_term() {\r
+    XMLToolingConfig::getConfig().StorageServiceManager.deregisterFactory("MEMCACHE");\r
+}\r
diff --git a/memcache-store/memcache-store.rc b/memcache-store/memcache-store.rc
new file mode 100644 (file)
index 0000000..ee39660
--- /dev/null
@@ -0,0 +1,101 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 2,1,0,0
+ PRODUCTVERSION 2,1,0,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName", "Internet2\0"
+            VALUE "FileDescription", "Shibboleth Memcache Storage Service Plugin\0"
+            VALUE "FileVersion", "2, 1, 0, 0\0"
+            VALUE "InternalName", "memcache-store\0"
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"
+            VALUE "OriginalFilename", "memcache-store.so\0"
+            VALUE "ProductName", "Shibboleth 2.1\0"
+            VALUE "ProductVersion", "2, 1, 0, 0\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
\ No newline at end of file
diff --git a/memcache-store/memcache-store.vcproj b/memcache-store/memcache-store.vcproj
new file mode 100644 (file)
index 0000000..854aad3
--- /dev/null
@@ -0,0 +1,357 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="memcache-store"\r
+       ProjectGUID="{666A63A7-983F-4C19-8411-207F24305198}"\r
+       RootNamespace="memcachestore"\r
+       Keyword="Win32Proj"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1D.lib xerces-c_2D.lib xmltooling1D.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName).so"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"\r
+                               RuntimeLibrary="2"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1.lib xerces-c_2.lib xmltooling1.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName).so"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(ConfigurationName)"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1D.lib xerces-c_2D.lib xmltooling1D.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName).so"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"\r
+                               RuntimeLibrary="2"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1.lib xerces-c_2.lib xmltooling1.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName).so"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <File\r
+                       RelativePath=".\memcache-store.cpp"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath=".\memcache-store.rc"\r
+                       >\r
+               </File>\r
+               <File\r
+                       RelativePath=".\resource.h"\r
+                       >\r
+               </File>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/memcache-store/resource.h b/memcache-store/resource.h
new file mode 100644 (file)
index 0000000..42c4d44
--- /dev/null
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}\r
+// Microsoft Visual C++ generated include file.\r
+// Used by memcache-store.rc\r
+\r
+// Next default values for new objects\r
+// \r
+#ifdef APSTUDIO_INVOKED\r
+#ifndef APSTUDIO_READONLY_SYMBOLS\r
+#define _APS_NEXT_RESOURCE_VALUE        101\r
+#define _APS_NEXT_COMMAND_VALUE         40001\r
+#define _APS_NEXT_CONTROL_VALUE         1001\r
+#define _APS_NEXT_SYMED_VALUE           101\r
+#endif\r
+#endif\r
diff --git a/missing b/missing
index fc54c64..894e786 100755 (executable)
--- a/missing
+++ b/missing
@@ -1,6 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -15,8 +19,8 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -38,18 +42,24 @@ else
   configure_ac=configure.in
 fi
 
+msg="missing on your system"
+
 case "$1" in
 --run)
   # Try to run requested program, and just exit if it succeeds.
   run=
   shift
   "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
   ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
 
   -h|--h|--he|--hel|--help)
     echo "\
@@ -74,11 +84,15 @@ Supported PROGRAM values:
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
   tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+    exit $?
     ;;
 
   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing 0.4 - GNU automake"
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
     ;;
 
   -*)
@@ -87,14 +101,44 @@ Supported PROGRAM values:
     exit 1
     ;;
 
-  aclocal*)
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
     if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
        # We have it, but it failed.
        exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
     fi
+    ;;
+esac
 
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
          to install the \`Automake' and \`Perl' packages.  Grab them from
          any GNU archive site."
@@ -102,13 +146,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autoconf)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
          \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
          archive site."
@@ -116,13 +155,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autoheader)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
          from any GNU archive site."
@@ -140,13 +174,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   automake*)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
          You might want to install the \`Automake' and \`Perl' packages.
          Grab them from any GNU archive site."
@@ -156,14 +185,9 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   autom4te)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.
          You can get \`$1' as part of \`Autoconf' from any GNU
          archive site."
@@ -185,7 +209,7 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
 
   bison|yacc)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
          in order for those modifications to take effect.  You can get
          \`Bison' from any GNU archive site."
@@ -215,7 +239,7 @@ WARNING: \`$1' is missing on your system.  You should only need it if
 
   lex|flex)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site."
@@ -237,13 +261,8 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   help2man)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
         \`Help2man' package in order for those modifications to take
         effect.  You can get \`Help2man' from any GNU archive site."
@@ -262,32 +281,30 @@ WARNING: \`$1' is missing on your system.  You should only need it if
     ;;
 
   makeinfo)
-    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
-       # We have makeinfo, but it failed.
-       exit 1
-    fi
-
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
          indirectly affecting the aspect of the manual.  The spurious
          call might also be the consequence of using a buggy \`make' (AIX,
          DU, IRIX).  You might want to install the \`Texinfo' package or
          the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
     file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
     if test -z "$file"; then
-      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
     fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
     touch $file
     ;;
 
   tar)
     shift
-    if test -n "$run"; then
-      echo 1>&2 "ERROR: \`tar' requires --run"
-      exit 1
-    fi
 
     # We have already tried tar in the generic part.
     # Look for gnutar/gtar before invocation to avoid ugly error
@@ -323,8 +340,8 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
 
   *)
     echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.  Check the \`README' file,
          it often tells you about the needed prerequisites for installing
          this package.  You may also peek at any GNU archive site, in case
@@ -334,3 +351,10 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
 esac
 
 exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/mkinstalldirs b/mkinstalldirs
deleted file mode 100755 (executable)
index d2d5f21..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-errstatus=0
-dirmode=""
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
-
-# process command line arguments
-while test $# -gt 0 ; do
-  case $1 in
-    -h | --help | --h*)         # -h for help
-      echo "$usage" 1>&2
-      exit 0
-      ;;
-    -m)                         # -m PERM arg
-      shift
-      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
-      dirmode=$1
-      shift
-      ;;
-    --)                         # stop option processing
-      shift
-      break
-      ;;
-    -*)                         # unknown option
-      echo "$usage" 1>&2
-      exit 1
-      ;;
-    *)                          # first non-opt arg
-      break
-      ;;
-  esac
-done
-
-for file
-do
-  if test -d "$file"; then
-    shift
-  else
-    break
-  fi
-done
-
-case $# in
-  0) exit 0 ;;
-esac
-
-case $dirmode in
-  '')
-    if mkdir -p -- . 2>/dev/null; then
-      echo "mkdir -p -- $*"
-      exec mkdir -p -- "$@"
-    fi
-    ;;
-  *)
-    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
-      echo "mkdir -m $dirmode -p -- $*"
-      exec mkdir -m "$dirmode" -p -- "$@"
-    fi
-    ;;
-esac
-
-for file
-do
-  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-  shift
-
-  pathcomp=
-  for d
-  do
-    pathcomp="$pathcomp$d"
-    case $pathcomp in
-      -*) pathcomp=./$pathcomp ;;
-    esac
-
-    if test ! -d "$pathcomp"; then
-      echo "mkdir $pathcomp"
-
-      mkdir "$pathcomp" || lasterr=$?
-
-      if test ! -d "$pathcomp"; then
-       errstatus=$lasterr
-      else
-       if test ! -z "$dirmode"; then
-         echo "chmod $dirmode $pathcomp"
-         lasterr=""
-         chmod "$dirmode" "$pathcomp" || lasterr=$?
-
-         if test ! -z "$lasterr"; then
-           errstatus=$lasterr
-         fi
-       fi
-      fi
-    fi
-
-    pathcomp="$pathcomp/"
-  done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# End:
-# mkinstalldirs ends here
index 01dbbf2..0af2484 100644 (file)
@@ -44,7 +44,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -107,6 +107,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -192,6 +194,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index d1efdc4..ea38feb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * nsapi_shib.cpp
- * 
+ *
  * Shibboleth NSAPI filter
  */
 
 #include <xmltooling/util/XMLHelper.h>
 #include <xercesc/util/XMLUniDefs.hpp>
 
+#include <memory>
 #include <fstream>
 #include <sstream>
+#include <stdexcept>
 
 #ifdef WIN32
 # include <process.h>
@@ -139,22 +141,9 @@ extern "C" NSAPI_PUBLIC int nsapi_shib_init(pblock* pb, ::Session* sn, Request*
 
     g_Config->RequestMapperManager.registerFactory(XML_REQUEST_MAPPER,&SunRequestMapFactory);
 
-    const char* config=pblock_findval("shib-config",pb);
-    if (!config)
-        config=getenv("SHIBSP_CONFIG");
-    if (!config)
-        config=SHIBSP_CONFIG;
-
     try {
-        xercesc::DOMDocument* dummydoc=XMLToolingConfig::getConfig().getParser().newDocument();
-        XercesJanitor<xercesc::DOMDocument> docjanitor(dummydoc);
-        xercesc::DOMElement* dummy = dummydoc->createElementNS(NULL,path);
-        auto_ptr_XMLCh src(config);
-        dummy->setAttributeNS(NULL,path,src.get());
-        dummy->setAttributeNS(NULL,validate,xmlconstants::XML_ONE);
-
-        g_Config->setServiceProvider(g_Config->ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER,dummy));
-        g_Config->getServiceProvider()->init();
+        if (!g_Config->instantiate(pblock_findval("shib-config",pb), true))
+            throw runtime_error("unknown error");
     }
     catch (exception& ex) {
         pblock_nvinsert("error",ex.what(),pb);
@@ -259,7 +248,7 @@ public:
     if (level>=SPError)
         log_error(LOG_FAILURE, "nsapi_shib", m_sn, m_rq, const_cast<char*>(msg.c_str()));
   }
-  const char* getQueryString() const { 
+  const char* getQueryString() const {
     return pblock_findval("query", m_rq->reqpb);
   }
   const char* getRequestBody() const {
@@ -468,7 +457,7 @@ public:
     Lockable* lock() { return m_mapper->lock(); }
     void unlock() { m_stKey->setData(NULL); m_propsKey->setData(NULL); m_mapper->unlock(); }
     Settings getSettings(const HTTPRequest& request) const;
-    
+
     const PropertySet* getParent() const { return NULL; }
     void setParent(const PropertySet*) {}
     pair<bool,bool> getBool(const char* name, const char* ns=NULL) const;
index 1c41f3d..6af4d84 100644 (file)
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,0
- PRODUCTVERSION 2,0,0,0
+ FILEVERSION 2,1,0,0
+ PRODUCTVERSION 2,1,0,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -47,14 +47,14 @@ BEGIN
             VALUE "Comments", "\0"
             VALUE "CompanyName", "Internet2\0"
             VALUE "FileDescription", "Shibboleth NSAPI Extension\0"
-            VALUE "FileVersion", "2, 0, 0, 0\0"
+            VALUE "FileVersion", "2, 1, 0, 0\0"
             VALUE "InternalName", "nsapi_shib\0"
-            VALUE "LegalCopyright", "Copyright Â© 2007 Internet2\0"
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "nsapi_shib.dll\0"
             VALUE "PrivateBuild", "\0"
-            VALUE "ProductName", "Shibboleth\0"
-            VALUE "ProductVersion", "2, 0, 0, 0\0"
+            VALUE "ProductName", "Shibboleth 2.1\0"
+            VALUE "ProductVersion", "2, 1, 0, 0\0"
             VALUE "SpecialBuild", "\0"
         END
     END
index 8251b79..a1c457b 100644 (file)
@@ -9,6 +9,9 @@
                <Platform
                        Name="Win32"
                />
+               <Platform
+                       Name="x64"
+               />
        </Platforms>
        <ToolFiles>
        </ToolFiles>
@@ -75,8 +78,6 @@
                                LinkIncremental="1"
                                SuppressStartupBanner="true"
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;"
-                               ProgramDatabaseFile=".\Release/nsapi_shib.pdb"
-                               ImportLibrary=".\Release/nsapi_shib.lib"
                                TargetMachine="1"
                        />
                        <Tool
                                SuppressStartupBanner="true"
                                AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(ConfigurationName)&quot;"
                                GenerateDebugInformation="true"
-                               ImportLibrary=".\Debug/nsapi_shib.lib"
                                TargetMachine="1"
                        />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+                       ConfigurationType="2"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               MkTypLibCompatible="true"
+                               SuppressStartupBanner="true"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\Release/nsapi_shib.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               InlineFunctionExpansion="1"
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-xmltooling&quot;"
+                               PreprocessorDefinitions="NDEBUG;_WINDOWS;WIN32"
+                               StringPooling="true"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="xerces-c_2.lib xmltooling-lite1.lib ns-httpd30.lib"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;"
+                               ProgramDatabaseFile=".\Release/nsapi_shib.pdb"
+                               TargetMachine="17"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+                       ConfigurationType="2"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               MkTypLibCompatible="true"
+                               SuppressStartupBanner="true"
+                               TargetEnvironment="3"
+                               TypeLibraryName=".\Debug/nsapi_shib.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-xmltooling&quot;"
+                               PreprocessorDefinitions="_WINDOWS;WIN32;_DEBUG"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="xerces-c_2D.lib xmltooling-lite1D.lib ns-httpd30.lib"
+                               LinkIncremental="2"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="&quot;..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)&quot;"
+                               GenerateDebugInformation="true"
+                               TargetMachine="17"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
        </Configurations>
        <References>
        </References>
index c61af5f..aa61b65 100644 (file)
@@ -44,7 +44,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -104,6 +104,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -189,6 +191,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index f64f091..8bb7989 100644 (file)
@@ -67,8 +67,8 @@ using namespace std;
 
 /* table definitions
 CREATE TABLE version (
-    major tinyint NOT NULL,
-    minor tinyint NOT NULL
+    major int NOT NULL,
+    minor int NOT NULL
     )
 
 CREATE TABLE strings (
@@ -457,7 +457,7 @@ bool ODBCStorageService::createRow(const char* table, const char* context, const
     }
     m_log.debug("SQLPrepare succeeded. SQL: %s", q.c_str());
 
-    SQLINTEGER b_ind = SQL_NTS;
+    SQLLEN b_ind = SQL_NTS;
     sr = SQLBindParam(stmt, 1, SQL_C_CHAR, SQL_VARCHAR, 255, 0, const_cast<char*>(context), &b_ind);
     if (!SQL_SUCCEEDED(sr)) {
         m_log.error("SQLBindParam failed (context = %s)", context);
@@ -562,7 +562,7 @@ int ODBCStorageService::readRow(
         return version; // nothing's changed, so just echo back the version
 
     if (pvalue) {
-        SQLINTEGER len;
+        SQLLEN len;
         SQLCHAR buf[LONGDATA_BUFLEN];
         while ((sr=SQLGetData(stmt,pexpiration ? 3 : 2,SQL_C_CHAR,buf,sizeof(buf),&len)) != SQL_NO_DATA) {
             if (!SQL_SUCCEEDED(sr)) {
@@ -656,7 +656,7 @@ int ODBCStorageService::updateRow(const char *table, const char* context, const
     }
     m_log.debug("SQLPrepare succeeded. SQL: %s", q.c_str());
 
-    SQLINTEGER b_ind = SQL_NTS;
+    SQLLEN b_ind = SQL_NTS;
     if (value) {
         if (strcmp(table, TEXT_TABLE)==0)
             sr = SQLBindParam(stmt, 1, SQL_C_CHAR, SQL_LONGVARCHAR, strlen(value), 0, const_cast<char*>(value), &b_ind);
index 1a64b78..ef40f0e 100644 (file)
@@ -53,8 +53,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,0,0
- PRODUCTVERSION 2,0,0,0
+ FILEVERSION 2,1,0,0
+ PRODUCTVERSION 2,1,0,0
  FILEFLAGSMASK 0x17L
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -69,14 +69,14 @@ BEGIN
     BEGIN
         BLOCK "040904b0"
         BEGIN
-            VALUE "CompanyName", "Internet2"
-            VALUE "FileDescription", "Shibboleth ODBC Storage Service Plugin"
-            VALUE "FileVersion", "2, 0, 0, 0"
-            VALUE "InternalName", "odbc-store"
-            VALUE "LegalCopyright", "Copyright (C) 2007 Internet2"
-            VALUE "OriginalFilename", "odbc-store.so"
-            VALUE "ProductName", "Shibboleth 2.0"
-            VALUE "ProductVersion", "2, 0, 0, 0"
+            VALUE "CompanyName", "Internet2\0"
+            VALUE "FileDescription", "Shibboleth ODBC Storage Service Plugin\0"
+            VALUE "FileVersion", "2, 1, 0, 0\0"
+            VALUE "InternalName", "odbc-store\0"
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"
+            VALUE "OriginalFilename", "odbc-store.so\0"
+            VALUE "ProductName", "Shibboleth 2.1\0"
+            VALUE "ProductVersion", "2, 1, 0, 0\0"
         END
     END
     BLOCK "VarFileInfo"
index eea1ff0..1b6a307 100644 (file)
@@ -11,6 +11,9 @@
                <Platform\r
                        Name="Win32"\r
                />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
        </Platforms>\r
        <ToolFiles>\r
        </ToolFiles>\r
                                OutputFile="$(OutDir)\$(ProjectName).so"\r
                                LinkIncremental="1"\r
                                AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(ConfigurationName)"\r
-                               GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                OptimizeReferences="2"\r
                                EnableCOMDATFolding="2"\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1D.lib xerces-c_2D.lib xmltooling1D.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName).so"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"\r
+                               RuntimeLibrary="2"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1.lib xerces-c_2.lib xmltooling1.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName).so"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
        </Configurations>\r
        <References>\r
        </References>\r
diff --git a/pkginfo b/pkginfo
index 6e122af..67f161a 100644 (file)
--- a/pkginfo
+++ b/pkginfo
@@ -1,5 +1,5 @@
 PKG=SHIBsp
-VERSION=2.0
+VERSION=2.1
 BASEDIR=/
 NAME=shibboleth-sp
 CATEGORY=application,security
index 2a9dac2..a0771af 100644 (file)
@@ -44,7 +44,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -87,6 +87,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -172,6 +174,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index 8d4389f..24d1526 100644 (file)
@@ -4,7 +4,8 @@
     xmlns="http://www.w3.org/2001/XMLSchema"
     xmlns:basic="urn:mace:shibboleth:2.0:afp:mf:basic"
     xmlns:afp="urn:mace:shibboleth:2.0:afp"
-    elementFormDefault="qualified">
+    elementFormDefault="qualified"
+    version="2.1">
 
     <import namespace="urn:mace:shibboleth:2.0:afp" schemaLocation="classpath:/schema/shibboleth-2.0-afp.xsd" />
 
@@ -78,7 +79,7 @@
     <complexType name="NOT">
         <annotation>
             <documentation>
-                A match function that performs a logical NOT on the resultof the contained matching function.
+                A match function that performs a logical NOT on the result of the contained matching function.
             </documentation>
         </annotation>
         <complexContent>
                         <documentation>The string value to match.</documentation>
                     </annotation>
                 </attribute>
-                <attribute name="ignoreCase" type="boolean" default="false">
+                <attribute name="ignoreCase" type="boolean">
                     <annotation>
                         <documentation>
                             A boolean flag indicating whether case should be ignored when evaluating the match.
         <annotation>
             <documentation>
                 A match function that matches an attribute value against the specified regular expression. This function
-                evaluates to true if any value matches the given expression
+                evaluates to true if any value matches the given expression.
             </documentation>
         </annotation>
         <complexContent>
         </complexContent>
     </complexType>
 
-    <complexType name="AttributeTargetedRegexMatchType">
+    <complexType name="AttributeTargetedRegexMatchType" abstract="true">
         <complexContent>
             <extension base="basic:RegexMatchType">
                 <attribute name="attributeID" type="string">
                         </annotation>
                     </element>
                 </choice>
-                <attribute name="language" type="string" default="javascript">
+                <attribute name="language" type="string">
                     <annotation>
                         <documentation>
                             The JSR-233 name for the scripting language that will be used. By default "javascript" is
                         <documentation>The ID of the attribute whose value should be matched.</documentation>
                     </annotation>
                 </attribute>
-                <attribute name="minimum" type="nonNegativeInteger" default="0">
+                <attribute name="minimum" type="nonNegativeInteger">
                     <annotation>
                         <documentation>Minimum number of values an attribute may have.</documentation>
                     </annotation>
                 </attribute>
-                <attribute name="maximum" type="positiveInteger" default="2147483647">
+                <attribute name="maximum" type="positiveInteger">
                     <annotation>
                         <documentation>Maximum number of values an attribute may have.</documentation>
                     </annotation>
index 3203e25..921d778 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <schema targetNamespace="urn:mace:shibboleth:2.0:afp:mf:saml" xmlns="http://www.w3.org/2001/XMLSchema"
-    xmlns:saml="urn:mace:shibboleth:2.0:afp:mf:saml" xmlns:afp="urn:mace:shibboleth:2.0:afp">
+    xmlns:saml="urn:mace:shibboleth:2.0:afp:mf:saml" xmlns:afp="urn:mace:shibboleth:2.0:afp" version="2.0">
 
     <import namespace="urn:mace:shibboleth:2.0:afp" schemaLocation="classpath:/schema/shibboleth-2.0-afp.xsd" />
 
@@ -26,7 +26,7 @@
     <complexType name="AttributeIssuerInEntityGroup">
         <annotation>
             <documentation>
-                A match function that evaluates to true if the attribute producer is found in metadata and is a member
+                A match function that evaluates to true if the attribute issuer is found in metadata and is a member
                 of the given entity group.
             </documentation>
         </annotation>
@@ -50,7 +50,7 @@
     <complexType name="AttributeScopeMatchesShibMDScope">
         <annotation>
             <documentation>
-                A match function that ensures that an attributes value's scope matches a scope given in metadata for the entity or role.
+                A match function that ensures that an attribute value's scope matches a scope given in metadata for the entity or role.
             </documentation>
         </annotation>
         <complexContent>
index e132a4f..675f41f 100644 (file)
                     <element ref="afp:PermitValueRule" minOccurs="0" maxOccurs="unbounded">
                         <annotation>
                             <documentation>
-                                Defines an attribute value filter that may be reused across multiple attribute rules.
+                                Defines a permit value rule that may be reused across multiple attribute rules.
                             </documentation>
                         </annotation>
-                    </element>\r
+                    </element>
+                    <element ref="afp:DenyValueRule" minOccurs="0" maxOccurs="unbounded">
+                        <annotation>
+                            <documentation>
+                                Defines a deny value rule that may be reused across multiple attribute rules.
+                            </documentation>
+                        </annotation>
+                    </element>
                     <element ref="afp:AttributeRule" minOccurs="0" maxOccurs="unbounded">
                         <annotation>
                             <documentation>
                                 Defines an attribute rule that may be reused across multiple filter policies.
                             </documentation>
                         </annotation>
-                    </element>
+                    </element>\r
                     <element ref="afp:AttributeFilterPolicy" minOccurs="0" maxOccurs="unbounded">
                         <annotation>
                             <documentation>
@@ -89,7 +96,7 @@
                         <element name="PolicyRequirementRuleReference" type="afp:ReferenceType">
                             <annotation>
                                 <documentation>
-                                    Rerfence to a PolicyRequirement defined within this policy group or another.
+                                    Reference to a PolicyRequirement defined within this policy group or another.
                                 </documentation>
                             </annotation>
                         </element>
                         <element name="AttributeRuleReference" type="afp:ReferenceType">
                             <annotation>
                                 <documentation>
-                                    Rerfence to a AttribtueRule defined within this policy group or another.
+                                    Reference to a AttributeRule defined within this policy group or another.
                                 </documentation>
                             </annotation>
                         </element>
         <complexContent>
             <extension base="afp:IdentityType">
                 <choice>
-                    <element ref="afp:PermitValueRule">
-                        <annotation>
-                            <documentation>
-                                A filter for attribute values. If the filter evaluates to true the value is permitted,
-                                otherwise it is filtered out.
-                            </documentation>
-                        </annotation>
-                    </element>
-                    <element name="PermitValueRuleReference" type="afp:ReferenceType">
-                        <annotation>
-                            <documentation>
-                                Rerfence to a PermitValueRule defined within this policy group or another.
-                            </documentation>
-                        </annotation>
-                    </element>
+                    <choice minOccurs="0">
+                        <element ref="afp:PermitValueRule" />
+                        <element name="PermitValueRuleReference" type="afp:ReferenceType">
+                            <annotation>
+                                <documentation>
+                                    Reference to a PermitValueRule defined within this policy group or another.
+                                </documentation>
+                            </annotation>
+                        </element>
+                    </choice>
+                    <choice minOccurs="0">
+                        <element ref="afp:DenyValueRule" />
+                        <element name="DenyValueRuleReference" type="afp:ReferenceType">
+                            <annotation>
+                                <documentation>
+                                    Reference to a DenyValueRule defined within this policy group or another.
+                                </documentation>
+                            </annotation>
+                        </element>
+                    </choice>
                 </choice>
                 <attribute name="attributeID" type="string" use="required">
                     <annotation>
     <element name="PermitValueRule" type="afp:MatchFunctorType">
         <annotation>
             <documentation>
-                A filter for attribtue values. If the filter evaluates to true the value is permitted, otherwise it is
-                filtered out.
+                A filter for attribute values. If the filter evaluates to true the value is permitted to be released.
+            </documentation>
+        </annotation>
+    </element>
+    <element name="DenyValueRule" type="afp:MatchFunctorType">
+        <annotation>
+            <documentation>
+                A filter for attribute values. If the filter evaluates to true the value is denied and may not be released.
             </documentation>
         </annotation>
     </element>
index 7f88ac1..3a72cda 100644 (file)
@@ -2,7 +2,8 @@
 <schema targetNamespace="urn:mace:shibboleth:2.0:attribute-map"
         xmlns="http://www.w3.org/2001/XMLSchema"
         xmlns:am="urn:mace:shibboleth:2.0:attribute-map"
-        elementFormDefault="qualified">
+        elementFormDefault="qualified"
+        version="2.1">
 
     <annotation>
         <documentation>
         </restriction>
     </simpleType>
 
+    <simpleType name="anyURI">
+        <restriction base="anyURI">
+            <minLength value="1"/>
+        </restriction>
+    </simpleType>
+
     <simpleType name="listOfStrings">
         <list itemType="am:string"/>
     </simpleType>
         </annotation>
         <complexContent>
             <extension base="am:AttributeDecoderType">
-                <attribute name="scopeDelimiter" type="am:string" default="@">
+                <attribute name="scopeDelimiter" type="am:string">
                     <annotation>
                         <documentation>
                             The character(s) used to delimit the scoped information from the scope.
         </annotation>
         <complexContent>
             <extension base="am:AttributeDecoderType">
-                <attribute name="formatter" type="am:string" default="$Name!!$NameQualifier!!$SPNameQualifier">
+                <attribute name="formatter" type="am:string">
+                    <annotation>
+                        <documentation>
+                            The pattern used to generate string versions of the attribute's values.
+                        </documentation>
+                    </annotation>
+                </attribute>
+            </extension>
+        </complexContent>
+    </complexType>
+
+    <complexType name="NameIDFromScopedAttributeDecoder">
+        <annotation>
+            <documentation>
+                Decoder for attributes with scoped values that produces a NameID attribute with
+                the scope dropped and the NameQualifiers defaulted.
+            </documentation>
+        </annotation>
+        <complexContent>
+            <extension base="am:ScopedAttributeDecoder">
+                <attribute name="format" type="am:anyURI">
+                    <annotation>
+                        <documentation>
+                            Value to use as the NameID Format.
+                        </documentation>
+                    </annotation>
+                </attribute>
+                <attribute name="formatter" type="am:string">
                     <annotation>
                         <documentation>
                             The pattern used to generate string versions of the attribute's values.
index ec8bf41..f9950db 100644 (file)
@@ -8,7 +8,7 @@
        elementFormDefault="qualified"\r
        attributeFormDefault="unqualified"\r
        blockDefault="substitution"\r
-       version="2.0">\r
+       version="2.1">\r
 \r
        <import namespace="urn:oasis:names:tc:SAML:2.0:assertion" schemaLocation="saml-schema-assertion-2.0.xsd"/>\r
        <import namespace="urn:oasis:names:tc:SAML:2.0:protocol" schemaLocation="saml-schema-protocol-2.0.xsd"/>\r
@@ -71,7 +71,7 @@
                         <complexType>\r
                             <attribute name="address" type="conf:string" use="required"/>\r
                             <attribute name="port" type="unsignedInt" use="required"/>\r
-                            <attribute name="acl" type="conf:listOfStrings" default="127.0.0.1"/>\r
+                            <attribute name="acl" type="conf:listOfStrings"/>\r
                         </complexType>\r
                     </element>\r
                     <element name="Listener" type="conf:PluggableType"/>\r
                                                        <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>\r
                                                </sequence>\r
                                                <attribute name="path" type="anyURI" use="required"/>\r
-                                               <attribute name="fatal" type="boolean" default="true"/>\r
+                                               <attribute name="fatal" type="boolean"/>\r
                                                <anyAttribute namespace="##any" processContents="lax"/>\r
                                        </complexType>\r
                                </element>\r
                                                <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>\r
                                        </sequence>\r
                                        <attribute name="id" type="ID" use="required"/>\r
-                                       <attribute name="cleanupInterval" type="unsignedInt" default="900"/>\r
+                                       <attribute name="cleanupInterval" type="unsignedInt"/>\r
                                        <anyAttribute namespace="##any" processContents="lax"/>\r
                                </restriction>\r
                        </complexContent>\r
                                                <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>\r
                                        </sequence>\r
                                        <attribute name="StorageService" type="IDREF"/>\r
-                                       <attribute name="cacheTimeout" type="unsignedInt" default="28800"/>\r
+                                       <attribute name="cacheTimeout" type="unsignedInt"/>\r
                                        <anyAttribute namespace="##any" processContents="lax"/>\r
                                </restriction>\r
                        </complexContent>\r
                        <sequence/>\r
                        <attribute name="StorageService" type="IDREF"/>\r
                        <attribute name="context" type="conf:string"/>\r
-                       <attribute name="artifactTTL" type="unsignedInt" default="180"/>\r
+                       <attribute name="artifactTTL" type="unsignedInt"/>\r
                </complexType>\r
        </element>\r
        \r
                                </element>\r
                                <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>\r
                        </sequence>\r
-                       <attribute name="normalizeRequest" type="boolean" default="true"/>\r
+                       <attribute name="normalizeRequest" type="boolean"/>\r
                        <anyAttribute namespace="##other" processContents="lax"/>\r
                </complexType>\r
        </element>\r
                                </choice>\r
                        </sequence>\r
                        <attribute name="regex" type="conf:string" use="required"/>\r
-                       <attribute name="ignoreCase" type="boolean" default="true"/>\r
+                       <attribute name="ignoreCase" type="boolean"/>\r
                        <attribute name="applicationId" type="conf:string"/>\r
                        <attributeGroup ref="conf:ContentSettings"/>\r
                </complexType>\r
                                <element ref="conf:Query" minOccurs="0" maxOccurs="unbounded"/>\r
                        </sequence>\r
                        <attribute name="regex" type="conf:string" use="required"/>\r
-                       <attribute name="ignoreCase" type="boolean" default="true"/>\r
+                       <attribute name="ignoreCase" type="boolean"/>\r
                        <attribute name="applicationId" type="conf:string"/>\r
                        <attributeGroup ref="conf:ContentSettings"/>\r
                </complexType>\r
        </element>\r
 \r
        <attributeGroup name="ApplicationGroup">\r
-               <attribute name="homeURL" type="anyURI" default="/"/>\r
+               <attribute name="homeURL" type="anyURI"/>\r
                <attribute name="REMOTE_USER" type="conf:listOfStrings"/>\r
                <attribute name="unsetHeaders" type="conf:listOfStrings"/>\r
                <attribute name="metadataAttributePrefix" type="conf:string"/>\r
                                </element>\r
                        </choice>\r
                        <attribute name="handlerURL" type="anyURI"/>\r
-                       <attribute name="handlerSSL" type="boolean" default="true"/>\r
+                       <attribute name="handlerSSL" type="boolean"/>\r
                        <attribute name="exportLocation" type="conf:string"/>\r
-                       <attribute name="exportACL" type="conf:listOfStrings" default="127.0.0.1"/>\r
+                       <attribute name="exportACL" type="conf:listOfStrings"/>\r
                        <attribute name="cookieName" type="conf:string"/>\r
                        <attribute name="cookieProps" type="conf:string"/>\r
-                       <attribute name="idpHistory" type="boolean" default="false"/>\r
+            <attribute name="cookieLifetime" type="unsignedInt"/>\r
+                       <attribute name="idpHistory" type="boolean"/>\r
                        <attribute name="idpHistoryDays" type="unsignedInt"/>\r
-                       <attribute name="lifetime" type="unsignedInt" default="28800"/>\r
-                       <attribute name="timeout" type="unsignedInt" default="3600"/>\r
+                       <attribute name="lifetime" type="unsignedInt"/>\r
+                       <attribute name="timeout" type="unsignedInt"/>\r
                    <attribute name="maxTimeSinceAuthn" type="unsignedInt"/>\r
-                       <attribute name="checkAddress" type="boolean" default="true"/>\r
-                       <attribute name="consistentAddress" type="boolean" default="true"/>\r
+                       <attribute name="checkAddress" type="boolean"/>\r
+                       <attribute name="consistentAddress" type="boolean"/>\r
                        <anyAttribute namespace="##other" processContents="lax"/>\r
                </complexType>\r
        </element>\r
                                                        <element name="Rule" type="conf:PluggableType" minOccurs="1" maxOccurs="unbounded"/>\r
                                                </sequence>\r
                                                <attribute name="id" type="conf:string" use="required"/>\r
-                                               <attribute name="validate" type="boolean" default="false"/>\r
+                                               <attribute name="validate" type="boolean"/>\r
                                                <anyAttribute namespace="##any" processContents="lax"/>\r
                                        </complexType>\r
                                </element>\r
index 8fa8be7..0f6d823 100644 (file)
@@ -44,7 +44,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -88,6 +88,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -173,6 +175,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index 3fc0ba6..89a86a1 100644 (file)
@@ -1,7 +1,7 @@
 Name:          shibboleth
 Summary:       Open source system for attribute-based Web SSO
-Version:       2.0
-Release:       6
+Version:       2.1
+Release:       1
 #Copyright:    Internet2
 Group:         System Environment/Libraries
 License:       Apache style
@@ -11,7 +11,7 @@ BuildRoot:    %{_tmppath}/%{name}-%{version}-root
 BuildRequires: openssl-devel
 BuildRequires: xerces%{?xercesver}-c-devel >= 2.8.0
 BuildRequires:  xml-security-c-devel >= 1.4.0
-BuildRequires: zlib-devel, opensaml-devel >= 2.0
+BuildRequires: zlib-devel, opensaml-devel >= 2.1
 %{?_with_log4cpp:BuildRequires:        log4cpp-devel >= 1.0}
 %{!?_with_log4cpp:BuildRequires: log4shib-devel}
 %{?_with_fastcgi:BuildRequires: fcgi-devel}
@@ -73,52 +73,50 @@ Shibboleth Library API documentation generated by doxygen.
                $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/native.logger
 %endif
 
-%check || :
-%{__make} check
-
-%clean
-[ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
-
-%post
-%ifnos solaris2.8 solaris2.9 solaris2.10
-/sbin/ldconfig
-%endif
-
-
 # Plug the SP into Apache on a recognized system.
 APACHE_CONFIG="no"
 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_13.so ] ; then
-       APACHE_CONFIG="apache.config"
+    APACHE_CONFIG="apache.config"
 fi
 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_20.so ] ; then
-       APACHE_CONFIG="apache2.config"
+    APACHE_CONFIG="apache2.config"
 fi
 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_22.so ] ; then
-       APACHE_CONFIG="apache22.config"
+    APACHE_CONFIG="apache22.config"
 fi
 if [ "$APACHE_CONFIG" != "no" ] ; then
-       APACHE_CONFD="no"
-       if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
-               APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
-       fi
-       if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
-               APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
-       fi
-       if [ "$APACHE_CONFD" != "no" ] ; then
-               if [ ! -f $APACHE_CONFD/shib.conf ] ; then
+    APACHE_CONFD="no"
+    if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
+            APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
+    fi
+    if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
+            APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
+    fi
+    if [ "$APACHE_CONFD" != "no" ] ; then
+        %{__mkdir} -p $RPM_BUILD_ROOT$APACHE_CONFD
 %if "%{_vendor}" == "suse"
-                   %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \
-                               %{_sysconfdir}/%{name}/$APACHE_CONFIG \
-                               > $APACHE_CONFD/shib.conf
+        %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \
+            $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$APACHE_CONFIG \
+            > $RPM_BUILD_ROOT$APACHE_CONFD/shib.conf
 %else
-                       %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-2.0/g" \
-                           %{_sysconfdir}/%{name}/$APACHE_CONFIG \
-                           > $APACHE_CONFD/shib.conf
+        %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-2.1/g" \
+            $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$APACHE_CONFIG \
+            > $RPM_BUILD_ROOT$APACHE_CONFD/shib.conf
 %endif
-               fi
-       fi
+    fi
 fi
 
+%check || :
+%{__make} check
+
+%clean
+[ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
+
+%post
+%ifnos solaris2.8 solaris2.9 solaris2.10
+/sbin/ldconfig
+%endif
+
 # Install the shibd init.d scripts and service
 %if "%{_vendor}" == "redhat"
        if [ -d %{_sysconfdir}/init.d ] ; then
@@ -139,13 +137,6 @@ sh ./keygen.sh -b
 /sbin/ldconfig
 %endif
 
-# delete the Apache configuration if we're being removed
-[ "$1" = 0 ] || exit 0
-[ -f %{_sysconfdir}/httpd/conf.d/shib.conf ] && \
-    %{__rm} -f %{_sysconfdir}/httpd/conf.d/shib.conf
-[ -f %{_sysconfdir}/apache2/conf.d/shib.conf ] && \
-    %{__rm} -f %{_sysconfdir}/apache2/conf.d/shib.conf
-
 # clear init.d state
 %if "%{_vendor}" == "redhat"
        chkconfig --del shibd
@@ -171,6 +162,11 @@ sh ./keygen.sh -b
 %config(noreplace) %{_sysconfdir}/%{name}/*.xml
 %config(noreplace) %{_sysconfdir}/%{name}/*.html
 %config(noreplace) %{_sysconfdir}/%{name}/*.logger
+%if "%{_vendor}" == "suse"
+%config %{_sysconfdir}/apache2/conf.d/shib.conf
+%else
+%config %{_sysconfdir}/httpd/conf.d/shib.conf
+%endif
 %{_sysconfdir}/%{name}/*.dist
 %{_sysconfdir}/%{name}/apache*.config
 %{_sysconfdir}/%{name}/shibd-redhat
@@ -201,6 +197,9 @@ sh ./keygen.sh -b
 %doc %{_datadir}/doc/%{name}/api
 
 %changelog
+* Tue Jun 10 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.1-1
+- Change shib.conf handling to treat as config file.
+
 * Mon Mar 17 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.0-6
 - Official release.
 
index e716a24..2a9f809 100644 (file)
@@ -1,7 +1,7 @@
 Name:          shibboleth
 Summary:       Open source system for attribute-based Web SSO
 Version:       @-VERSION-@
-Release:       6
+Release:       1
 #Copyright:    Internet2
 Group:         System Environment/Libraries
 License:       Apache style
@@ -11,7 +11,7 @@ BuildRoot:    %{_tmppath}/%{name}-%{version}-root
 BuildRequires: openssl-devel
 BuildRequires: xerces%{?xercesver}-c-devel >= 2.8.0
 BuildRequires:  xml-security-c-devel >= 1.4.0
-BuildRequires: zlib-devel, opensaml-devel >= 2.0
+BuildRequires: zlib-devel, opensaml-devel >= 2.1
 %{?_with_log4cpp:BuildRequires:        log4cpp-devel >= 1.0}
 %{!?_with_log4cpp:BuildRequires: log4shib-devel}
 %{?_with_fastcgi:BuildRequires: fcgi-devel}
@@ -73,52 +73,50 @@ Shibboleth Library API documentation generated by doxygen.
                $RPM_BUILD_ROOT/%{_sysconfdir}/%{name}/native.logger
 %endif
 
-%check || :
-%{__make} check
-
-%clean
-[ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
-
-%post
-%ifnos solaris2.8 solaris2.9 solaris2.10
-/sbin/ldconfig
-%endif
-
-
 # Plug the SP into Apache on a recognized system.
 APACHE_CONFIG="no"
 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_13.so ] ; then
-       APACHE_CONFIG="apache.config"
+    APACHE_CONFIG="apache.config"
 fi
 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_20.so ] ; then
-       APACHE_CONFIG="apache2.config"
+    APACHE_CONFIG="apache2.config"
 fi
 if [ -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/mod_shib_22.so ] ; then
-       APACHE_CONFIG="apache22.config"
+    APACHE_CONFIG="apache22.config"
 fi
 if [ "$APACHE_CONFIG" != "no" ] ; then
-       APACHE_CONFD="no"
-       if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
-               APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
-       fi
-       if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
-               APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
-       fi
-       if [ "$APACHE_CONFD" != "no" ] ; then
-               if [ ! -f $APACHE_CONFD/shib.conf ] ; then
+    APACHE_CONFD="no"
+    if [ -d %{_sysconfdir}/httpd/conf.d ] ; then
+            APACHE_CONFD="%{_sysconfdir}/httpd/conf.d"
+    fi
+    if [ -d %{_sysconfdir}/apache2/conf.d ] ; then
+            APACHE_CONFD="%{_sysconfdir}/apache2/conf.d"
+    fi
+    if [ "$APACHE_CONFD" != "no" ] ; then
+        %{__mkdir} -p $RPM_BUILD_ROOT$APACHE_CONFD
 %if "%{_vendor}" == "suse"
-                   %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \
-                               %{_sysconfdir}/%{name}/$APACHE_CONFIG \
-                               > $APACHE_CONFD/shib.conf
+        %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/packages\/%{name}/g" \
+            $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$APACHE_CONFIG \
+            > $RPM_BUILD_ROOT$APACHE_CONFD/shib.conf
 %else
-                       %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-@-VERSION-@/g" \
-                           %{_sysconfdir}/%{name}/$APACHE_CONFIG \
-                           > $APACHE_CONFD/shib.conf
+        %{__sed} "s/\/usr\/doc\/%{name}/\/usr\/share\/doc\/%{name}-@-VERSION-@/g" \
+            $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$APACHE_CONFIG \
+            > $RPM_BUILD_ROOT$APACHE_CONFD/shib.conf
 %endif
-               fi
-       fi
+    fi
 fi
 
+%check || :
+%{__make} check
+
+%clean
+[ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
+
+%post
+%ifnos solaris2.8 solaris2.9 solaris2.10
+/sbin/ldconfig
+%endif
+
 # Install the shibd init.d scripts and service
 %if "%{_vendor}" == "redhat"
        if [ -d %{_sysconfdir}/init.d ] ; then
@@ -139,13 +137,6 @@ sh ./keygen.sh -b
 /sbin/ldconfig
 %endif
 
-# delete the Apache configuration if we're being removed
-[ "$1" = 0 ] || exit 0
-[ -f %{_sysconfdir}/httpd/conf.d/shib.conf ] && \
-    %{__rm} -f %{_sysconfdir}/httpd/conf.d/shib.conf
-[ -f %{_sysconfdir}/apache2/conf.d/shib.conf ] && \
-    %{__rm} -f %{_sysconfdir}/apache2/conf.d/shib.conf
-
 # clear init.d state
 %if "%{_vendor}" == "redhat"
        chkconfig --del shibd
@@ -171,6 +162,11 @@ sh ./keygen.sh -b
 %config(noreplace) %{_sysconfdir}/%{name}/*.xml
 %config(noreplace) %{_sysconfdir}/%{name}/*.html
 %config(noreplace) %{_sysconfdir}/%{name}/*.logger
+%if "%{_vendor}" == "suse"
+%config %{_sysconfdir}/apache2/conf.d/shib.conf
+%else
+%config %{_sysconfdir}/httpd/conf.d/shib.conf
+%endif
 %{_sysconfdir}/%{name}/*.dist
 %{_sysconfdir}/%{name}/apache*.config
 %{_sysconfdir}/%{name}/shibd-redhat
@@ -201,6 +197,9 @@ sh ./keygen.sh -b
 %doc %{_datadir}/doc/%{name}/api
 
 %changelog
+* Tue Jun 10 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.1-1
+- Change shib.conf handling to treat as config file.
+
 * Mon Mar 17 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.0-6
 - Official release.
 
index 2f5a1f4..eb59ce5 100644 (file)
@@ -45,7 +45,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 am__installdirs = "$(DESTDIR)$(sbindir)"
@@ -98,6 +98,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -183,6 +185,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index c1eaf5f..b7a6956 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  *  Copyright 2001-2007 Internet2\r
- * \r
+ *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
  * You may obtain a copy of the License at\r
@@ -124,27 +124,9 @@ int real_main(int preinit)
             fprintf(stderr, "configuration is invalid, see console for specific problems\n");\r
             return -1;\r
         }\r
-        \r
-        if (!shar_config)\r
-            shar_config=getenv("SHIBSP_CONFIG");\r
-        if (!shar_config)\r
-            shar_config=SHIBSP_CONFIG;\r
-\r
-        try {\r
-            static const XMLCh path[] = UNICODE_LITERAL_4(p,a,t,h);\r
-            static const XMLCh validate[] = UNICODE_LITERAL_8(v,a,l,i,d,a,t,e);\r
-            xercesc::DOMDocument* dummydoc=XMLToolingConfig::getConfig().getParser().newDocument();\r
-            XercesJanitor<xercesc::DOMDocument> docjanitor(dummydoc);\r
-            xercesc::DOMElement* dummy = dummydoc->createElementNS(NULL,path);\r
-            auto_ptr_XMLCh src(shar_config);\r
-            dummy->setAttributeNS(NULL,path,src.get());\r
-            dummy->setAttributeNS(NULL,validate,xmlconstants::XML_ONE);\r
-    \r
-            conf.setServiceProvider(conf.ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER,dummy));\r
-            conf.getServiceProvider()->init();\r
-        }\r
-        catch (exception& ex) {\r
-            fprintf(stderr, "caught exception while loading configuration: %s\n", ex.what());\r
+\r
+        if (!conf.instantiate(shar_config)) {\r
+            fprintf(stderr, "configuration is invalid, check console for specific problems\n");\r
             conf.term();\r
             return -2;\r
         }\r
@@ -289,26 +271,8 @@ int main(int argc, char *argv[])
         return -1;\r
     }\r
 \r
-    if (!shar_config)\r
-        shar_config=getenv("SHIBSP_CONFIG");\r
-    if (!shar_config)\r
-        shar_config=SHIBSP_CONFIG;\r
-    \r
-    try {\r
-        static const XMLCh path[] = UNICODE_LITERAL_4(p,a,t,h);\r
-        static const XMLCh validate[] = UNICODE_LITERAL_8(v,a,l,i,d,a,t,e);\r
-        xercesc::DOMDocument* dummydoc=XMLToolingConfig::getConfig().getParser().newDocument();\r
-        XercesJanitor<xercesc::DOMDocument> docjanitor(dummydoc);\r
-        xercesc::DOMElement* dummy = dummydoc->createElementNS(NULL,path);\r
-        auto_ptr_XMLCh src(shar_config);\r
-        dummy->setAttributeNS(NULL,path,src.get());\r
-        dummy->setAttributeNS(NULL,validate,xmlconstants::XML_ONE);\r
-\r
-        conf.setServiceProvider(conf.ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER,dummy));\r
-        conf.getServiceProvider()->init();\r
-    }\r
-    catch (exception& ex) {\r
-        fprintf(stderr, "caught exception while loading configuration: %s\n", ex.what());\r
+    if (!conf.instantiate(shar_config)) {\r
+        fprintf(stderr, "configuration is invalid, check console for specific problems\n");\r
         conf.term();\r
         return -2;\r
     }\r
@@ -327,7 +291,7 @@ int main(int argc, char *argv[])
                 perror(pidfile);  // keep running though\r
             }\r
         }\r
-    \r
+\r
         // Run the listener\r
         if (!conf.getServiceProvider()->getListenerService()->run(&shibd_shutdown)) {\r
             fprintf(stderr, "listener failed to enter listen loop\n");\r
index d02b4b8..6f21f45 100644 (file)
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 2,0,0,0\r
- PRODUCTVERSION 2,0,0,0\r
+ FILEVERSION 2,1,0,0\r
+ PRODUCTVERSION 2,1,0,0\r
  FILEFLAGSMASK 0x3fL\r
 #ifdef _DEBUG\r
  FILEFLAGS 0x1L\r
@@ -47,14 +47,14 @@ BEGIN
             VALUE "Comments", "\0"\r
             VALUE "CompanyName", "Internet2\0"\r
             VALUE "FileDescription", "Shibboleth Daemon Service\0"\r
-            VALUE "FileVersion", "2, 0, 0, 0\0"\r
+            VALUE "FileVersion", "2, 1, 0, 0\0"\r
             VALUE "InternalName", "shibd\0"\r
-            VALUE "LegalCopyright", "Copyright Â© 2007 Internet2\0"\r
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"\r
             VALUE "LegalTrademarks", "\0"\r
             VALUE "OriginalFilename", "shibd.exe\0"\r
             VALUE "PrivateBuild", "\0"\r
-            VALUE "ProductName", "Shibboleth 2.0\0"\r
-            VALUE "ProductVersion", "2, 0, 0, 0\0"\r
+            VALUE "ProductName", "Shibboleth 2.1\0"\r
+            VALUE "ProductVersion", "2, 1, 0, 0\0"\r
             VALUE "SpecialBuild", "\0"\r
         END\r
     END\r
index ac84e1e..f86cfad 100644 (file)
@@ -10,6 +10,9 @@
                <Platform
                        Name="Win32"
                />
+               <Platform
+                       Name="x64"
+               />
        </Platforms>
        <ToolFiles>
        </ToolFiles>
                                Name="VCPostBuildEventTool"
                        />
                </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+                       ConfigurationType="1"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TargetEnvironment="3"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               InlineFunctionExpansion="1"
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-opensaml2&quot;;&quot;..\..\cpp-xmltooling&quot;"
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+                               StringPooling="true"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               RuntimeTypeInfo="true"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="wsock32.lib log4shib1.lib xmltooling1.lib xerces-c_2.lib"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(PlatformName)\$(ConfigurationName);..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"
+                               SubSystem="1"
+                               TargetMachine="17"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+                       ConfigurationType="1"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TargetEnvironment="3"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-opensaml2&quot;;&quot;..\..\cpp-xmltooling&quot;"
+                               PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               RuntimeTypeInfo="true"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               SuppressStartupBanner="true"
+                               Detect64BitPortabilityProblems="true"
+                               DebugInformationFormat="3"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="wsock32.lib log4shib1D.lib xmltooling1D.lib"
+                               LinkIncremental="2"
+                               SuppressStartupBanner="true"
+                               AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(PlatformName)\$(ConfigurationName);..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"
+                               GenerateDebugInformation="true"
+                               SubSystem="1"
+                               TargetMachine="17"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
        </Configurations>
        <References>
        </References>
index e7de1cd..ff5c98c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,8 +16,8 @@
 
 /**
  * AbstractSPRequest.cpp
- * 
- * Abstract base for SPRequest implementations  
+ *
+ * Abstract base for SPRequest implementations
  */
 
 #include "internal.h"
@@ -69,11 +69,11 @@ const Application& AbstractSPRequest::getApplication() const
         m_app=m_sp->getApplication(getRequestSettings().first->getString("applicationId").second);
         if (!m_app)
             throw ConfigurationException("Unable to map request to application settings, check configuration.");
-    }    
+    }
     return *m_app;
 }
 
-Session* AbstractSPRequest::getSession(bool checkTimeout, bool ignoreAddress, bool cache) const
+Session* AbstractSPRequest::getSession(bool checkTimeout, bool ignoreAddress, bool cache)
 {
     // Only attempt this once.
     if (cache && m_sessionTried)
@@ -82,7 +82,7 @@ Session* AbstractSPRequest::getSession(bool checkTimeout, bool ignoreAddress, bo
         m_sessionTried = true;
 
     // Need address checking and timeout settings.
-    time_t timeout=0;
+    time_t timeout=3600;
     if (checkTimeout || !ignoreAddress) {
         const PropertySet* props=getApplication().getPropertySet("Sessions");
         if (props) {
@@ -160,7 +160,7 @@ const char* AbstractSPRequest::getRequestURL() const
         int port = getPort();
         const char* scheme = getScheme();
         m_url = string(scheme) + "://" + getHostname();
-        if ((!strcmp(scheme,"http") && port!=80) || (!strcmp(scheme,"https") && port!=443)) { 
+        if ((!strcmp(scheme,"http") && port!=80) || (!strcmp(scheme,"https") && port!=443)) {
             ostringstream portstr;
             portstr << port;
             m_url += ":" + portstr.str();
@@ -174,7 +174,7 @@ const char* AbstractSPRequest::getParameter(const char* name) const
 {
     if (!m_parser)
         m_parser=new CGIParser(*this);
-    
+
     pair<CGIParser::walker,CGIParser::walker> bounds=m_parser->getParameters(name);
     return (bounds.first==bounds.second) ? NULL : bounds.first->second;
 }
@@ -199,7 +199,7 @@ const char* AbstractSPRequest::getHandlerURL(const char* resource) const
 
     if (!m_handlerURL.empty() && resource && !strcmp(getRequestURL(),resource))
         return m_handlerURL.c_str();
-        
+
 #ifdef HAVE_STRCASECMP
     if (!resource || (strncasecmp(resource,"http://",7) && strncasecmp(resource,"https://",8)))
 #else
@@ -207,7 +207,7 @@ const char* AbstractSPRequest::getHandlerURL(const char* resource) const
 #endif
         throw ConfigurationException("Target resource was not an absolute URL.");
 
-    bool ssl_only=false;
+    bool ssl_only=true;
     const char* handler=NULL;
     const PropertySet* props=m_app->getPropertySet("Sessions");
     if (props) {
@@ -218,7 +218,7 @@ const char* AbstractSPRequest::getHandlerURL(const char* resource) const
         if (p2.first)
             handler=p2.second;
     }
-    
+
     // Should never happen...
     if (!handler || (*handler!='/' && strncmp(handler,"http:",5) && strncmp(handler,"https:",6)))
         throw ConfigurationException(
index adec1c0..6faf9ee 100644 (file)
@@ -66,7 +66,7 @@ namespace shibsp {
 
         const Application& getApplication() const;
         
-        Session* getSession(bool checkTimeout=true, bool ignoreAddress=false, bool cache=true) const;
+        Session* getSession(bool checkTimeout=true, bool ignoreAddress=false, bool cache=true);
 
         const char* getRequestURI() const {
             return m_uri.c_str();
index 9457bfd..8e41cab 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * Application.cpp
- * 
+ *
  * Interface to a Shibboleth Application instance.
  */
 
@@ -42,12 +42,19 @@ Application::~Application()
     delete m_lock;
 }
 
-pair<string,const char*> Application::getCookieNameProps(const char* prefix) const
+pair<string,const char*> Application::getCookieNameProps(const char* prefix, time_t* lifetime) const
 {
     static const char* defProps="; path=/";
-    
+
+    if (lifetime)
+        *lifetime = 0;
     const PropertySet* props=getPropertySet("Sessions");
     if (props) {
+        if (lifetime) {
+            pair<bool,unsigned int> lt = props->getUnsignedInt("cookieLifetime");
+            if (lt.first)
+                *lifetime = lt.second;
+        }
         pair<bool,const char*> p=props->getString("cookieProps");
         if (!p.first)
             p.second=defProps;
@@ -56,7 +63,7 @@ pair<string,const char*> Application::getCookieNameProps(const char* prefix) con
             return make_pair(string(prefix) + p2.second,p.second);
         return make_pair(string(prefix) + getHash(),p.second);
     }
-    
+
     // Shouldn't happen, but just in case..
     return pair<string,const char*>(prefix,defProps);
 }
index 9660e7a..c7352a2 100644 (file)
@@ -114,9 +114,10 @@ namespace shibsp {
          * Returns the name and cookie properties to use for this Application.
          * 
          * @param prefix    a value to prepend to the base cookie name
+         * @param lifetime  if non-null, will be populated with a suggested lifetime for the cookie, or 0 if session-bound
          * @return  a pair containing the cookie name and the string to append to the cookie value
          */
-        virtual std::pair<std::string,const char*> getCookieNameProps(const char* prefix) const;
+        virtual std::pair<std::string,const char*> getCookieNameProps(const char* prefix, time_t* lifetime=NULL) const;
 
 #ifndef SHIBSP_LITE
         /**
@@ -172,6 +173,14 @@ namespace shibsp {
         virtual const PropertySet* getRelyingParty(const opensaml::saml2md::EntityDescriptor* provider) const=0;
 
         /**
+         * Returns configuration properties governing security interactions with a named peer.
+         * 
+         * @param entityID  a peer name
+         * @return  the applicable PropertySet
+         */
+        virtual const PropertySet* getRelyingParty(const XMLCh* entityID) const=0;
+
+        /**
          * Returns any additional audience values associated with this Application.
          * 
          * @return additional audience values associated with the Application, or NULL
index cd1d348..703da9d 100644 (file)
@@ -79,7 +79,8 @@ liteinclude_HEADERS = \
        lite/SAMLConstants.h
 
 mdinclude_HEADERS = \
-       metadata/MetadataExt.h
+       metadata/MetadataExt.h \
+       metadata/MetadataProviderCriteria.h
 
 reminclude_HEADERS = \
        remoting/ddf.h \
@@ -153,6 +154,7 @@ libshibsp_lite_la_SOURCES = \
 libshibsp_la_SOURCES = \
        ${common_sources} \
        attribute/NameIDAttributeDecoder.cpp \
+       attribute/NameIDFromScopedAttributeDecoder.cpp \
        attribute/ScopedAttributeDecoder.cpp \
        attribute/StringAttributeDecoder.cpp \
        attribute/filtering/impl/AttributeFilter.cpp \
@@ -183,6 +185,7 @@ libshibsp_la_SOURCES = \
        attribute/resolver/impl/XMLAttributeExtractor.cpp \
        binding/impl/ArtifactResolver.cpp \
        binding/impl/SOAPClient.cpp \
+       metadata/DynamicMetadataProvider.cpp \
        metadata/MetadataExtImpl.cpp \
        metadata/MetadataExtSchemaValidators.cpp \
        security/PKIXTrustEngine.cpp \
@@ -190,8 +193,8 @@ libshibsp_la_SOURCES = \
 
 # this is different from the project version
 # http://sources.redhat.com/autobook/autobook/autobook_91.html
-libshibsp_la_LDFLAGS = $(XMLSEC_LIBS) -version-info 1:0:0
-libshibsp_lite_la_LDFLAGS = $(LITE_LIBS) -version-info 1:0:0
+libshibsp_la_LDFLAGS = $(XMLSEC_LIBS) -version-info 2:0:0
+libshibsp_lite_la_LDFLAGS = $(LITE_LIBS) -version-info 2:0:0
 libshibsp_lite_la_CPPFLAGS = -DSHIBSP_LITE
 
 paths.h: ${srcdir}/paths.h.in Makefile ${top_builddir}/config.status
index 59e2edc..7a04a6c 100644 (file)
@@ -51,7 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -135,10 +135,11 @@ am__objects_2 = AbstractSPRequest.lo Application.lo ServiceProvider.lo \
        UnixListener.lo CGIParser.lo DOMPropertySet.lo SPConstants.lo \
        TemplateParameters.lo
 am_libshibsp_la_OBJECTS = $(am__objects_2) NameIDAttributeDecoder.lo \
-       ScopedAttributeDecoder.lo StringAttributeDecoder.lo \
-       AttributeFilter.lo ChainingAttributeFilter.lo \
-       XMLAttributeFilter.lo MatchFunctor.lo AndMatchFunctor.lo \
-       AnyMatchFunctor.lo NotMatchFunctor.lo OrMatchFunctor.lo \
+       NameIDFromScopedAttributeDecoder.lo ScopedAttributeDecoder.lo \
+       StringAttributeDecoder.lo AttributeFilter.lo \
+       ChainingAttributeFilter.lo XMLAttributeFilter.lo \
+       MatchFunctor.lo AndMatchFunctor.lo AnyMatchFunctor.lo \
+       NotMatchFunctor.lo OrMatchFunctor.lo \
        AttributeIssuerStringFunctor.lo \
        AttributeRequesterStringFunctor.lo \
        AttributeScopeStringFunctor.lo AttributeValueStringFunctor.lo \
@@ -153,9 +154,9 @@ am_libshibsp_la_OBJECTS = $(am__objects_2) NameIDAttributeDecoder.lo \
        AttributeScopeMatchesShibMDScopeFunctor.lo \
        ChainingAttributeResolver.lo QueryAttributeResolver.lo \
        ChainingAttributeExtractor.lo XMLAttributeExtractor.lo \
-       ArtifactResolver.lo SOAPClient.lo MetadataExtImpl.lo \
-       MetadataExtSchemaValidators.lo PKIXTrustEngine.lo \
-       SecurityPolicy.lo
+       ArtifactResolver.lo SOAPClient.lo DynamicMetadataProvider.lo \
+       MetadataExtImpl.lo MetadataExtSchemaValidators.lo \
+       PKIXTrustEngine.lo SecurityPolicy.lo
 libshibsp_la_OBJECTS = $(am_libshibsp_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -218,6 +219,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -303,6 +306,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
@@ -449,7 +455,8 @@ liteinclude_HEADERS = \
        lite/SAMLConstants.h
 
 mdinclude_HEADERS = \
-       metadata/MetadataExt.h
+       metadata/MetadataExt.h \
+       metadata/MetadataProviderCriteria.h
 
 reminclude_HEADERS = \
        remoting/ddf.h \
@@ -523,6 +530,7 @@ libshibsp_lite_la_SOURCES = \
 libshibsp_la_SOURCES = \
        ${common_sources} \
        attribute/NameIDAttributeDecoder.cpp \
+       attribute/NameIDFromScopedAttributeDecoder.cpp \
        attribute/ScopedAttributeDecoder.cpp \
        attribute/StringAttributeDecoder.cpp \
        attribute/filtering/impl/AttributeFilter.cpp \
@@ -553,6 +561,7 @@ libshibsp_la_SOURCES = \
        attribute/resolver/impl/XMLAttributeExtractor.cpp \
        binding/impl/ArtifactResolver.cpp \
        binding/impl/SOAPClient.cpp \
+       metadata/DynamicMetadataProvider.cpp \
        metadata/MetadataExtImpl.cpp \
        metadata/MetadataExtSchemaValidators.cpp \
        security/PKIXTrustEngine.cpp \
@@ -561,8 +570,8 @@ libshibsp_la_SOURCES = \
 
 # this is different from the project version
 # http://sources.redhat.com/autobook/autobook/autobook_91.html
-libshibsp_la_LDFLAGS = $(XMLSEC_LIBS) -version-info 1:0:0
-libshibsp_lite_la_LDFLAGS = $(LITE_LIBS) -version-info 1:0:0
+libshibsp_la_LDFLAGS = $(XMLSEC_LIBS) -version-info 2:0:0
+libshibsp_lite_la_LDFLAGS = $(LITE_LIBS) -version-info 2:0:0
 libshibsp_lite_la_CPPFLAGS = -DSHIBSP_LITE
 EXTRA_DIST = shibsp.vcproj shibsp-lite.vcproj paths.h.in resource.h shibsp.rc
 BUILT_SOURCES = paths.h
@@ -669,6 +678,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ChainingSessionInitiator.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CookieSessionInitiator.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DOMPropertySet.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DynamicMetadataProvider.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FormSessionInitiator.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ListenerService.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LocalLogoutInitiator.Plo@am__quote@
@@ -678,6 +688,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MetadataExtSchemaValidators.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MetadataGenerator.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NameIDAttributeDecoder.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NameIDFromScopedAttributeDecoder.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NotMatchFunctor.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NumberOfAttributeValuesFunctor.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OrMatchFunctor.Plo@am__quote@
@@ -1378,6 +1389,13 @@ NameIDAttributeDecoder.lo: attribute/NameIDAttributeDecoder.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NameIDAttributeDecoder.lo `test -f 'attribute/NameIDAttributeDecoder.cpp' || echo '$(srcdir)/'`attribute/NameIDAttributeDecoder.cpp
 
+NameIDFromScopedAttributeDecoder.lo: attribute/NameIDFromScopedAttributeDecoder.cpp
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT NameIDFromScopedAttributeDecoder.lo -MD -MP -MF "$(DEPDIR)/NameIDFromScopedAttributeDecoder.Tpo" -c -o NameIDFromScopedAttributeDecoder.lo `test -f 'attribute/NameIDFromScopedAttributeDecoder.cpp' || echo '$(srcdir)/'`attribute/NameIDFromScopedAttributeDecoder.cpp; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/NameIDFromScopedAttributeDecoder.Tpo" "$(DEPDIR)/NameIDFromScopedAttributeDecoder.Plo"; else rm -f "$(DEPDIR)/NameIDFromScopedAttributeDecoder.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='attribute/NameIDFromScopedAttributeDecoder.cpp' object='NameIDFromScopedAttributeDecoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NameIDFromScopedAttributeDecoder.lo `test -f 'attribute/NameIDFromScopedAttributeDecoder.cpp' || echo '$(srcdir)/'`attribute/NameIDFromScopedAttributeDecoder.cpp
+
 ScopedAttributeDecoder.lo: attribute/ScopedAttributeDecoder.cpp
 @am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ScopedAttributeDecoder.lo -MD -MP -MF "$(DEPDIR)/ScopedAttributeDecoder.Tpo" -c -o ScopedAttributeDecoder.lo `test -f 'attribute/ScopedAttributeDecoder.cpp' || echo '$(srcdir)/'`attribute/ScopedAttributeDecoder.cpp; \
 @am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/ScopedAttributeDecoder.Tpo" "$(DEPDIR)/ScopedAttributeDecoder.Plo"; else rm -f "$(DEPDIR)/ScopedAttributeDecoder.Tpo"; exit 1; fi
@@ -1588,6 +1606,13 @@ SOAPClient.lo: binding/impl/SOAPClient.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SOAPClient.lo `test -f 'binding/impl/SOAPClient.cpp' || echo '$(srcdir)/'`binding/impl/SOAPClient.cpp
 
+DynamicMetadataProvider.lo: metadata/DynamicMetadataProvider.cpp
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DynamicMetadataProvider.lo -MD -MP -MF "$(DEPDIR)/DynamicMetadataProvider.Tpo" -c -o DynamicMetadataProvider.lo `test -f 'metadata/DynamicMetadataProvider.cpp' || echo '$(srcdir)/'`metadata/DynamicMetadataProvider.cpp; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/DynamicMetadataProvider.Tpo" "$(DEPDIR)/DynamicMetadataProvider.Plo"; else rm -f "$(DEPDIR)/DynamicMetadataProvider.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='metadata/DynamicMetadataProvider.cpp' object='DynamicMetadataProvider.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DynamicMetadataProvider.lo `test -f 'metadata/DynamicMetadataProvider.cpp' || echo '$(srcdir)/'`metadata/DynamicMetadataProvider.cpp
+
 MetadataExtImpl.lo: metadata/MetadataExtImpl.cpp
 @am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MetadataExtImpl.lo -MD -MP -MF "$(DEPDIR)/MetadataExtImpl.Tpo" -c -o MetadataExtImpl.lo `test -f 'metadata/MetadataExtImpl.cpp' || echo '$(srcdir)/'`metadata/MetadataExtImpl.cpp; \
 @am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/MetadataExtImpl.Tpo" "$(DEPDIR)/MetadataExtImpl.Plo"; else rm -f "$(DEPDIR)/MetadataExtImpl.Tpo"; exit 1; fi
index 65d5b74..7aaaf98 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
  *  Copyright 2001-2007 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
@@ -17,8 +17,8 @@
 
 /**
  * SPConfig.cpp
- * 
- * Library configuration 
+ *
+ * Library configuration
  */
 
 #include "internal.h"
 # include <xmltooling/XMLToolingConfig.h>
 #endif
 
+#include <ctime>
+#include <xercesc/util/XMLUniDefs.hpp>
 #include <xmltooling/util/NDC.h>
 #include <xmltooling/util/PathResolver.h>
 #include <xmltooling/util/TemplateEngine.h>
+#include <xmltooling/util/XMLHelper.h>
 
 using namespace shibsp;
 using namespace opensaml;
 using namespace xmltooling;
+using namespace std;
 
 DECL_XMLTOOLING_EXCEPTION_FACTORY(AttributeException,shibsp);
 DECL_XMLTOOLING_EXCEPTION_FACTORY(AttributeExtractionException,shibsp);
@@ -108,13 +112,19 @@ bool SPConfig::init(const char* catalog_path, const char* inst_prefix)
         inst_prefix = getenv("SHIBSP_PREFIX");
     if (!inst_prefix)
         inst_prefix = SHIBSP_PREFIX;
-    
+    std::string inst_prefix2;
+    while (*inst_prefix) {
+        inst_prefix2.push_back((*inst_prefix=='\\') ? ('/') : (*inst_prefix));
+        ++inst_prefix;
+    }
+
     const char* loglevel=getenv("SHIBSP_LOGGING");
     if (!loglevel)
         loglevel = SHIBSP_LOGGING;
     std::string ll(loglevel);
     PathResolver localpr;
-    XMLToolingConfig::getConfig().log_config(localpr.resolve(ll, PathResolver::XMLTOOLING_CFG_FILE, PACKAGE_NAME, inst_prefix).c_str());
+    localpr.setDefaultPrefix(inst_prefix2.c_str());
+    XMLToolingConfig::getConfig().log_config(localpr.resolve(ll, PathResolver::XMLTOOLING_CFG_FILE, PACKAGE_NAME).c_str());
 
     Category& log=Category::getInstance(SHIBSP_LOGCAT".Config");
     log.debug("%s library initialization started", PACKAGE_STRING);
@@ -136,12 +146,12 @@ bool SPConfig::init(const char* catalog_path, const char* inst_prefix)
         log.fatal("failed to initialize XMLTooling library");
         return false;
     }
-#endif    
+#endif
     XMLToolingConfig::getConfig().getPathResolver()->setDefaultPackageName(PACKAGE_NAME);
-    XMLToolingConfig::getConfig().getPathResolver()->setDefaultPrefix(inst_prefix);
+    XMLToolingConfig::getConfig().getPathResolver()->setDefaultPrefix(inst_prefix2.c_str());
     XMLToolingConfig::getConfig().setTemplateEngine(new TemplateEngine());
     XMLToolingConfig::getConfig().getTemplateEngine()->setTagPrefix("shibmlp");
-    
+
     REGISTER_XMLTOOLING_EXCEPTION_FACTORY(AttributeException,shibsp);
     REGISTER_XMLTOOLING_EXCEPTION_FACTORY(AttributeExtractionException,shibsp);
     REGISTER_XMLTOOLING_EXCEPTION_FACTORY(AttributeFilteringException,shibsp);
@@ -195,6 +205,7 @@ bool SPConfig::init(const char* catalog_path, const char* inst_prefix)
     if (isEnabled(OutOfProcess))
         m_artifactResolver = new ArtifactResolver();
 #endif
+    srand(static_cast<unsigned int>(std::time(NULL)));
 
     log.info("%s library initialization complete", PACKAGE_STRING);
     return true;
@@ -251,3 +262,53 @@ void SPConfig::term()
 #endif
     log.info("%s library shutdown complete", PACKAGE_STRING);
 }
+
+bool SPConfig::instantiate(const char* config, bool rethrow)
+{
+#ifdef _DEBUG
+    NDC ndc("instantiate");
+#endif
+    if (!config)
+        config = getenv("SHIBSP_CONFIG");
+    if (!config)
+        config = SHIBSP_CONFIG;
+    try {
+        xercesc::DOMDocument* dummydoc;
+        if (*config == '"' || *config == '\'') {
+            throw ConfigurationException("The value of SHIBSP_CONFIG started with a quote.");
+        }
+        else if (*config != '<') {
+
+            // Mock up some XML.
+            string resolved(config);
+            stringstream snippet;
+            snippet
+                << "<Dummy path='"
+                << XMLToolingConfig::getConfig().getPathResolver()->resolve(resolved, PathResolver::XMLTOOLING_CFG_FILE)
+                << "' validate='1'/>";
+            dummydoc = XMLToolingConfig::getConfig().getParser().parse(snippet);
+            XercesJanitor<xercesc::DOMDocument> docjanitor(dummydoc);
+            setServiceProvider(ServiceProviderManager.newPlugin(XML_SERVICE_PROVIDER, dummydoc->getDocumentElement()));
+        }
+        else {
+            stringstream snippet(config);
+            dummydoc = XMLToolingConfig::getConfig().getParser().parse(snippet);
+            XercesJanitor<xercesc::DOMDocument> docjanitor(dummydoc);
+            static const XMLCh _type[] = UNICODE_LITERAL_4(t,y,p,e);
+            auto_ptr_char type(dummydoc->getDocumentElement()->getAttributeNS(NULL,_type));
+            if (type.get() && *type.get())
+                setServiceProvider(ServiceProviderManager.newPlugin(type.get(), dummydoc->getDocumentElement()));
+            else
+                throw ConfigurationException("The supplied XML bootstrapping configuration did not include a type attribute.");
+        }
+
+        getServiceProvider()->init();
+        return true;
+    }
+    catch (exception& ex) {
+        if (rethrow)
+            throw;
+        Category::getInstance(SHIBSP_LOGCAT".Config").fatal("caught exception while loading configuration: %s", ex.what());
+    }
+    return false;
+}
index 81499cd..d58c3a4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,8 +16,8 @@
 
 /**
  * @file shibsp/SPConfig.h
- * 
- * Library configuration 
+ *
+ * Library configuration
  */
 
 #ifndef __shibsp_config_h__
@@ -75,7 +75,7 @@ namespace shibsp {
 
         /**
          * Returns the global configuration object for the library.
-         * 
+         *
          * @return reference to the global library configuration object
          */
         static SPConfig& getConfig();
@@ -98,10 +98,10 @@ namespace shibsp {
             Logging = 512,
             Handlers = 1024
         };
-        
+
         /**
          * Set a bitmask of subsystems to activate.
-         * 
+         *
          * @param enabled   bitmask of component constants
          */
         void setFeatures(unsigned long enabled) {
@@ -110,69 +110,79 @@ namespace shibsp {
 
         /**
          * Test whether a subsystem is enabled.
-         * 
+         *
          * @param feature   subsystem/component to test
          * @return true iff feature is enabled
          */
         bool isEnabled(components_t feature) {
             return (m_features & feature)>0;
         }
-        
+
         /**
          * Initializes library
-         * 
+         *
          * Each process using the library MUST call this function exactly once
          * before using any library classes.
-         * 
+         *
          * @param catalog_path  delimited set of schema catalog files to load
          * @param inst_prefix   installation prefix for software
-         * @return true iff initialization was successful 
+         * @return true iff initialization was successful
          */
         virtual bool init(const char* catalog_path=NULL, const char* inst_prefix=NULL);
-        
+
         /**
          * Shuts down library
-         * 
+         *
          * Each process using the library SHOULD call this function exactly once
          * before terminating itself.
          */
         virtual void term();
-        
+
         /**
          * Sets the global ServiceProvider instance.
          * This method must be externally synchronized with any code that uses the object.
          * Any previously set object is destroyed.
-         * 
+         *
          * @param serviceProvider   new ServiceProvider instance to store
          */
         void setServiceProvider(ServiceProvider* serviceProvider);
-        
+
         /**
          * Returns the global ServiceProvider instance.
-         * 
+         *
          * @return  global ServiceProvider or NULL
          */
         ServiceProvider* getServiceProvider() const {
             return m_serviceProvider;
         }
 
+        /**
+         * Instantiates and installs a ServiceProvider instance based on an XML configuration string
+         * or a configuration pathname.
+         *
+         * @param config    a snippet of XML to parse (it <strong>MUST</strong> contain a type attribute) or a pathname
+         * @param rethrow   true iff caught exceptions should be rethrown instead of just returning the status
+         * @return true iff instantiation was successful
+         */
+        virtual bool instantiate(const char* config=NULL, bool rethrow=false);
+
 #ifndef SHIBSP_LITE
         /**
          * Sets the global ArtifactResolver instance.
          *
          * <p>This method must be externally synchronized with any code that uses the object.
          * Any previously set object is destroyed.
-         * 
+         *
          * @param artifactResolver   new ArtifactResolver instance to store
          */
         void setArtifactResolver(opensaml::MessageDecoder::ArtifactResolver* artifactResolver) {
             delete m_artifactResolver;
             m_artifactResolver = artifactResolver;
         }
-        
+
         /**
          * Returns the global ArtifactResolver instance.
-         * 
+         *
          * @return  global ArtifactResolver or NULL
          */
         opensaml::MessageDecoder::ArtifactResolver* getArtifactResolver() const {
@@ -182,7 +192,7 @@ namespace shibsp {
 
         /** Separator for serialized values of multi-valued attributes. */
         char attribute_value_delimeter;
-        
+
         /**
          * Manages factories for AccessControl plugins.
          */
index 97fadc6..cf2b7ed 100644 (file)
@@ -79,7 +79,7 @@ namespace shibsp {
          * @param cache         true iff the request should hold the Session lock itself and unlock during cleanup
          * @return pointer to Session, or NULL
          */
-        virtual Session* getSession(bool checkTimeout=true, bool ignoreAddress=false, bool cache=true) const=0;
+        virtual Session* getSession(bool checkTimeout=true, bool ignoreAddress=false, bool cache=true)=0;
 
         /**
          * Returns the effective base Handler URL for a resource,
index df7cf81..91a8ab9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * ServiceProvider.cpp
- * 
+ *
  * Interface to a Shibboleth ServiceProvider instance.
  */
 
@@ -87,7 +87,7 @@ namespace shibsp {
         request.setContentType("text/html");
         request.setResponseHeader("Expires","01-Jan-1997 12:00:00 GMT");
         request.setResponseHeader("Cache-Control","private,no-store,no-cache");
-    
+
         if (!pathname.first && props) {
             if (mderror)
                 pathname=props->getString("metadata");
@@ -104,17 +104,17 @@ namespace shibsp {
                 return request.sendResponse(str);
             }
         }
-        
+
         if (!strcmp(page,"access")) {
             istringstream msg("Access Denied");
             return request.sendResponse(msg, HTTPResponse::XMLTOOLING_HTTP_STATUS_UNAUTHORIZED);
         }
-    
+
         log.error("sendError could not process error template (%s)", page);
         istringstream msg("Internal Server Error. Please contact the site administrator.");
         return request.sendError(msg);
     }
-    
+
     void SHIBSP_DLLLOCAL clearHeaders(SPRequest& request) {
         request.clearHeader("Shib-Session-ID", "HTTP_SHIB_SESSION_ID");
         request.clearHeader("Shib-Identity-Provider", "HTTP_SHIB_IDENTITY_PROVIDER");
@@ -172,7 +172,7 @@ pair<bool,long> ServiceProvider::doAuthentication(SPRequest& request, bool handl
                 }
             }
         }
-        
+
         const char* handlerURL=request.getHandlerURL(targetURL.c_str());
         if (!handlerURL)
             throw ConfigurationException("Cannot determine handler from resource URL, check configuration.");
@@ -222,7 +222,7 @@ pair<bool,long> ServiceProvider::doAuthentication(SPRequest& request, bool handl
                 return make_pair(true,request.returnOK());
 
             // No session, but we require one. Initiate a new session using the indicated method.
-            const Handler* initiator=NULL;
+            const SessionInitiator* initiator=NULL;
             if (requireSessionWith.first) {
                 initiator=app->getSessionInitiatorById(requireSessionWith.second);
                 if (!initiator) {
@@ -291,7 +291,7 @@ pair<bool,long> ServiceProvider::doAuthorization(SPRequest& request) const
             catch (exception& e) {
                 log.warn("unable to obtain session to pass to access control provider: %s", e.what());
             }
-       
+
             Locker acllock(settings.second);
             switch (settings.second->authorized(request,session)) {
                 case AccessControl::shib_acl_true:
@@ -354,7 +354,7 @@ pair<bool,long> ServiceProvider::doExport(SPRequest& request, bool requireSessio
                else
                        return make_pair(false,0L);     // just bail silently
         }
-        
+
         request.setHeader("Shib-Application-ID", app->getId());
         request.setHeader("Shib-Session-ID", session->getID());
 
@@ -373,7 +373,7 @@ pair<bool,long> ServiceProvider::doExport(SPRequest& request, bool requireSessio
         hval = session->getAuthnContextDeclRef();
         if (hval)
             request.setHeader("Shib-AuthnContext-Decl", hval);
-        
+
         // Maybe export the assertion keys.
         pair<bool,bool> exp=settings.first->getBool("exportAssertion");
         if (exp.first && exp.second) {
@@ -505,7 +505,7 @@ pair<bool,long> ServiceProvider::doHandler(SPRequest& request) const
 
         // Process incoming request.
         pair<bool,bool> handlerSSL=sessionProps->getBool("handlerSSL");
-      
+
         // Make sure this is SSL, if it should be
         if ((!handlerSSL.first || handlerSSL.second) && !request.isSecure())
             throw opensaml::FatalProfileException("Blocked non-SSL access to Shibboleth handler.");
@@ -521,7 +521,7 @@ pair<bool,long> ServiceProvider::doHandler(SPRequest& request) const
         // Did the handler run successfully?
         if (hret.first)
             return hret;
-       
+
         throw ConfigurationException("Configured Shibboleth handler failed to process the request.");
     }
     catch (exception& e) {
index 18910bd..ad3af9d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * @file shibsp/SessionCache.h
- * 
+ *
  * Caches and manages user sessions
  */
 
@@ -82,14 +82,14 @@ namespace shibsp {
 
         /**
          * Returns the address of the client associated with the session.
-         * 
+         *
          * @return  the client's network address
          */
         virtual const char* getClientAddress() const=0;
 
         /**
          * Returns the entityID of the IdP that initiated the session.
-         * 
+         *
          * @return the IdP's entityID
          */
         virtual const char* getEntityID() const=0;
@@ -103,17 +103,17 @@ namespace shibsp {
 
         /**
          * Returns the UTC timestamp on the authentication event at the IdP.
-         * 
-         * @return  the UTC authentication timestamp 
+         *
+         * @return  the UTC authentication timestamp
          */
         virtual const char* getAuthnInstant() const=0;
 
 #ifndef SHIBSP_LITE
         /**
          * Returns the NameID associated with a session.
-         * 
+         *
          * <p>SAML 1.x identifiers will be promoted to the 2.0 type.
-         * 
+         *
          * @return a SAML 2.0 NameID associated with the session, if any
          */
         virtual const opensaml::saml2::NameID* getNameID() const=0;
@@ -121,78 +121,78 @@ namespace shibsp {
 
         /**
          * Returns the SessionIndex provided with the session.
-         * 
+         *
          * @return the SessionIndex from the original SSO assertion, if any
          */
         virtual const char* getSessionIndex() const=0;
 
         /**
          * Returns a URI containing an AuthnContextClassRef provided with the session.
-         * 
+         *
          * <p>SAML 1.x AuthenticationMethods will be returned as class references.
-         * 
+         *
          * @return  a URI identifying the authentication context class
          */
         virtual const char* getAuthnContextClassRef() const=0;
 
         /**
          * Returns a URI containing an AuthnContextDeclRef provided with the session.
-         * 
+         *
          * @return  a URI identifying the authentication context declaration
          */
         virtual const char* getAuthnContextDeclRef() const=0;
-        
+
         /**
          * Returns the resolved attributes associated with the session.
-         * 
+         *
          * @return an immutable array of attributes
          */
         virtual const std::vector<Attribute*>& getAttributes() const=0;
 
         /**
          * Returns the resolved attributes associated with the session, indexed by ID
-         * 
+         *
          * @return an immutable map of attributes keyed by attribute ID
          */
         virtual const std::multimap<std::string,const Attribute*>& getIndexedAttributes() const=0;
-        
+
         /**
          * Returns the identifiers of the assertion(s) cached by the session.
-         * 
+         *
          * <p>The SSO assertion is guaranteed to be first in the set.
-         * 
+         *
          * @return  an immutable array of AssertionID values
          */
         virtual const std::vector<const char*>& getAssertionIDs() const=0;
-        
+
 #ifndef SHIBSP_LITE
         /**
          * Adds additional attributes to the session.
-         * 
+         *
          * @param attributes    reference to an array of Attributes to cache (will be freed by cache)
          */
         virtual void addAttributes(const std::vector<Attribute*>& attributes)=0;
 
         /**
          * Returns an assertion cached by the session.
-         * 
+         *
          * @param id    identifier of the assertion to retrieve
          * @return pointer to assertion, or NULL
          */
         virtual const opensaml::Assertion* getAssertion(const char* id) const=0;
-        
+
         /**
          * Stores an assertion in the session.
-         * 
+         *
          * @param assertion pointer to an assertion to cache (will be freed by cache)
          */
-        virtual void addAssertion(opensaml::Assertion* assertion)=0;        
+        virtual void addAssertion(opensaml::Assertion* assertion)=0;
 #endif
     };
-    
+
     /**
      * Creates and manages user sessions
-     * 
+     *
      * The cache abstracts a persistent (meaning across requests) cache of
      * instances of the Session interface. Creation of new entries and entry
      * lookup are confined to this interface to enable the implementation to
@@ -206,14 +206,14 @@ namespace shibsp {
         SessionCache() {}
     public:
         virtual ~SessionCache() {}
-        
+
 #ifndef SHIBSP_LITE
         /**
          * Inserts a new session into the cache and binds the session to the outgoing
          * client response.
-         * 
+         *
          * <p>The SSO tokens and Attributes remain owned by the caller and are copied by the cache.
-         * 
+         *
          * @param application       reference to Application that owns the Session
          * @param httpRequest       request that initiated session
          * @param httpResponse      current response to client
@@ -246,7 +246,7 @@ namespace shibsp {
 
         /**
          * Determines whether the Session bound to a client request matches a set of input criteria.
-         * 
+         *
          * @param application   reference to Application that owns the Session
          * @param request       request in which to locate Session
          * @param issuer        required source of session(s)
@@ -270,7 +270,7 @@ namespace shibsp {
 
         /**
          * Returns the ID of the session bound to the specified client request, if possible.
-         * 
+         *
          * @param application   reference to Application that owns the Session
          * @param request       request from client containing session, or a reference to it
          * @return  ID of session, if any known, or an empty string
@@ -279,23 +279,48 @@ namespace shibsp {
 
         /**
          * Locates an existing session bound to a request.
-         * 
+         *
          * <p>If the client address is supplied, then a check will be performed against
          * the address recorded in the record.
-         * 
+         *
          * @param application   reference to Application that owns the Session
-         * @param request       request from client containing session, or a reference to it
+         * @param request       request from client bound to session
          * @param client_addr   network address of client (if known)
          * @param timeout       inactivity timeout to enforce (0 for none, NULL to bypass check/update of last access)
          * @return  pointer to locked Session, or NULL
          */
         virtual Session* find(
-            const Application& application, const xmltooling::HTTPRequest& request, const char* client_addr=NULL, time_t* timeout=NULL
+            const Application& application,
+            const xmltooling::HTTPRequest& request,
+            const char* client_addr=NULL,
+            time_t* timeout=NULL
             )=0;
 
         /**
+         * Locates an existing session bound to a request.
+         *
+         * <p>If the client address is supplied, then a check will be performed against
+         * the address recorded in the record.
+         *
+         * <p>If a bound session is found to have expired, be invalid, etc., and if the request
+         * can be used to "clear" the session from subsequent client requests, then it may be cleared.
+         *
+         * @param application   reference to Application that owns the Session
+         * @param request       request from client bound to session
+         * @param client_addr   network address of client (if known)
+         * @param timeout       inactivity timeout to enforce (0 for none, NULL to bypass check/update of last access)
+         * @return  pointer to locked Session, or NULL
+         */
+        virtual Session* find(
+            const Application& application,
+            xmltooling::HTTPRequest& request,
+            const char* client_addr=NULL,
+            time_t* timeout=NULL
+            );
+
+        /**
          * Deletes an existing session bound to a request.
-         * 
+         *
          * @param application   reference to Application that owns the Session
          * @param request       request from client containing session, or a reference to it
          * @param response      optional response to client enabling removal of session or reference
index a943272..d4301e4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * shibsp/attribute/Attribute.cpp
- * 
+ *
  * A resolved attribute.
  */
 
@@ -41,23 +41,25 @@ namespace shibsp {
     SHIBSP_DLLLOCAL Attribute* SimpleAttributeFactory(DDF& in) {
         return new SimpleAttribute(in);
     }
-    
+
     SHIBSP_DLLLOCAL Attribute* ScopedAttributeFactory(DDF& in) {
         return new ScopedAttribute(in);
     }
-    
+
     SHIBSP_DLLLOCAL Attribute* NameIDAttributeFactory(DDF& in) {
         return new NameIDAttribute(in);
     }
-    
+
 #ifndef SHIBSP_LITE
     SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory StringAttributeDecoderFactory;
     SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory ScopedAttributeDecoderFactory;
     SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory NameIDAttributeDecoderFactory;
+    SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory NameIDFromScopedAttributeDecoderFactory;
 
     static const XMLCh _StringAttributeDecoder[] = UNICODE_LITERAL_22(S,t,r,i,n,g,A,t,t,r,i,b,u,t,e,D,e,c,o,d,e,r);
     static const XMLCh _ScopedAttributeDecoder[] = UNICODE_LITERAL_22(S,c,o,p,e,d,A,t,t,r,i,b,u,t,e,D,e,c,o,d,e,r);
     static const XMLCh _NameIDAttributeDecoder[] = UNICODE_LITERAL_22(N,a,m,e,I,D,A,t,t,r,i,b,u,t,e,D,e,c,o,d,e,r);
+    static const XMLCh _NameIDFromScopedAttributeDecoder[] = UNICODE_LITERAL_32(N,a,m,e,I,D,F,r,o,m,S,c,o,p,e,d,A,t,t,r,i,b,u,t,e,D,e,c,o,d,e,r);
 
     static const XMLCh caseSensitive[] =           UNICODE_LITERAL_13(c,a,s,e,S,e,n,s,i,t,i,v,e);
 #endif
@@ -67,6 +69,7 @@ namespace shibsp {
 QName shibsp::StringAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _StringAttributeDecoder);
 QName shibsp::ScopedAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _ScopedAttributeDecoder);
 QName shibsp::NameIDAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _NameIDAttributeDecoder);
+QName shibsp::NameIDFromScopedAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _NameIDFromScopedAttributeDecoder);
 
 void shibsp::registerAttributeDecoders()
 {
@@ -74,6 +77,7 @@ void shibsp::registerAttributeDecoders()
     conf.AttributeDecoderManager.registerFactory(StringAttributeDecoderType, StringAttributeDecoderFactory);
     conf.AttributeDecoderManager.registerFactory(ScopedAttributeDecoderType, ScopedAttributeDecoderFactory);
     conf.AttributeDecoderManager.registerFactory(NameIDAttributeDecoderType, NameIDAttributeDecoderFactory);
+    conf.AttributeDecoderManager.registerFactory(NameIDFromScopedAttributeDecoderType, NameIDFromScopedAttributeDecoderFactory);
 }
 
 AttributeDecoder::AttributeDecoder(const DOMElement *e) : m_caseSensitive(true)
index 4d0fe94..7063ceb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * @file shibsp/attribute/AttributeDecoder.h
- * 
+ *
  * Decodes SAML NameID/Attribute objects into resolved Attributes.
  */
 
@@ -47,10 +47,10 @@ namespace shibsp {
 
     public:
         virtual ~AttributeDecoder() {}
-        
+
         /**
          * Decodes an XMLObject into a resolved Attribute.
-         * 
+         *
          * @param ids               array containing primary identifier in first position, followed by any aliases
          * @param xmlObject         XMLObject to decode
          * @param assertingParty    name of the party asserting the attribute
@@ -68,13 +68,16 @@ namespace shibsp {
 
     /** Decodes into a SimpleAttribute. */
     extern SHIBSP_API xmltooling::QName StringAttributeDecoderType;
-    
-    /** Decodes into a ScopedAttribute. */
+
+    /** Decodes scoped and NameID attributes into a ScopedAttribute. */
     extern SHIBSP_API xmltooling::QName ScopedAttributeDecoderType;
 
-    /** Decodes into a NameIDAttribute. */
+    /** Decodes NameID information into a NameIDAttribute. */
     extern SHIBSP_API xmltooling::QName NameIDAttributeDecoderType;
 
+    /** Decodes scoped attributes into a NameIDAttribute. */
+    extern SHIBSP_API xmltooling::QName NameIDFromScopedAttributeDecoderType;
+
     /** Registers built-in AttributeDecoders into the runtime. */
     void registerAttributeDecoders();
 };
index 4ed2cda..440fa57 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  *  Copyright 2001-2007 Internet2\r
- * \r
+ *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
  * You may obtain a copy of the License at\r
@@ -16,7 +16,7 @@
 \r
 /**\r
  * NameIDAttributeDecoder.cpp\r
- * \r
+ *\r
  * Decodes SAML into NameIDAttributes\r
  */\r
 \r
@@ -48,10 +48,10 @@ namespace shibsp {
 \r
     private:\r
         void extract(\r
-            const NameIDType* n, vector<NameIDAttribute::Value>& dest, const char* assertingParty=NULL, const char* relyingParty=NULL\r
+            const NameIDType* n, vector<NameIDAttribute::Value>& dest, const char* assertingParty, const char* relyingParty\r
             ) const;\r
         void extract(\r
-            const NameIdentifier* n, vector<NameIDAttribute::Value>& dest, const char* assertingParty=NULL, const char* relyingParty=NULL\r
+            const NameIdentifier* n, vector<NameIDAttribute::Value>& dest, const char* assertingParty, const char* relyingParty\r
             ) const;\r
         auto_ptr_char m_formatter;\r
     };\r
@@ -73,8 +73,8 @@ shibsp::Attribute* NameIDAttributeDecoder::decode(
     vector<NameIDAttribute::Value>& dest = nameid->getValues();\r
     vector<XMLObject*>::const_iterator v,stop;\r
 \r
-    Category& log = Category::getInstance(SHIBSP_LOGCAT".AttributeDecoder");\r
-    \r
+    Category& log = Category::getInstance(SHIBSP_LOGCAT".AttributeDecoder.NameID");\r
+\r
     if (xmlObject && XMLString::equals(opensaml::saml1::Attribute::LOCAL_NAME,xmlObject->getElementQName().getLocalPart())) {\r
         const opensaml::saml2::Attribute* saml2attr = dynamic_cast<const opensaml::saml2::Attribute*>(xmlObject);\r
         if (saml2attr) {\r
@@ -112,18 +112,18 @@ shibsp::Attribute* NameIDAttributeDecoder::decode(
         for (; v!=stop; ++v) {\r
             const NameIDType* n2 = dynamic_cast<const NameIDType*>(*v);\r
             if (n2)\r
-                extract(n2, dest);\r
+                extract(n2, dest, assertingParty, relyingParty);\r
             else {\r
                 const NameIdentifier* n1=dynamic_cast<const NameIdentifier*>(*v);\r
                 if (n1)\r
-                    extract(n1, dest);\r
+                    extract(n1, dest, assertingParty, relyingParty);\r
                 else if ((*v)->hasChildren()) {\r
                     const list<XMLObject*>& values = (*v)->getOrderedChildren();\r
                     for (list<XMLObject*>::const_iterator vv = values.begin(); vv!=values.end(); ++vv) {\r
                         if (n2=dynamic_cast<const NameIDType*>(*vv))\r
-                            extract(n2, dest);\r
+                            extract(n2, dest, assertingParty, relyingParty);\r
                         else if (n1=dynamic_cast<const NameIdentifier*>(*vv))\r
-                            extract(n1, dest);\r
+                            extract(n1, dest, assertingParty, relyingParty);\r
                         else\r
                             log.warn("skipping AttributeValue without a recognizable NameID/NameIdentifier");\r
                     }\r
@@ -140,7 +140,7 @@ shibsp::Attribute* NameIDAttributeDecoder::decode(
             auto_ptr_char f(saml2name->getFormat());\r
             log.debug("decoding NameIDAttribute (%s) from SAML 2 NameID with Format (%s)", ids.front().c_str(), f.get() ? f.get() : "unspecified");\r
         }\r
-        extract(saml2name, dest);\r
+        extract(saml2name, dest, assertingParty, relyingParty);\r
     }\r
     else {\r
         const NameIdentifier* saml1name = dynamic_cast<const NameIdentifier*>(xmlObject);\r
@@ -152,7 +152,7 @@ shibsp::Attribute* NameIDAttributeDecoder::decode(
                     ids.front().c_str(), f.get() ? f.get() : "unspecified"\r
                     );\r
             }\r
-            extract(saml1name, dest);\r
+            extract(saml1name, dest, assertingParty, relyingParty);\r
         }\r
         else {\r
             log.warn("XMLObject type not recognized by NameIDAttributeDecoder, no values returned");\r
@@ -177,21 +177,21 @@ void NameIDAttributeDecoder::extract(
             val.m_Format = str;\r
             delete[] str;\r
         }\r
-        \r
+\r
         str = toUTF8(n->getNameQualifier());\r
         if (str && *str)\r
             val.m_NameQualifier = str;\r
         else if (assertingParty)\r
             val.m_NameQualifier = assertingParty;\r
         delete[] str;\r
-        \r
+\r
         str = toUTF8(n->getSPNameQualifier());\r
         if (str && *str)\r
             val.m_SPNameQualifier = str;\r
         else if (relyingParty)\r
             val.m_SPNameQualifier = relyingParty;\r
         delete[] str;\r
-        \r
+\r
         str = toUTF8(n->getSPProvidedID());\r
         if (str) {\r
             val.m_SPProvidedID = str;\r
@@ -221,7 +221,7 @@ void NameIDAttributeDecoder::extract(
         else if (assertingParty)\r
             val.m_NameQualifier = assertingParty;\r
         delete[] str;\r
-        \r
+\r
         if (relyingParty)\r
             val.m_SPNameQualifier = relyingParty;\r
     }\r
diff --git a/shibsp/attribute/NameIDFromScopedAttributeDecoder.cpp b/shibsp/attribute/NameIDFromScopedAttributeDecoder.cpp
new file mode 100644 (file)
index 0000000..7e807b9
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ *  Copyright 2001-2007 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.
+ */
+
+/**
+ * NameIDFromNameIDFromScopedAttributeDecoder.cpp
+ *
+ * Decodes SAML "scoped" attributes into NameIDAttributes.
+ */
+
+#include "internal.h"
+#include "attribute/AttributeDecoder.h"
+#include "attribute/NameIDAttribute.h"
+
+#include <saml/saml1/core/Assertions.h>
+#include <saml/saml2/core/Assertions.h>
+
+using namespace shibsp;
+using namespace opensaml::saml1;
+using namespace opensaml::saml2;
+using namespace xmltooling;
+using namespace std;
+
+namespace shibsp {
+    static XMLCh format[] =                 UNICODE_LITERAL_6(f,o,r,m,a,t);
+    static XMLCh formatter[] =              UNICODE_LITERAL_9(f,o,r,m,a,t,t,e,r);
+    static const XMLCh Scope[] =            UNICODE_LITERAL_5(S,c,o,p,e);
+    static const XMLCh scopeDelimeter[] =   UNICODE_LITERAL_14(s,c,o,p,e,D,e,l,i,m,e,t,e,r);
+
+    class SHIBSP_DLLLOCAL NameIDFromScopedAttributeDecoder : virtual public AttributeDecoder
+    {
+    public:
+        NameIDFromScopedAttributeDecoder(const DOMElement* e) : AttributeDecoder(e), m_delimeter('@'),
+                m_format(e ? e->getAttributeNS(NULL,format) : NULL), m_formatter(e ? e->getAttributeNS(NULL,formatter) : NULL) {
+            if (e && e->hasAttributeNS(NULL,scopeDelimeter)) {
+                auto_ptr_char d(e->getAttributeNS(NULL,scopeDelimeter));
+                m_delimeter = *(d.get());
+            }
+        }
+        ~NameIDFromScopedAttributeDecoder() {}
+
+        shibsp::Attribute* decode(
+            const vector<string>& ids, const XMLObject* xmlObject, const char* assertingParty=NULL, const char* relyingParty=NULL
+            ) const;
+
+    private:
+        char m_delimeter;
+        auto_ptr_char m_format;
+        auto_ptr_char m_formatter;
+    };
+
+    AttributeDecoder* SHIBSP_DLLLOCAL NameIDFromScopedAttributeDecoderFactory(const DOMElement* const & e)
+    {
+        return new NameIDFromScopedAttributeDecoder(e);
+    }
+};
+
+shibsp::Attribute* NameIDFromScopedAttributeDecoder::decode(
+    const vector<string>& ids, const XMLObject* xmlObject, const char* assertingParty, const char* relyingParty
+    ) const
+{
+
+    char* val;
+    char* scope;
+    const XMLCh* xmlscope;
+    QName scopeqname(NULL,Scope);
+    auto_ptr<NameIDAttribute> nameid(
+        new NameIDAttribute(ids, (m_formatter.get() && *m_formatter.get()) ? m_formatter.get() : DEFAULT_NAMEID_FORMATTER)
+        );
+    nameid->setCaseSensitive(m_caseSensitive);
+    vector<NameIDAttribute::Value>& dest = nameid->getValues();
+    vector<XMLObject*>::const_iterator v,stop;
+
+    Category& log = Category::getInstance(SHIBSP_LOGCAT".AttributeDecoder.NameIDFromScoped");
+
+    if (xmlObject && XMLString::equals(opensaml::saml1::Attribute::LOCAL_NAME,xmlObject->getElementQName().getLocalPart())) {
+        const opensaml::saml2::Attribute* saml2attr = dynamic_cast<const opensaml::saml2::Attribute*>(xmlObject);
+        if (saml2attr) {
+            const vector<XMLObject*>& values = saml2attr->getAttributeValues();
+            v = values.begin();
+            stop = values.end();
+            if (log.isDebugEnabled()) {
+                auto_ptr_char n(saml2attr->getName());
+                log.debug(
+                    "decoding NameIDAttribute (%s) from SAML 2 Attribute (%s) with %lu value(s)",
+                    ids.front().c_str(), n.get() ? n.get() : "unnamed", values.size()
+                    );
+            }
+        }
+        else {
+            const opensaml::saml1::Attribute* saml1attr = dynamic_cast<const opensaml::saml1::Attribute*>(xmlObject);
+            if (saml1attr) {
+                const vector<XMLObject*>& values = saml1attr->getAttributeValues();
+                v = values.begin();
+                stop = values.end();
+                if (log.isDebugEnabled()) {
+                    auto_ptr_char n(saml1attr->getAttributeName());
+                    log.debug(
+                        "decoding NameIDAttribute (%s) from SAML 1 Attribute (%s) with %lu value(s)",
+                        ids.front().c_str(), n.get() ? n.get() : "unnamed", values.size()
+                        );
+                }
+            }
+            else {
+                log.warn("XMLObject type not recognized by NameIDFromScopedAttributeDecoder, no values returned");
+                return NULL;
+            }
+        }
+
+        for (; v!=stop; ++v) {
+            if (!(*v)->hasChildren()) {
+                val = toUTF8((*v)->getTextContent());
+                if (val && *val) {
+                    dest.push_back(NameIDAttribute::Value());
+                    NameIDAttribute::Value& destval = dest.back();
+                    const AttributeExtensibleXMLObject* aexo=dynamic_cast<const AttributeExtensibleXMLObject*>(*v);
+                    xmlscope = aexo ? aexo->getAttribute(scopeqname) : NULL;
+                    if (!xmlscope || !*xmlscope) {
+                        // Terminate the value at the scope delimiter.
+                        if (scope = strchr(val, m_delimeter))
+                            *scope++ = 0;
+                    }
+                    destval.m_Name = val;
+                    if (m_format.get() && *m_format.get())
+                        destval.m_Format = m_format.get();
+                    if (assertingParty)
+                        destval.m_NameQualifier = assertingParty;
+                    if (relyingParty)
+                        destval.m_SPNameQualifier = relyingParty;
+                }
+                else {
+                    log.warn("skipping empty AttributeValue");
+                }
+                delete[] val;
+            }
+            else {
+                log.warn("skipping complex AttributeValue");
+            }
+        }
+
+        return dest.empty() ? NULL : nameid.release();
+    }
+
+    log.warn("XMLObject type not recognized by NameIDFromScopedAttributeDecoder, no values returned");
+    return NULL;
+}
index cdfacad..2044d6b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * ScopedAttributeDecoder.cpp
- * 
+ *
  * Decodes SAML into ScopedAttributes
  */
 
@@ -41,11 +41,9 @@ namespace shibsp {
     {
     public:
         ScopedAttributeDecoder(const DOMElement* e) : AttributeDecoder(e), m_delimeter('@') {
-            if (e) {
-                if (e->hasAttributeNS(NULL,scopeDelimeter)) {
-                    auto_ptr_char d(e->getAttributeNS(NULL,scopeDelimeter));
-                    m_delimeter = *(d.get());
-                }
+            if (e && e->hasAttributeNS(NULL,scopeDelimeter)) {
+                auto_ptr_char d(e->getAttributeNS(NULL,scopeDelimeter));
+                m_delimeter = *(d.get());
             }
         }
         ~ScopedAttributeDecoder() {}
@@ -77,8 +75,8 @@ shibsp::Attribute* ScopedAttributeDecoder::decode(
     vector< pair<string,string> >& dest = scoped->getValues();
     vector<XMLObject*>::const_iterator v,stop;
 
-    Category& log = Category::getInstance(SHIBSP_LOGCAT".AttributeDecoder");
-    
+    Category& log = Category::getInstance(SHIBSP_LOGCAT".AttributeDecoder.Scoped");
+
     if (xmlObject && XMLString::equals(opensaml::saml1::Attribute::LOCAL_NAME,xmlObject->getElementQName().getLocalPart())) {
         const opensaml::saml2::Attribute* saml2attr = dynamic_cast<const opensaml::saml2::Attribute*>(xmlObject);
         if (saml2attr) {
@@ -118,7 +116,7 @@ shibsp::Attribute* ScopedAttributeDecoder::decode(
                 val = toUTF8((*v)->getTextContent());
                 if (val && *val) {
                     const AttributeExtensibleXMLObject* aexo=dynamic_cast<const AttributeExtensibleXMLObject*>(*v);
-                    xmlscope = aexo->getAttribute(scopeqname);
+                    xmlscope = aexo ? aexo->getAttribute(scopeqname) : NULL;
                     if (xmlscope && *xmlscope) {
                         scope = toUTF8(xmlscope);
                         dest.push_back(pair<string,string>(val,scope));
index 0e075dd..ca86390 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  *  Copyright 2001-2007 Internet2\r
- * \r
+ *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
  * You may obtain a copy of the License at\r
@@ -16,7 +16,7 @@
 \r
 /**\r
  * StringAttributeDecoder.cpp\r
- * \r
+ *\r
  * Decodes SAML into SimpleAttributes\r
  */\r
 \r
@@ -61,7 +61,7 @@ shibsp::Attribute* StringAttributeDecoder::decode(
     vector<string>& dest = simple->getValues();\r
     vector<XMLObject*>::const_iterator v,stop;\r
 \r
-    Category& log = Category::getInstance(SHIBSP_LOGCAT".AttributeDecoder");\r
+    Category& log = Category::getInstance(SHIBSP_LOGCAT".AttributeDecoder.String");\r
 \r
     if (xmlObject && XMLString::equals(opensaml::saml1::Attribute::LOCAL_NAME,xmlObject->getElementQName().getLocalPart())) {\r
         const opensaml::saml2::Attribute* saml2attr = dynamic_cast<const opensaml::saml2::Attribute*>(xmlObject);\r
index c2b193f..563e762 100644 (file)
@@ -28,6 +28,7 @@
 namespace shibsp {
 
     static const XMLCh value[] = UNICODE_LITERAL_5(v,a,l,u,e);
+    static const XMLCh ignoreCase[] = UNICODE_LITERAL_10(i,g,n,o,r,e,C,a,s,e);
 
     /**
      * A match function that matches the attribute issuer's name against the specified value.
@@ -35,19 +36,25 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL AttributeIssuerStringFunctor : public MatchFunctor
     {
         const XMLCh* m_value;
+        bool m_ignoreCase;
     public:
         AttributeIssuerStringFunctor(const DOMElement* e) {
             m_value = e ? e->getAttributeNS(NULL,value) : NULL;
             if (!m_value || !*m_value)
                 throw ConfigurationException("AttributeIssuerString MatchFunctor requires non-empty value attribute.");
+            const XMLCh* flag = e ? e->getAttributeNS(NULL,ignoreCase) : NULL;
+            m_ignoreCase = (flag && (*flag == chLatin_t || *flag == chDigit_1)); 
         }
 
         bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
-            return XMLString::equals(m_value, filterContext.getAttributeIssuer());
+            if (m_ignoreCase)
+                return (XMLString::compareIString(m_value, filterContext.getAttributeIssuer()) == 0);
+            else
+                return XMLString::equals(m_value, filterContext.getAttributeIssuer());
         }
 
         bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
-            return XMLString::equals(m_value, filterContext.getAttributeIssuer());
+            return evaluatePolicyRequirement(filterContext);
         }
     };
 
index fb8182b..5eecf7d 100644 (file)
@@ -28,6 +28,7 @@
 namespace shibsp {
 
     static const XMLCh value[] = UNICODE_LITERAL_5(v,a,l,u,e);
+    static const XMLCh ignoreCase[] = UNICODE_LITERAL_10(i,g,n,o,r,e,C,a,s,e);
 
     /**
      * A match function that matches the attribute requester's name against the specified value.
@@ -35,19 +36,25 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL AttributeRequesterStringFunctor : public MatchFunctor
     {
         const XMLCh* m_value;
+        bool m_ignoreCase;
     public:
         AttributeRequesterStringFunctor(const DOMElement* e) {
             m_value = e ? e->getAttributeNS(NULL,value) : NULL;
             if (!m_value || !*m_value)
                 throw ConfigurationException("AttributeRequesterString MatchFunctor requires non-empty value attribute.");
+            const XMLCh* flag = e ? e->getAttributeNS(NULL,ignoreCase) : NULL;
+            m_ignoreCase = (flag && (*flag == chLatin_t || *flag == chDigit_1)); 
         }
 
         bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
-            return XMLString::equals(m_value, filterContext.getAttributeRequester());
+            if (m_ignoreCase)
+                return (XMLString::compareIString(m_value, filterContext.getAttributeRequester()) == 0);
+            else
+                return XMLString::equals(m_value, filterContext.getAttributeRequester());
         }
 
         bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
-            return XMLString::equals(m_value, filterContext.getAttributeRequester());
+            return evaluatePolicyRequirement(filterContext);
         }
     };
 
index d9749fc..14a1bb1 100644 (file)
@@ -32,6 +32,7 @@ using namespace std;
 namespace shibsp {
 
     static const XMLCh attributeID[] =  UNICODE_LITERAL_11(a,t,t,r,i,b,u,t,e,I,D);
+    static const XMLCh ignoreCase[] =   UNICODE_LITERAL_10(i,g,n,o,r,e,C,a,s,e);
     static const XMLCh value[] =        UNICODE_LITERAL_5(v,a,l,u,e);
 
     /**
@@ -39,16 +40,25 @@ namespace shibsp {
      */
     class SHIBSP_DLLLOCAL AttributeScopeStringFunctor : public MatchFunctor
     {
-        xmltooling::auto_ptr_char m_value;
         xmltooling::auto_ptr_char m_attributeID;
+        char* m_value;
+        bool m_ignoreCase;
 
         bool hasScope(const FilteringContext& filterContext) const;
 
     public:
         AttributeScopeStringFunctor(const DOMElement* e)
-            : m_value(e ? e->getAttributeNS(NULL,value) : NULL), m_attributeID(e ? e->getAttributeNS(NULL,attributeID) : NULL) {
-            if (!m_value.get() || !*m_value.get())
+            : m_value(e ? xmltooling::toUTF8(e->getAttributeNS(NULL,value)) : NULL), m_attributeID(e ? e->getAttributeNS(NULL,attributeID) : NULL) {
+            if (!m_value || !*m_value) {
+                delete[] m_value;
                 throw ConfigurationException("AttributeScopeString MatchFunctor requires non-empty value attribute.");
+            }
+            const XMLCh* flag = e ? e->getAttributeNS(NULL,ignoreCase) : NULL;
+            m_ignoreCase = (flag && (*flag == chLatin_t || *flag == chDigit_1)); 
+        }
+
+        virtual ~AttributeScopeStringFunctor() {
+            delete[] m_value;
         }
 
         bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
@@ -58,8 +68,17 @@ namespace shibsp {
         }
 
         bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
-            if (!m_attributeID.get() || !*m_attributeID.get() || XMLString::equals(m_attributeID.get(), attribute.getId()))
-                return XMLString::equals(attribute.getScope(index), m_value.get());
+            if (!m_attributeID.get() || !*m_attributeID.get() || XMLString::equals(m_attributeID.get(), attribute.getId())) {
+                if (m_ignoreCase) {
+#ifdef HAVE_STRCASECMP
+                    return !strcasecmp(attribute.getScope(index), m_value);
+#else
+                    return !stricmp(attribute.getScope(index), m_value);
+#endif
+                }
+                else
+                    return !strcmp(attribute.getScope(index), m_value);
+            }
             return hasScope(filterContext);
         }
     };
@@ -79,8 +98,19 @@ bool AttributeScopeStringFunctor::hasScope(const FilteringContext& filterContext
     for (; attrs.first != attrs.second; ++attrs.first) {
         count = attrs.first->second->valueCount();
         for (size_t index = 0; index < count; ++index) {
-            if (XMLString::equals(attrs.first->second->getScope(index), m_value.get()))
-                return true;
+            if (m_ignoreCase) {
+#ifdef HAVE_STRCASECMP
+                if (!strcasecmp(attrs.first->second->getScope(index), m_value))
+                    return true;
+#else
+                if (!stricmp(attrs.first->second->getScope(index), m_value))
+                    return true;
+#endif
+            }
+            else {
+                if (!strcmp(attrs.first->second->getScope(index), m_value))
+                    return true;
+            }
         }
     }
     return false;
index 0c2739c..707f318 100644 (file)
@@ -33,23 +33,35 @@ namespace shibsp {
 
     static const XMLCh attributeID[] =  UNICODE_LITERAL_11(a,t,t,r,i,b,u,t,e,I,D);
     static const XMLCh value[] =        UNICODE_LITERAL_5(v,a,l,u,e);
+    static const XMLCh ignoreCase[] =   UNICODE_LITERAL_10(i,g,n,o,r,e,C,a,s,e);
 
     /**
      * A match function that matches the value of an attribute against the specified value.
      */
     class SHIBSP_DLLLOCAL AttributeValueStringFunctor : public MatchFunctor
     {
-        xmltooling::auto_ptr_char m_value;
         xmltooling::auto_ptr_char m_attributeID;
+        char* m_value;
 
         bool hasValue(const FilteringContext& filterContext) const;
         bool matches(const Attribute& attribute, size_t index) const;
 
     public:
         AttributeValueStringFunctor(const DOMElement* e)
-            : m_value(e ? e->getAttributeNS(NULL,value) : NULL), m_attributeID(e ? e->getAttributeNS(NULL,attributeID) : NULL) {
-            if (!m_value.get() || !*m_value.get())
+            : m_value(e ? xmltooling::toUTF8(e->getAttributeNS(NULL,value)) : NULL), m_attributeID(e ? e->getAttributeNS(NULL,attributeID) : NULL) {
+            if (!m_value || !*m_value) {
+                delete[] m_value;
                 throw ConfigurationException("AttributeValueString MatchFunctor requires non-empty value attribute.");
+            }
+            if (e && e->hasAttributeNS(NULL,ignoreCase)) {
+                xmltooling::logging::Category::getInstance(SHIBSP_LOGCAT".AttributeFilter").warn(
+                    "ignoreCase property ignored by AttributeValueString MatchFunctor in favor of attribute's caseSensitive property"
+                    );
+            }
+        }
+
+        virtual ~AttributeValueStringFunctor() {
+            delete[] m_value;
         }
 
         bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
@@ -93,11 +105,11 @@ bool AttributeValueStringFunctor::matches(const Attribute& attribute, size_t ind
     if (!val)
         return false;
     if (attribute.isCaseSensitive())
-        return !strcmp(m_value.get(), val);
+        return !strcmp(m_value, val);
 
 #ifdef HAVE_STRCASECMP
-    return !strcasecmp(m_value.get(), val);
+    return !strcasecmp(m_value, val);
 #else
-    return !stricmp(m_value.get(), val);
+    return !stricmp(m_value, val);
 #endif
 }
index 69df276..3c8393e 100644 (file)
@@ -28,6 +28,7 @@
 namespace shibsp {
 
     static const XMLCh value[] = UNICODE_LITERAL_5(v,a,l,u,e);
+    static const XMLCh ignoreCase[] = UNICODE_LITERAL_10(i,g,n,o,r,e,C,a,s,e);
 
     /**
      * Match functor that compares the user's authentication method against a given string.
@@ -35,20 +36,26 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL AuthenticationMethodStringFunctor : public MatchFunctor
     {
         const XMLCh* m_value;
+        bool m_ignoreCase;
     public:
         AuthenticationMethodStringFunctor(const DOMElement* e) : m_value(e ? e->getAttributeNS(NULL,value) : NULL) {
             if (!m_value || !*m_value)
                 throw ConfigurationException("AuthenticationMethodString MatchFunctor requires non-empty value attribute.");
+            const XMLCh* flag = e ? e->getAttributeNS(NULL,ignoreCase) : NULL;
+            m_ignoreCase = (flag && (*flag == chLatin_t || *flag == chDigit_1)); 
         }
 
         bool evaluatePolicyRequirement(const FilteringContext& filterContext) const {
-            return XMLString::equals(m_value, filterContext.getAuthnContextClassRef()) ||
-                XMLString::equals(m_value, filterContext.getAuthnContextDeclRef());
+            if (m_ignoreCase)
+                return (XMLString::compareIString(m_value, filterContext.getAuthnContextClassRef()) == 0 ||
+                    XMLString::compareIString(m_value, filterContext.getAuthnContextDeclRef()) == 0);
+            else
+                return XMLString::equals(m_value, filterContext.getAuthnContextClassRef()) ||
+                    XMLString::equals(m_value, filterContext.getAuthnContextDeclRef());
         }
 
         bool evaluatePermitValue(const FilteringContext& filterContext, const Attribute& attribute, size_t index) const {
-            return XMLString::equals(m_value, filterContext.getAuthnContextClassRef()) ||
-                XMLString::equals(m_value, filterContext.getAuthnContextDeclRef());
+            return evaluatePolicyRequirement(filterContext);
         }
     };
 
index 47857f2..b01cf1f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * XMLAttributeFilter.cpp
- * 
+ *
  * AttributeFilter based on an XML policy language.
  */
 
@@ -33,6 +33,7 @@
 #include <xmltooling/util/XMLHelper.h>
 #include <xercesc/util/XMLUniDefs.hpp>
 
+using shibspconstants::SHIB2ATTRIBUTEFILTER_NS;
 using namespace shibsp;
 using namespace opensaml::saml2md;
 using namespace opensaml;
@@ -46,11 +47,13 @@ namespace shibsp {
     #pragma warning( disable : 4250 )
 #endif
 
+    // Each Policy has a functor for determining applicability and a map of
+    // attribute IDs to Accept/Deny functor pairs (which can include NULLs).
     struct SHIBSP_DLLLOCAL Policy
     {
         Policy() : m_applies(NULL) {}
         const MatchFunctor* m_applies;
-        typedef multimap<string,const MatchFunctor*> rules_t;
+        typedef multimap< string,pair<const MatchFunctor*,const MatchFunctor*> > rules_t;
         rules_t m_rules;
     };
 
@@ -63,6 +66,7 @@ namespace shibsp {
                 m_document->release();
             for_each(m_policyReqRules.begin(), m_policyReqRules.end(), cleanup_pair<string,MatchFunctor>());
             for_each(m_permitValRules.begin(), m_permitValRules.end(), cleanup_pair<string,MatchFunctor>());
+            for_each(m_denyValRules.begin(), m_denyValRules.end(), cleanup_pair<string,MatchFunctor>());
         }
 
         void setDocument(DOMDocument* doc) {
@@ -75,16 +79,19 @@ namespace shibsp {
         MatchFunctor* buildFunctor(
             const DOMElement* e, const FilterPolicyContext& functorMap, const char* logname, bool standalone
             );
-        pair<string,const MatchFunctor*> buildAttributeRule(const DOMElement* e, const FilterPolicyContext& functorMap, bool standalone);
+        pair< string,pair<const MatchFunctor*,const MatchFunctor*> > buildAttributeRule(
+            const DOMElement* e, const FilterPolicyContext& permMap, const FilterPolicyContext& denyMap, bool standalone
+            );
 
         Category& m_log;
         DOMDocument* m_document;
         vector<Policy> m_policies;
-        map< string,pair<string,const MatchFunctor*> > m_attrRules;
+        map< string,pair<string,pair<const MatchFunctor*,const MatchFunctor*> > > m_attrRules;
         multimap<string,MatchFunctor*> m_policyReqRules;
         multimap<string,MatchFunctor*> m_permitValRules;
+        multimap<string,MatchFunctor*> m_denyValRules;
     };
-    
+
     class SHIBSP_DLLLOCAL XMLFilter : public AttributeFilter, public ReloadableXMLFile
     {
     public:
@@ -94,7 +101,7 @@ namespace shibsp {
         ~XMLFilter() {
             delete m_impl;
         }
-        
+
         void filterAttributes(const FilteringContext& context, vector<Attribute*>& attributes) const {
             m_impl->filterAttributes(context, attributes);
         }
@@ -114,11 +121,13 @@ namespace shibsp {
     {
         return new XMLFilter(e);
     }
-    
+
     static const XMLCh AttributeFilterPolicyGroup[] =   UNICODE_LITERAL_26(A,t,t,r,i,b,u,t,e,F,i,l,t,e,r,P,o,l,i,c,y,G,r,o,u,p);
     static const XMLCh AttributeFilterPolicy[] =        UNICODE_LITERAL_21(A,t,t,r,i,b,u,t,e,F,i,l,t,e,r,P,o,l,i,c,y);
     static const XMLCh AttributeRule[] =                UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,R,u,l,e);
     static const XMLCh AttributeRuleReference[] =       UNICODE_LITERAL_22(A,t,t,r,i,b,u,t,e,R,u,l,e,R,e,f,e,r,e,n,c,e);
+    static const XMLCh DenyValueRule[] =                UNICODE_LITERAL_13(D,e,n,y,V,a,l,u,e,R,u,l,e);
+    static const XMLCh DenyValueRuleReference[] =       UNICODE_LITERAL_22(D,e,n,y,V,a,l,u,e,R,u,l,e,R,e,f,e,r,e,n,c,e);
     static const XMLCh PermitValueRule[] =              UNICODE_LITERAL_15(P,e,r,m,i,t,V,a,l,u,e,R,u,l,e);
     static const XMLCh PermitValueRuleReference[] =     UNICODE_LITERAL_24(P,e,r,m,i,t,V,a,l,u,e,R,u,l,e,R,e,f,e,r,e,n,c,e);
     static const XMLCh PolicyRequirementRule[] =        UNICODE_LITERAL_21(P,o,l,i,c,y,R,e,q,u,i,r,e,m,e,n,t,R,u,l,e);
@@ -133,31 +142,35 @@ XMLFilterImpl::XMLFilterImpl(const DOMElement* e, Category& log) : m_log(log), m
 #ifdef _DEBUG
     xmltooling::NDC ndc("XMLFilterImpl");
 #endif
-    
-    if (!XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, AttributeFilterPolicyGroup))
+
+    if (!XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, AttributeFilterPolicyGroup))
         throw ConfigurationException("XML AttributeFilter requires afp:AttributeFilterPolicyGroup at root of configuration.");
 
     FilterPolicyContext reqFunctors(m_policyReqRules);
-    FilterPolicyContext valFunctors(m_permitValRules);
+    FilterPolicyContext permFunctors(m_permitValRules);
+    FilterPolicyContext denyFunctors(m_denyValRules);
 
     DOMElement* child = XMLHelper::getFirstChildElement(e);
     while (child) {
-        if (XMLHelper::isNodeNamed(child, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, PolicyRequirementRule)) {
+        if (XMLHelper::isNodeNamed(child, SHIB2ATTRIBUTEFILTER_NS, PolicyRequirementRule)) {
             buildFunctor(child, reqFunctors, "PolicyRequirementRule", true);
         }
-        else if (XMLHelper::isNodeNamed(child, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, PermitValueRule)) {
-            buildFunctor(child, valFunctors, "PermitValueRule", true);
+        else if (XMLHelper::isNodeNamed(child, SHIB2ATTRIBUTEFILTER_NS, PermitValueRule)) {
+            buildFunctor(child, permFunctors, "PermitValueRule", true);
         }
-        else if (XMLHelper::isNodeNamed(child, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, AttributeRule)) {
-            buildAttributeRule(child, valFunctors, true);
+        else if (XMLHelper::isNodeNamed(child, SHIB2ATTRIBUTEFILTER_NS, DenyValueRule)) {
+            buildFunctor(child, denyFunctors, "DenyValueRule", true);
         }
-        else if (XMLHelper::isNodeNamed(child, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, AttributeFilterPolicy)) {
+        else if (XMLHelper::isNodeNamed(child, SHIB2ATTRIBUTEFILTER_NS, AttributeRule)) {
+            buildAttributeRule(child, permFunctors, denyFunctors, true);
+        }
+        else if (XMLHelper::isNodeNamed(child, SHIB2ATTRIBUTEFILTER_NS, AttributeFilterPolicy)) {
             e = XMLHelper::getFirstChildElement(child);
             MatchFunctor* func = NULL;
-            if (e && XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, PolicyRequirementRule)) {
+            if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, PolicyRequirementRule)) {
                 func = buildFunctor(e, reqFunctors, "PolicyRequirementRule", false);
             }
-            else if (e && XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, PolicyRequirementRuleReference)) {
+            else if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, PolicyRequirementRuleReference)) {
                 auto_ptr_char ref(e->getAttributeNS(NULL, _ref));
                 if (ref.get() && *ref.get()) {
                     multimap<string,MatchFunctor*>::const_iterator prr = m_policyReqRules.find(ref.get());
@@ -169,15 +182,15 @@ XMLFilterImpl::XMLFilterImpl(const DOMElement* e, Category& log) : m_log(log), m
                 m_policies.back().m_applies = func;
                 e = XMLHelper::getNextSiblingElement(e);
                 while (e) {
-                    if (e && XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, AttributeRule)) {
-                        pair<string,const MatchFunctor*> rule = buildAttributeRule(e, valFunctors, false);
-                        if (rule.second)
+                    if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, AttributeRule)) {
+                        pair< string,pair<const MatchFunctor*,const MatchFunctor*> > rule = buildAttributeRule(e, permFunctors, denyFunctors, false);
+                        if (rule.second.first || rule.second.second)
                             m_policies.back().m_rules.insert(Policy::rules_t::value_type(rule.first, rule.second));
                     }
-                    else if (e && XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, AttributeRuleReference)) {
+                    else if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, AttributeRuleReference)) {
                         auto_ptr_char ref(e->getAttributeNS(NULL, _ref));
                         if (ref.get() && *ref.get()) {
-                            map< string,pair<string,const MatchFunctor*> >::const_iterator ar = m_attrRules.find(ref.get());
+                            map< string,pair< string,pair< const MatchFunctor*,const MatchFunctor*> > >::const_iterator ar = m_attrRules.find(ref.get());
                             if (ar != m_attrRules.end())
                                 m_policies.back().m_rules.insert(Policy::rules_t::value_type(ar->second.first, ar->second.second));
                             else
@@ -234,19 +247,21 @@ MatchFunctor* XMLFilterImpl::buildFunctor(
     return NULL;
 }
 
-pair<string,const MatchFunctor*> XMLFilterImpl::buildAttributeRule(const DOMElement* e, const FilterPolicyContext& functorMap, bool standalone)
+pair< string,pair<const MatchFunctor*,const MatchFunctor*> > XMLFilterImpl::buildAttributeRule(
+    const DOMElement* e, const FilterPolicyContext& permMap, const FilterPolicyContext& denyMap, bool standalone
+    )
 {
     auto_ptr_char temp(e->getAttributeNS(NULL,_id));
     const char* id = (temp.get() && *temp.get()) ? temp.get() : "";
 
     if (standalone && !*id) {
         m_log.warn("skipping stand-alone AttributeRule with no id");
-        return make_pair(string(),(const MatchFunctor*)NULL);
+        return make_pair(string(),pair<const MatchFunctor*,const MatchFunctor*>(NULL,NULL));
     }
     else if (*id && m_attrRules.count(id)) {
         if (standalone) {
             m_log.warn("skipping duplicate stand-alone AttributeRule with id (%s)", id);
-            return make_pair(string(),(const MatchFunctor*)NULL);
+            return make_pair(string(),pair<const MatchFunctor*,const MatchFunctor*>(NULL,NULL));
         }
         else
             id = "";
@@ -256,28 +271,43 @@ pair<string,const MatchFunctor*> XMLFilterImpl::buildAttributeRule(const DOMElem
     if (!attrID.get() || !*attrID.get())
         m_log.warn("skipping AttributeRule with no attributeID");
 
+    MatchFunctor* perm=NULL;
+    MatchFunctor* deny=NULL;
+
     e = XMLHelper::getFirstChildElement(e);
-    MatchFunctor* func=NULL;
-    if (e && XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, PermitValueRule)) {
-        func = buildFunctor(e, functorMap, "PermitValueRule", false);
+    if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, PermitValueRule)) {
+        perm = buildFunctor(e, permMap, "PermitValueRule", false);
+        e = XMLHelper::getNextSiblingElement(e);
     }
-    else if (e && XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEFILTER_NS, PermitValueRuleReference)) {
+    else if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, PermitValueRuleReference)) {
         auto_ptr_char ref(e->getAttributeNS(NULL, _ref));
         if (ref.get() && *ref.get()) {
             multimap<string,MatchFunctor*>::const_iterator pvr = m_permitValRules.find(ref.get());
-            func = (pvr!=m_permitValRules.end()) ? pvr->second : NULL;
+            perm = (pvr!=m_permitValRules.end()) ? pvr->second : NULL;
         }
+        e = XMLHelper::getNextSiblingElement(e);
     }
 
-    if (func) {
+    if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, DenyValueRule)) {
+        deny = buildFunctor(e, denyMap, "DenyValueRule", false);
+    }
+    else if (e && XMLHelper::isNodeNamed(e, SHIB2ATTRIBUTEFILTER_NS, DenyValueRuleReference)) {
+        auto_ptr_char ref(e->getAttributeNS(NULL, _ref));
+        if (ref.get() && *ref.get()) {
+            multimap<string,MatchFunctor*>::const_iterator pvr = m_denyValRules.find(ref.get());
+            deny = (pvr!=m_denyValRules.end()) ? pvr->second : NULL;
+        }
+    }
+
+    if (perm || deny) {
         if (*id)
-            return m_attrRules[id] = pair<string,const MatchFunctor*>(attrID.get(), func);
+            return m_attrRules[id] = pair< string,pair<const MatchFunctor*,const MatchFunctor*> >(attrID.get(), pair<const MatchFunctor*,const MatchFunctor*>(perm,deny));
         else
-            return pair<string,const MatchFunctor*>(attrID.get(), func);
+            return pair< string,pair<const MatchFunctor*,const MatchFunctor*> >(attrID.get(), pair<const MatchFunctor*,const MatchFunctor*>(perm,deny));
     }
 
-    m_log.warn("skipping AttributeRule (%s), PermitValueRule invalid or missing", id);
-    return make_pair(string(),(const MatchFunctor*)NULL);
+    m_log.warn("skipping AttributeRule (%s), permit and denial rule(s) invalid or missing", id);
+    return pair< string,pair<const MatchFunctor*,const MatchFunctor*> >(string(),pair<const MatchFunctor*,const MatchFunctor*>(NULL,NULL));
 }
 
 void XMLFilterImpl::filterAttributes(const FilteringContext& context, vector<Attribute*>& attributes) const
@@ -293,100 +323,139 @@ void XMLFilterImpl::filterAttributes(const FilteringContext& context, vector<Att
         return;
     }
 
-    size_t count,index;
+    // We have to evaluate every policy that applies against each attribute before deciding what to keep.
 
-    // Test each Policy.
+    // For efficiency, we build an array of the policies that apply in advance.
+    vector<const Policy*> applicablePolicies;
     for (vector<Policy>::const_iterator p=m_policies.begin(); p!=m_policies.end(); ++p) {
-        if (p->m_applies->evaluatePolicyRequirement(context)) {
-            // Loop over the attributes and look for possible rules to run.
-            for (vector<Attribute*>::size_type a=0; a<attributes.size();) {
-                bool ruleFound = false;
-                Attribute* attr = attributes[a];
-                pair<Policy::rules_t::const_iterator,Policy::rules_t::const_iterator> rules = p->m_rules.equal_range(attr->getId());
-                if (rules.first != rules.second) {
-                    ruleFound = true;
-                    // Run each rule in sequence.
-                    m_log.debug(
-                        "applying filtering rule(s) for attribute (%s) from (%s)",
-                        attr->getId(), issuer.get() ? issuer.get() : "unknown source"
-                        );
-                    for (; rules.first!=rules.second; ++rules.first) {
-                        count = attr->valueCount();
-                        for (index=0; index < count;) {
-                            // The return value tells us whether to index past the accepted value, or stay put and decrement the count.
-                            if (rules.first->second->evaluatePermitValue(context, *attr, index)) {
-                                index++;
-                            }
-                            else {
-                                m_log.warn(
-                                    "removed value at position (%lu) of attribute (%s) from (%s)",
-                                    index, attr->getId(), issuer.get() ? issuer.get() : "unknown source"
-                                    );
-                                attr->removeValue(index);
-                                count--;
-                            }
-                        }
-                    }
-                }
+        if (p->m_applies->evaluatePolicyRequirement(context))
+            applicablePolicies.push_back(&(*p));
+    }
 
-                rules = p->m_rules.equal_range("*");
-                if (rules.first != rules.second) {
-                    // Run each rule in sequence.
-                    if (!ruleFound) {
-                        m_log.debug(
-                            "applying wildcard rule(s) for attribute (%s) from (%s)",
-                            attr->getId(), issuer.get() ? issuer.get() : "unknown source"
-                            );
-                        ruleFound = true;
-                    }
-                    for (; rules.first!=rules.second; ++rules.first) {
-                        count = attr->valueCount();
-                        for (index=0; index < count;) {
-                            // The return value tells us whether to index past the accepted value, or stay put and decrement the count.
-                            if (rules.first->second->evaluatePermitValue(context, *attr, index)) {
-                                index++;
-                            }
-                            else {
-                                m_log.warn(
-                                    "removed value at position (%lu) of attribute (%s) from (%s)",
-                                    index, attr->getId(), issuer.get() ? issuer.get() : "unknown source"
-                                    );
-                                attr->removeValue(index);
-                                count--;
-                            }
-                        }
-                    }
-                }
+    // For further efficiency, we declare arrays to store the applicable rules for an Attribute.
+    vector< pair<const MatchFunctor*,const MatchFunctor*> > applicableRules;
+    vector< pair<const MatchFunctor*,const MatchFunctor*> > wildcardRules;
 
-                if (!ruleFound || attr->valueCount() == 0) {
-                    if (!ruleFound) {
-                        // No rule found, so we're filtering it out.
-                        m_log.warn(
-                            "no rule found, removing all values of attribute (%s) from (%s)",
-                            attr->getId(), issuer.get() ? issuer.get() : "unknown source"
-                            );
-                    }
-                    delete attr;
-                    attributes.erase(attributes.begin() + a);
-                }
-                else {
-                    ++a;
-                }
+    // Store off the wildcards ahead of time.
+    for (vector<const Policy*>::const_iterator pol=applicablePolicies.begin(); pol!=applicablePolicies.end(); ++pol) {
+        pair<Policy::rules_t::const_iterator,Policy::rules_t::const_iterator> rules = (*pol)->m_rules.equal_range("*");
+        for (; rules.first!=rules.second; ++rules.first)
+            wildcardRules.push_back(rules.first->second);
+    }
+
+    // To track what to keep without removing anything from the original set until the end, we maintain
+    // a map of each Attribute object to a boolean array with true flags indicating what to delete.
+    // A single dimension array tracks attributes being removed entirely.
+    vector<bool> deletedAttributes(attributes.size(), false);
+    map< Attribute*, vector<bool> > deletedPositions;
+
+    // Loop over each attribute to filter them.
+    for (vector<Attribute*>::size_type a=0; a<attributes.size(); ++a) {
+        Attribute* attr = attributes[a];
+
+        // Clear the rule store.
+        applicableRules.clear();
+
+        // Look for rules to run in each policy.
+        for (vector<const Policy*>::const_iterator pol=applicablePolicies.begin(); pol!=applicablePolicies.end(); ++pol) {
+            pair<Policy::rules_t::const_iterator,Policy::rules_t::const_iterator> rules = (*pol)->m_rules.equal_range(attr->getId());
+            for (; rules.first!=rules.second; ++rules.first)
+                applicableRules.push_back(rules.first->second);
+        }
+
+        // If no rules found, apply wildcards.
+        const vector< pair<const MatchFunctor*,const MatchFunctor*> >& rulesToRun = applicableRules.empty() ? wildcardRules : applicableRules;
+
+        // If no rules apply, remove the attribute entirely.
+        if (rulesToRun.empty()) {
+            m_log.warn(
+                "no rule found, removing attribute (%s) from (%s)",
+                attr->getId(), issuer.get() ? issuer.get() : "unknown source"
+                );
+            deletedAttributes[a] = true;
+            continue;
+        }
+
+        // Run each permit/deny rule.
+        m_log.debug(
+            "applying filtering rule(s) for attribute (%s) from (%s)",
+            attr->getId(), issuer.get() ? issuer.get() : "unknown source"
+            );
+
+        bool kickit;
+
+        // Examine each value.
+        for (size_t count = attr->valueCount(), index = 0; index < count; ++index) {
+
+            // Assume we're kicking it out.
+            kickit=true;
+
+            for (vector< pair<const MatchFunctor*,const MatchFunctor*> >::const_iterator r=rulesToRun.begin(); r!=rulesToRun.end(); ++r) {
+                // If there's a permit rule that passes, don't kick it.
+                if (r->first && r->first->evaluatePermitValue(context, *attr, index))
+                    kickit = false;
+                if (!kickit && r->second && r->second->evaluatePermitValue(context, *attr, index))
+                    kickit = true;
+            }
+
+            // If we're kicking it, record that in the tracker.
+            if (kickit) {
+                m_log.warn(
+                    "removed value at position (%lu) of attribute (%s) from (%s)",
+                    index, attr->getId(), issuer.get() ? issuer.get() : "unknown source"
+                    );
+                deletedPositions[attr].resize(index+1);
+                deletedPositions[attr][index] = true;
             }
         }
     }
+
+    // Final step: go over the deletedPositions matrix and apply the actual changes. In order to delete
+    // any attributes that end up with no values, we have to do it by looping over the originals.
+    for (vector<Attribute*>::size_type a=0; a<attributes.size();) {
+        Attribute* attr = attributes[a];
+
+        if (deletedAttributes[a]) {
+            delete attr;
+            deletedAttributes.erase(deletedAttributes.begin() + a);
+            attributes.erase(attributes.begin() + a);
+            continue;
+        }
+        else if (deletedPositions.count(attr) > 0) {
+            // To do the removal, we loop over the bits backwards so that the
+            // underlying value sequence doesn't get distorted by any removals.
+            // Index has to be offset by one because size_type is unsigned.
+            const vector<bool>& row = deletedPositions[attr];
+            for (vector<bool>::size_type index = row.size(); index > 0; --index) {
+                if (row[index-1])
+                    attr->removeValue(index-1);
+            }
+
+            // Check for no values.
+            if (attr->valueCount() == 0) {
+                m_log.warn(
+                    "no values left, removing attribute (%s) from (%s)",
+                    attr->getId(), issuer.get() ? issuer.get() : "unknown source"
+                    );
+                delete attr;
+                attributes.erase(attributes.begin() + a);
+                continue;
+            }
+        }
+        ++a;
+    }
 }
 
 pair<bool,DOMElement*> XMLFilter::load()
 {
     // Load from source using base class.
     pair<bool,DOMElement*> raw = ReloadableXMLFile::load();
-    
+
     // If we own it, wrap it.
     XercesJanitor<DOMDocument> docjanitor(raw.first ? raw.second->getOwnerDocument() : NULL);
 
     XMLFilterImpl* impl = new XMLFilterImpl(raw.second, m_log);
-    
+
     // If we held the document, transfer it to the impl. If we didn't, it's a no-op.
     impl->setDocument(docjanitor.release());
 
index 6c23764..de77496 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * ChainingAttributeExtractor.cpp
- * 
+ *
  * Chains together multiple AttributeExtractor plugins.
  */
 
@@ -43,7 +43,7 @@ namespace shibsp {
         virtual ~ChainingAttributeExtractor() {
             for_each(m_extractors.begin(), m_extractors.end(), xmltooling::cleanup<AttributeExtractor>());
         }
-        
+
         Lockable* lock() {
             return this;
         }
@@ -63,7 +63,7 @@ namespace shibsp {
                 (*i)->getAttributeIds(attributes);
             }
         }
-        
+
     private:
         vector<AttributeExtractor*> m_extractors;
     };
@@ -97,7 +97,7 @@ ChainingAttributeExtractor::ChainingAttributeExtractor(const DOMElement* e)
                 m_extractors.push_back(conf.AttributeExtractorManager.newPlugin(type.get(),e));
             }
             catch (exception& ex) {
-                Category::getInstance(SHIBSP_LOGCAT".AttributeExtractor").error(
+                Category::getInstance(SHIBSP_LOGCAT".AttributeExtractor.Chaining").error(
                     "caught exception processing embedded AttributeExtractor element: %s", ex.what()
                     );
             }
index c1b3805..90e3776 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * ChainingAttributeResolver.cpp
- * 
+ *
  * Chains together multiple AttributeResolver plugins.
  */
 
@@ -93,7 +93,7 @@ namespace shibsp {
         virtual ~ChainingAttributeResolver() {
             for_each(m_resolvers.begin(), m_resolvers.end(), xmltooling::cleanup<AttributeResolver>());
         }
-        
+
         Lockable* lock() {
             return this;
         }
@@ -125,7 +125,7 @@ namespace shibsp {
                 (*i)->getAttributeIds(attributes);
             }
         }
-        
+
     private:
         vector<AttributeResolver*> m_resolvers;
     };
@@ -159,7 +159,7 @@ ChainingAttributeResolver::ChainingAttributeResolver(const DOMElement* e)
                 m_resolvers.push_back(conf.AttributeResolverManager.newPlugin(type.get(),e));
             }
             catch (exception& ex) {
-                Category::getInstance(SHIBSP_LOGCAT".AttributeResolver").error(
+                Category::getInstance(SHIBSP_LOGCAT".AttributeResolver.Chaining").error(
                     "caught exception processing embedded AttributeResolver element: %s", ex.what()
                     );
             }
index 04ad7bd..e6e231e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * QueryAttributeResolver.cpp
- * 
+ *
  * AttributeResolver based on SAML queries.
  */
 
@@ -31,6 +31,7 @@
 #include "attribute/resolver/AttributeResolver.h"
 #include "attribute/resolver/ResolutionContext.h"
 #include "binding/SOAPClient.h"
+#include "metadata/MetadataProviderCriteria.h"
 #include "util/SPConstants.h"
 
 #include <saml/exceptions.h>
@@ -69,7 +70,7 @@ namespace shibsp {
             m_class = XMLString::transcode(session.getAuthnContextClassRef());
             m_decl = XMLString::transcode(session.getAuthnContextDeclRef());
         }
-        
+
         QueryContext(
             const Application& application,
             const EntityDescriptor* issuer,
@@ -97,7 +98,7 @@ namespace shibsp {
                 }
             }
         }
-        
+
         ~QueryContext() {
             if (m_session) {
                 XMLString::release((XMLCh**)&m_protocol);
@@ -109,7 +110,7 @@ namespace shibsp {
             for_each(m_attributes.begin(), m_attributes.end(), xmltooling::cleanup<shibsp::Attribute>());
             for_each(m_assertions.begin(), m_assertions.end(), xmltooling::cleanup<opensaml::Assertion>());
         }
-    
+
         bool doQuery() const {
             return m_query;
         }
@@ -124,7 +125,7 @@ namespace shibsp {
                 m_metadata = m_app.getMetadataProvider(false);
                 if (m_metadata) {
                     m_metadata->lock();
-                    return m_entity = m_metadata->getEntityDescriptor(MetadataProvider::Criteria(m_session->getEntityID())).first;
+                    return m_entity = m_metadata->getEntityDescriptor(MetadataProviderCriteria(m_app, m_session->getEntityID())).first;
                 }
             }
             return NULL;
@@ -164,7 +165,7 @@ namespace shibsp {
         vector<shibsp::Attribute*> m_attributes;
         vector<opensaml::Assertion*> m_assertions;
     };
-    
+
     class SHIBSP_DLLLOCAL QueryResolver : public AttributeResolver
     {
     public:
@@ -176,7 +177,7 @@ namespace shibsp {
 
         Lockable* lock() {return this;}
         void unlock() {}
-        
+
         ResolutionContext* createResolutionContext(
             const Application& application,
             const EntityDescriptor* issuer,
@@ -213,15 +214,15 @@ namespace shibsp {
     {
         return new QueryResolver(e);
     }
-    
+
 };
 
-QueryResolver::QueryResolver(const DOMElement* e) : m_log(Category::getInstance(SHIBSP_LOGCAT".AttributeResolver"))
+QueryResolver::QueryResolver(const DOMElement* e) : m_log(Category::getInstance(SHIBSP_LOGCAT".AttributeResolver.Query"))
 {
 #ifdef _DEBUG
     xmltooling::NDC ndc("QueryResolver");
 #endif
-    
+
     DOMElement* child = XMLHelper::getFirstChildElement(e);
     while (child) {
         try {
index f5f1cf2..eeead9f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * XMLAttributeExtractor.cpp
- * 
+ *
  * AttributeExtractor based on an XML mapping file.
  */
 
@@ -97,17 +97,17 @@ namespace shibsp {
         attrmap_t m_attrMap;
         vector<string> m_attributeIds;
     };
-    
+
     class XMLExtractor : public AttributeExtractor, public ReloadableXMLFile
     {
     public:
-        XMLExtractor(const DOMElement* e) : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT".AttributeExtractor")), m_impl(NULL) {
+        XMLExtractor(const DOMElement* e) : ReloadableXMLFile(e, Category::getInstance(SHIBSP_LOGCAT".AttributeExtractor.XML")), m_impl(NULL) {
             load();
         }
         ~XMLExtractor() {
             delete m_impl;
         }
-        
+
         void extractAttributes(
             const Application& application, const RoleDescriptor* issuer, const XMLObject& xmlObject, vector<Attribute*>& attributes
             ) const;
@@ -132,7 +132,7 @@ namespace shibsp {
     {
         return new XMLExtractor(e);
     }
-    
+
     static const XMLCh _AttributeDecoder[] =    UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,D,e,c,o,d,e,r);
     static const XMLCh Attributes[] =           UNICODE_LITERAL_10(A,t,t,r,i,b,u,t,e,s);
     static const XMLCh _id[] =                  UNICODE_LITERAL_2(i,d);
@@ -146,7 +146,7 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log) : m_log(l
 #ifdef _DEBUG
     xmltooling::NDC ndc("XMLExtractorImpl");
 #endif
-    
+
     if (!XMLHelper::isNodeNamed(e, shibspconstants::SHIB2ATTRIBUTEMAP_NS, Attributes))
         throw ConfigurationException("XML AttributeExtractor requires am:Attributes at root of configuration.");
 
@@ -220,7 +220,7 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log) : m_log(l
 #endif
             m_log.info("creating mapping for Attribute %s%s%s", n.get(), *f.get() ? ", Format/Namespace:" : "", f.get());
         }
-        
+
         decl.first = decoder;
         decl.second.push_back(id.get());
         m_attributeIds.push_back(id.get());
@@ -248,7 +248,7 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log) : m_log(l
                 start = pos ? pos+1 : NULL;
             }
         }
-        
+
         child = XMLHelper::getNextSiblingElement(child, shibspconstants::SHIB2ATTRIBUTEMAP_NS, saml1::Attribute::LOCAL_NAME);
     }
 }
@@ -528,12 +528,12 @@ pair<bool,DOMElement*> XMLExtractor::load()
 {
     // Load from source using base class.
     pair<bool,DOMElement*> raw = ReloadableXMLFile::load();
-    
+
     // If we own it, wrap it.
     XercesJanitor<DOMDocument> docjanitor(raw.first ? raw.second->getOwnerDocument() : NULL);
 
     XMLExtractorImpl* impl = new XMLExtractorImpl(raw.second, m_log);
-    
+
     // If we held the document, transfer it to the impl. If we didn't, it's a no-op.
     impl->setDocument(docjanitor.release());
 
index 656a2c8..ad3d3cb 100644 (file)
@@ -67,6 +67,7 @@ void SOAPClient::send(const soap11::Envelope& env, const char* from, MetadataCre
             // Reset criteria back.
             to.setKeyAlgorithm(NULL);
             to.setKeySize(0);
+            to.getKeyNames().clear();
 
             if (cred) {
                 // Check for message.
@@ -133,6 +134,7 @@ void SOAPClient::prepareTransport(SOAPTransport& transport)
             if (authType.first)
                 m_criteria->getKeyNames().insert(authType.second);
             const Credential* cred = m_credResolver->resolve(m_criteria);
+            m_criteria->getKeyNames().clear();
             if (cred) {
                 if (!transport.setCredential(cred))
                     log.error("failed to load Credential into SOAPTransport");
index 3f2e0da..cd9039c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,8 +16,8 @@
 
 /**
  * AbstractHandler.cpp
- * 
- * Base class for handlers based on a DOMPropertySet. 
+ *
+ * Base class for handlers based on a DOMPropertySet.
  */
 
 #include "internal.h"
@@ -31,8 +31,6 @@
 #include "util/SPConstants.h"
 
 #ifndef SHIBSP_LITE
-# include <saml/SAMLConfig.h>
-# include <saml/binding/SAMLArtifact.h>
 # include <saml/saml1/core/Protocols.h>
 # include <saml/saml2/core/Protocols.h>
 # include <saml/saml2/metadata/Metadata.h>
@@ -67,12 +65,28 @@ namespace shibsp {
     SHIBSP_DLLLOCAL PluginManager< Handler,string,pair<const DOMElement*,const char*> >::Factory MetadataGeneratorFactory;
     SHIBSP_DLLLOCAL PluginManager< Handler,string,pair<const DOMElement*,const char*> >::Factory StatusHandlerFactory;
     SHIBSP_DLLLOCAL PluginManager< Handler,string,pair<const DOMElement*,const char*> >::Factory SessionHandlerFactory;
+
+    void SHIBSP_DLLLOCAL generateRandomHex(std::string& buf, unsigned int len) {
+        static char DIGITS[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+        int r;
+        unsigned char b1,b2;
+        buf.erase();
+        for (unsigned int i=0; i<len; i+=4) {
+            r = rand();
+            b1 = (0x00FF & r);
+            b2 = (0xFF00 & r)  >> 8;
+            buf += (DIGITS[(0xF0 & b1) >> 4 ]);
+            buf += (DIGITS[0x0F & b1]);
+            buf += (DIGITS[(0xF0 & b2) >> 4 ]);
+            buf += (DIGITS[0x0F & b2]);
+        }
+    }
 };
 
 void SHIBSP_API shibsp::registerHandlers()
 {
     SPConfig& conf=SPConfig::getConfig();
-    
+
     conf.AssertionConsumerServiceManager.registerFactory(SAML1_PROFILE_BROWSER_ARTIFACT, SAML1ConsumerFactory);
     conf.AssertionConsumerServiceManager.registerFactory(SAML1_PROFILE_BROWSER_POST, SAML1ConsumerFactory);
     conf.AssertionConsumerServiceManager.registerFactory(SAML20_BINDING_HTTP_POST, SAML2ConsumerFactory);
@@ -256,16 +270,20 @@ void AbstractHandler::preserveRelayState(const Application& application, HTTPRes
     if (!strcmp(mech.second, "cookie")) {
         // Here we store the state in a cookie and send a fixed
         // value so we can recognize it on the way back.
-        if (relayState != "cookie") {
+        if (relayState.find("cookie:") != 0) {
             const URLEncoder* urlenc = XMLToolingConfig::getConfig().getURLEncoder();
             pair<string,const char*> shib_cookie=application.getCookieNameProps("_shibstate_");
             string stateval = urlenc->encode(relayState.c_str()) + shib_cookie.second;
+            // Generate a random key for the cookie name instead of the fixed name.
+            string rsKey;
+            generateRandomHex(rsKey,5);
+            shib_cookie.first = "_shibstate_" + rsKey;
             response.setCookie(shib_cookie.first.c_str(),stateval.c_str());
-            relayState = "cookie";
+            relayState = "cookie:" + rsKey;
         }
     }
     else if (strstr(mech.second,"ss:")==mech.second) {
-        if (relayState.find("ss:")!=0) {
+        if (relayState.find("ss:") != 0) {
             mech.second+=3;
             if (*mech.second) {
                 if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
@@ -273,8 +291,7 @@ void AbstractHandler::preserveRelayState(const Application& application, HTTPRes
                     StorageService* storage = application.getServiceProvider().getStorageService(mech.second);
                     if (storage) {
                         string rsKey;
-                        SAMLConfig::getConfig().generateRandomBytes(rsKey,10);
-                        rsKey = SAMLArtifact::toHex(rsKey);
+                        generateRandomHex(rsKey,5);
                         if (!storage->createString("RelayState", rsKey.c_str(), relayState.c_str(), time(NULL) + 600))
                             throw IOException("Attempted to insert duplicate storage key.");
                         relayState = string(mech.second-3) + ':' + rsKey;
@@ -357,21 +374,29 @@ void AbstractHandler::recoverRelayState(
             }
         }
     }
-    
-    if (relayState == "cookie") {
-        // Pull the value from the "relay state" cookie.
-        pair<string,const char*> relay_cookie = application.getCookieNameProps("_shibstate_");
-        const char* state = request.getCookie(relay_cookie.first.c_str());
-        if (state && *state) {
-            // URL-decode the value.
-            char* rscopy=strdup(state);
-            XMLToolingConfig::getConfig().getURLEncoder()->decode(rscopy);
-            relayState = rscopy;
-            free(rscopy);
-            
-            if (clear)
-                response.setCookie(relay_cookie.first.c_str(),relay_cookie.second);
-            return;
+
+    // Look for cookie-backed state of the form "cookie:key".
+    if (strstr(state,"cookie:")==state) {
+        state += 7;
+        if (*state) {
+            // Pull the value from the "relay state" cookie.
+            pair<string,const char*> relay_cookie = application.getCookieNameProps("_shibstate_");
+            relay_cookie.first = string("_shibstate_") + state;
+            state = request.getCookie(relay_cookie.first.c_str());
+            if (state && *state) {
+                // URL-decode the value.
+                char* rscopy=strdup(state);
+                XMLToolingConfig::getConfig().getURLEncoder()->decode(rscopy);
+                relayState = rscopy;
+                free(rscopy);
+
+                if (clear) {
+                    string exp(relay_cookie.second);
+                    exp += "; expires=Mon, 01 Jan 2001 00:00:00 GMT";
+                    response.setCookie(relay_cookie.first.c_str(), exp.c_str());
+                }
+                return;
+            }
         }
 
         relayState.erase();
index f4863cd..8f3b008 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,8 +16,8 @@
 
 /**
  * AssertionConsumerService.cpp
- * 
- * Base class for handlers that create sessions by consuming SSO protocol responses. 
+ *
+ * Base class for handlers that create sessions by consuming SSO protocol responses.
  */
 
 #include "internal.h"
@@ -35,6 +35,7 @@
 # include "attribute/resolver/AttributeExtractor.h"
 # include "attribute/resolver/AttributeResolver.h"
 # include "attribute/resolver/ResolutionContext.h"
+# include "metadata/MetadataProviderCriteria.h"
 # include "security/SecurityPolicy.h"
 # include <saml/SAMLConfig.h>
 # include <saml/saml1/core/Assertions.h>
@@ -87,7 +88,7 @@ pair<bool,long> AssertionConsumerService::run(SPRequest& request, bool isHandler
 {
     string relayState;
     SPConfig& conf = SPConfig::getConfig();
-    
+
     if (conf.isEnabled(SPConfig::OutOfProcess)) {
         // When out of process, we run natively and directly process the message.
         return processMessage(request.getApplication(), request, request);
@@ -112,7 +113,7 @@ void AssertionConsumerService::receive(DDF& in, ostream& out)
         m_log.error("couldn't find application (%s) for new session", aid ? aid : "(missing)");
         throw ConfigurationException("Unable to locate application for new session, deleted?");
     }
-    
+
     // Unpack the request.
     auto_ptr<HTTPRequest> req(getRequest(in));
 
@@ -137,7 +138,7 @@ pair<bool,long> AssertionConsumerService::processMessage(
     pair<bool,const char*> policyId = getString("policyId", m_configNS.get());  // namespace-qualified if inside handler element
     if (!policyId.first)
         policyId = application.getString("policyId");   // unqualified in Application(s) element
-        
+
     // Access policy properties.
     const PropertySet* settings = application.getServiceProvider().getPolicySettings(policyId.second);
     pair<bool,bool> validate = settings->getBool("validate");
@@ -147,7 +148,7 @@ pair<bool,long> AssertionConsumerService::processMessage(
 
     // Create the policy.
     shibsp::SecurityPolicy policy(application, &m_role, validate.first && validate.second);
-    
+
     string relayState;
 
     try {
@@ -159,7 +160,7 @@ pair<bool,long> AssertionConsumerService::processMessage(
         implementProtocol(application, httpRequest, httpResponse, policy, settings, *msg.get());
 
         auto_ptr_char issuer(policy.getIssuer() ? policy.getIssuer()->getName() : NULL);
-        
+
         // History cookie.
         if (issuer.get() && *issuer.get())
             maintainHistory(application, httpRequest, httpResponse, issuer.get());
@@ -181,7 +182,7 @@ void AssertionConsumerService::checkAddress(const Application& application, cons
 {
     if (!issuedTo || !*issuedTo)
         return;
-    
+
     const PropertySet* props=application.getPropertySet("Sessions");
     pair<bool,bool> checkAddress = props ? props->getBool("checkAddress") : make_pair(false,true);
     if (!checkAddress.first)
@@ -327,7 +328,7 @@ ResolutionContext* AssertionConsumerService::resolveAttributes(
             }
         }
     }
-    
+
     try {
         AttributeResolver* resolver = application.getAttributeResolver();
         if (resolver) {
@@ -367,7 +368,7 @@ ResolutionContext* AssertionConsumerService::resolveAttributes(
     catch (exception& ex) {
         m_log.error("attribute resolution failed: %s", ex.what());
     }
-    
+
     if (!resolvedAttributes.empty()) {
         // Attach global prefix if needed.
         pair<bool,const char*> prefix = application.getString("attributePrefix");
@@ -410,8 +411,16 @@ void AssertionConsumerService::extractMessageDetails(const Assertion& assertion,
             return;
         }
         m_log.debug("searching metadata for assertion issuer...");
-        MetadataProvider::Criteria mc(policy.getIssuer()->getName(), &IDPSSODescriptor::ELEMENT_QNAME, protocol);
-        pair<const EntityDescriptor*,const RoleDescriptor*> entity = policy.getMetadataProvider()->getEntityDescriptor(mc);
+        pair<const EntityDescriptor*,const RoleDescriptor*> entity;
+        shibsp::SecurityPolicy* sppol = dynamic_cast<shibsp::SecurityPolicy*>(&policy);
+        if (sppol) {
+            MetadataProviderCriteria mc(sppol->getApplication(), policy.getIssuer()->getName(), &IDPSSODescriptor::ELEMENT_QNAME, protocol);
+            entity = policy.getMetadataProvider()->getEntityDescriptor(mc);
+        }
+        else {
+            MetadataProvider::Criteria mc(policy.getIssuer()->getName(), &IDPSSODescriptor::ELEMENT_QNAME, protocol);
+            entity = policy.getMetadataProvider()->getEntityDescriptor(mc);
+        }
         if (!entity.first) {
             auto_ptr_char iname(policy.getIssuer()->getName());
             m_log.warn("no metadata found, can't establish identity of issuer (%s)", iname.get());
@@ -436,7 +445,7 @@ void AssertionConsumerService::maintainHistory(
     const PropertySet* sessionProps=application.getPropertySet("Sessions");
     pair<bool,bool> idpHistory=sessionProps->getBool("idpHistory");
 
-    if (!idpHistory.first || idpHistory.second) {
+    if (idpHistory.first && idpHistory.second) {
         pair<bool,const char*> cookieProps=sessionProps->getString("cookieProps");
         if (!cookieProps.first)
             cookieProps.second=defProps;
index 3ef1cd2..161dcc3 100644 (file)
@@ -136,13 +136,13 @@ pair<bool,long> LogoutHandler::notifyFrontChannel(
     loc = loc + (strchr(loc.c_str(),'?') ? '&' : '?') + "action=logout";
 
     // Now we create a second URL representing the return location back to us.
+    ostringstream locstr;
     const char* start = request.getRequestURL();
     const char* end = strchr(start,'?');
     string tempstr(start, end ? end-start : strlen(start));
-    ostringstream locstr(tempstr);
 
     // Add a signal that we're coming back from notification and the next index.
-    locstr << "?notifying=1&index=" << index;
+    locstr << tempstr << "?notifying=1&index=" << index;
 
     // Add return if set.
     if (param)
index 685c398..08e73e0 100644 (file)
 #include "handler/AbstractHandler.h"
 #include "handler/RemotedHandler.h"
 
+#ifndef SHIBSP_LITE
+# include "metadata/MetadataProviderCriteria.h"
+#endif
+
 #include <xercesc/framework/LocalFileInputSource.hpp>
 #include <xercesc/framework/Wrapper4InputSource.hpp>
 
@@ -211,11 +215,11 @@ pair<bool,long> MetadataGenerator::processMessage(
     if (entityID) {
         MetadataProvider* m=application.getMetadataProvider();
         Locker locker(m);
-        MetadataProvider::Criteria mc(entityID);
+        MetadataProviderCriteria mc(application, entityID);
         relyingParty = application.getRelyingParty(m->getEntityDescriptor(mc).first);
     }
     else {
-        relyingParty = application.getRelyingParty(NULL);
+        relyingParty = &application;
     }
 
     EntityDescriptor* entity;
index be80cb1..d917407 100644 (file)
@@ -31,6 +31,7 @@
 #ifndef SHIBSP_LITE
 # include "SessionCacheEx.h"
 # include "security/SecurityPolicy.h"
+# include "metadata/MetadataProviderCriteria.h"
 # include "util/TemplateParameters.h"
 # include <fstream>
 # include <saml/SAMLConfig.h>
@@ -284,7 +285,7 @@ pair<bool,long> SAML2Logout::doRequest(const Application& application, const HTT
         // We need metadata to issue a response.
         MetadataProvider* m = application.getMetadataProvider();
         Locker metadataLocker(m);
-        MetadataProvider::Criteria mc(request.getParameter("entityID"), &IDPSSODescriptor::ELEMENT_QNAME, samlconstants::SAML20P_NS);
+        MetadataProviderCriteria mc(application, request.getParameter("entityID"), &IDPSSODescriptor::ELEMENT_QNAME, samlconstants::SAML20P_NS);
         pair<const EntityDescriptor*,const RoleDescriptor*> entity = m->getEntityDescriptor(mc);
         if (!entity.first) {
             throw MetadataException(
index 400989c..e5a6bbb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,7 +16,7 @@
 
 /**
  * SAML2LogoutInitiator.cpp
- * 
+ *
  * Triggers SP-initiated logout for SAML 2.0 sessions.
  */
 
@@ -30,6 +30,7 @@
 
 #ifndef SHIBSP_LITE
 # include "binding/SOAPClient.h"
+# include "metadata/MetadataProviderCriteria.h"
 # include <saml/SAMLConfig.h>
 # include <saml/saml2/core/Protocols.h>
 # include <saml/saml2/binding/SAML2SOAPClient.h>
@@ -53,7 +54,7 @@ namespace shibsp {
     #pragma warning( push )
     #pragma warning( disable : 4250 )
 #endif
-    
+
     class SHIBSP_DLLLOCAL SAML2LogoutInitiator : public AbstractHandler, public LogoutHandler
     {
     public:
@@ -66,7 +67,7 @@ namespace shibsp {
             }
 #endif
         }
-        
+
         void setParent(const PropertySet* parent);
         void receive(DDF& in, ostream& out);
         pair<bool,long> run(SPRequest& request, bool isHandler=true) const;
@@ -229,7 +230,7 @@ void SAML2LogoutInitiator::receive(DDF& in, ostream& out)
         m_log.error("couldn't find application (%s) for logout", aid ? aid : "(missing)");
         throw ConfigurationException("Unable to locate application for logout, deleted?");
     }
-    
+
     // Unpack the request.
     auto_ptr<HTTPRequest> req(getRequest(in));
 
@@ -237,7 +238,7 @@ void SAML2LogoutInitiator::receive(DDF& in, ostream& out)
     DDF ret(NULL);
     DDFJanitor jout(ret);
     auto_ptr<HTTPResponse> resp(getResponse(ret));
-    
+
     Session* session = NULL;
     try {
          session = app->getServiceProvider().getSessionCache()->find(*app, *req.get(), NULL, NULL);
@@ -284,7 +285,7 @@ pair<bool,long> SAML2LogoutInitiator::doRequest(
         // With a session in hand, we can create a LogoutRequest message, if we can find a compatible endpoint.
         MetadataProvider* m = application.getMetadataProvider();
         Locker metadataLocker(m);
-        MetadataProvider::Criteria mc(session->getEntityID(), &IDPSSODescriptor::ELEMENT_QNAME, samlconstants::SAML20P_NS);
+        MetadataProviderCriteria mc(application, session->getEntityID(), &IDPSSODescriptor::ELEMENT_QNAME, samlconstants::SAML20P_NS);
         pair<const EntityDescriptor*,const RoleDescriptor*> entity = m->getEntityDescriptor(mc);
         if (!entity.first) {
             throw MetadataException(
@@ -339,8 +340,14 @@ pair<bool,long> SAML2LogoutInitiator::doRequest(
                 }
             }
 
-            if (!logoutResponse)
-                ret = sendLogoutPage(application, httpRequest, httpResponse, false, "Identity provider did not respond to logout request.");
+            if (!logoutResponse) {
+                ret = sendLogoutPage(
+                    application, httpRequest, httpResponse, false,
+                    endpoints.empty() ?
+                        "Identity provider does not support SAML 2 Single Logout protocol." :
+                            "Identity provider did not respond to logout request."
+                    );
+            }
             else if (!logoutResponse->getStatus() || !logoutResponse->getStatus()->getStatusCode() ||
                    !XMLString::equals(logoutResponse->getStatus()->getStatusCode()->getValue(), saml2p::StatusCode::SUCCESS)) {
                 delete logoutResponse;
@@ -432,6 +439,9 @@ LogoutRequest* SAML2LogoutInitiator::buildRequest(
             );
         msg->setEncryptedID(encrypted.release());
     }
+    else {
+        msg->setNameID(nameid->cloneNameID());
+    }
 
     if (!encoder) {
         // No encoder being used, so sign for SOAP client manually.
@@ -461,7 +471,7 @@ LogoutRequest* SAML2LogoutInitiator::buildRequest(
                         if (cr)
                             cr->setDigestAlgorithm(sigalg.second);
                     }
-            
+
                     // Sign response while marshalling.
                     vector<xmlsignature::Signature*> sigs(1,sig);
                     msg->marshall((DOMDocument*)NULL,&sigs,cred);
index 9906907..7121176 100644 (file)
@@ -31,6 +31,7 @@
 #include "util/SPConstants.h"
 
 #ifndef SHIBSP_LITE
+# include "metadata/MetadataProviderCriteria.h"
 # include <saml/SAMLConfig.h>
 # include <saml/saml2/core/Protocols.h>
 # include <saml/saml2/metadata/EndpointManager.h>
@@ -244,11 +245,9 @@ pair<bool,long> SAML2SessionInitiator::run(SPRequest& request, string& entityID,
         option = request.getParameter("target");
         if (option)
             target = option;
-        if (acsByIndex.first && !acsByIndex.second) {
-            // Since we're passing the ACS by value, we need to compute the return URL,
-            // so we'll need the target resource for real.
-            recoverRelayState(request.getApplication(), request, request, target, false);
-        }
+            
+        // Always need to recover target URL to compute handler below.
+        recoverRelayState(request.getApplication(), request, request, target, false);
 
         pair<bool,bool> flag;
         option = request.getParameter("isPassive");
@@ -532,7 +531,7 @@ pair<bool,long> SAML2SessionInitiator::doRequest(
     }
     else {
         // Use metadata to locate the IdP's SSO service.
-        MetadataProvider::Criteria mc(entityID, &IDPSSODescriptor::ELEMENT_QNAME, samlconstants::SAML20P_NS);
+        MetadataProviderCriteria mc(app, entityID, &IDPSSODescriptor::ELEMENT_QNAME, samlconstants::SAML20P_NS);
         entity=m->getEntityDescriptor(mc);
         if (!entity.first) {
             m_log.warn("unable to locate metadata for provider (%s)", entityID);
@@ -610,8 +609,11 @@ pair<bool,long> SAML2SessionInitiator::doRequest(
             cref->setReference(wideclass.get());
             reqContext->getAuthnContextClassRefs().push_back(cref);
         }
-        if (authnContextComparison &&
-                (!reqContext->getAuthnContextClassRefs().empty() || !reqContext->getAuthnContextDeclRefs().empty())) {
+        
+        if (reqContext->getAuthnContextClassRefs().empty() && reqContext->getAuthnContextDeclRefs().empty()) {
+               req->setRequestedAuthnContext(NULL);
+        }
+        else if (authnContextComparison) {
             auto_ptr_XMLCh widecomp(authnContextComparison);
             reqContext->setComparison(widecomp.get());
         }
index ff5939b..789793c 100644 (file)
@@ -157,7 +157,7 @@ pair<bool,long> SessionHandler::run(SPRequest& request, bool isHandler) const
                     count = 0;
                 }
             }
-            s << "<strong>" << a->second->getId() << "</strong>: ";
+            s << "<strong>" << a->first << "</strong>: ";
         }
 
         if (m_values) {
index 38fb2d3..aeda3c7 100644 (file)
@@ -31,6 +31,7 @@
 #include "util/SPConstants.h"
 
 #ifndef SHIBSP_LITE
+# include "metadata/MetadataProviderCriteria.h"
 # include <saml/saml2/metadata/Metadata.h>
 # include <saml/saml2/metadata/EndpointManager.h>
 #endif
@@ -224,7 +225,7 @@ pair<bool,long> Shib1SessionInitiator::doRequest(
     // Use metadata to invoke the SSO service directly.
     MetadataProvider* m=app.getMetadataProvider();
     Locker locker(m);
-    MetadataProvider::Criteria mc(entityID, &IDPSSODescriptor::ELEMENT_QNAME, shibspconstants::SHIB1_PROTOCOL_ENUM);
+    MetadataProviderCriteria mc(app, entityID, &IDPSSODescriptor::ELEMENT_QNAME, shibspconstants::SHIB1_PROTOCOL_ENUM);
     pair<const EntityDescriptor*,const RoleDescriptor*> entity = m->getEntityDescriptor(mc);
     if (!entity.first) {
         m_log.warn("unable to locate metadata for provider (%s)", entityID);
index 5f72c43..41e9f1f 100644 (file)
@@ -31,6 +31,7 @@
 using namespace shibsp;
 #ifndef SHIBSP_LITE
 # include "SessionCache.h"
+# include "metadata/MetadataProviderCriteria.h"
 # include <saml/version.h>
 using namespace opensaml::saml2md;
 using namespace opensaml;
@@ -426,10 +427,10 @@ pair<bool,long> StatusHandler::processMessage(
         if (param) {
             MetadataProvider* m = application.getMetadataProvider();
             Locker mlock(m);
-            relyingParty = application.getRelyingParty(m->getEntityDescriptor(MetadataProvider::Criteria(param)).first);
+            relyingParty = application.getRelyingParty(m->getEntityDescriptor(MetadataProviderCriteria(application, param)).first);
         }
         else {
-            relyingParty = application.getRelyingParty(NULL);
+            relyingParty = &application;
         }
 
         s << "<Application id='" << application.getId() << "' entityID='" << relyingParty->getString("entityID").second << "'/>";
index c265f7a..36759f3 100644 (file)
@@ -31,6 +31,7 @@
 #include "util/SPConstants.h"
 
 #ifndef SHIBSP_LITE
+# include "metadata/MetadataProviderCriteria.h"
 # include <saml/saml2/metadata/Metadata.h>
 #endif
 #include <xmltooling/XMLToolingConfig.h>
@@ -205,7 +206,7 @@ void TransformSessionInitiator::doRequest(const Application& application, string
     MetadataProvider* m=application.getMetadataProvider();
     Locker locker(m);
 
-    MetadataProvider::Criteria mc(entityID.c_str(), &IDPSSODescriptor::ELEMENT_QNAME);
+    MetadataProviderCriteria mc(application, entityID.c_str(), &IDPSSODescriptor::ELEMENT_QNAME);
     pair<const EntityDescriptor*,const RoleDescriptor*> entity;
     if (!m_alwaysRun) {
         // First check the original value, it might be valid already.
index b687d33..cb51042 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 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
@@ -16,9 +16,9 @@
 
 /**
  * StorageServiceSessionCache.cpp
- * 
+ *
  * StorageService-based SessionCache implementation.
- * 
+ *
  * Instead of optimizing this plugin with a buffering scheme that keeps objects around
  * and avoids extra parsing steps, I'm assuming that systems that require such can
  * layer their own cache plugin on top of this version either by delegating to it
@@ -119,12 +119,44 @@ namespace shibsp {
             return NULL;
         }
 
+        Session* find(const Application& application, HTTPRequest& request, const char* client_addr=NULL, time_t* timeout=NULL) {
+            string id = active(application, request);
+            if (id.empty())
+                return NULL;
+            try {
+                Session* session = find(application, id.c_str(), client_addr, timeout);
+                if (session)
+                    return session;
+                HTTPResponse* response = dynamic_cast<HTTPResponse*>(&request);
+                if (response) {
+                    pair<string,const char*> shib_cookie = application.getCookieNameProps("_shibsession_");
+                    string exp(shib_cookie.second);
+                    exp += "; expires=Mon, 01 Jan 2001 00:00:00 GMT";
+                    response->setCookie(shib_cookie.first.c_str(), exp.c_str());
+                }
+            }
+            catch (exception&) {
+                HTTPResponse* response = dynamic_cast<HTTPResponse*>(&request);
+                if (response) {
+                    pair<string,const char*> shib_cookie = application.getCookieNameProps("_shibsession_");
+                    string exp(shib_cookie.second);
+                    exp += "; expires=Mon, 01 Jan 2001 00:00:00 GMT";
+                    response->setCookie(shib_cookie.first.c_str(), exp.c_str());
+                }
+                throw;
+            }
+            return NULL;
+        }
+
         void remove(const Application& application, const HTTPRequest& request, HTTPResponse* response=NULL) {
             pair<string,const char*> shib_cookie = application.getCookieNameProps("_shibsession_");
             const char* session_id = request.getCookie(shib_cookie.first.c_str());
             if (session_id && *session_id) {
-                if (response)
-                    response->setCookie(shib_cookie.first.c_str(), shib_cookie.second);
+                if (response) {
+                    string exp(shib_cookie.second);
+                    exp += "; expires=Mon, 01 Jan 2001 00:00:00 GMT";
+                    response->setCookie(shib_cookie.first.c_str(), exp.c_str());
+                }
                 remove(application, session_id);
             }
         }
@@ -136,6 +168,7 @@ namespace shibsp {
         unsigned long m_cacheTimeout;
 #ifndef SHIBSP_LITE
         StorageService* m_storage;
+        StorageService* m_storage_lite;
 #endif
 
     private:
@@ -151,7 +184,7 @@ namespace shibsp {
         // inproc means we buffer sessions in memory
         RWLock* m_lock;
         map<string,StoredSession*> m_hashtable;
-    
+
         // management of buffered sessions
         void dormant(const char* key);
         static void* cleanup_fn(void*);
@@ -180,18 +213,18 @@ namespace shibsp {
             if (nameid) {
                 // Parse and bind the document into an XMLObject.
                 istringstream instr(nameid);
-                DOMDocument* doc = XMLToolingConfig::getConfig().getParser().parse(instr); 
+                DOMDocument* doc = XMLToolingConfig::getConfig().getParser().parse(instr);
                 XercesJanitor<DOMDocument> janitor(doc);
                 auto_ptr<saml2::NameID> n(saml2::NameIDBuilder::buildNameID());
                 n->unmarshall(doc->getDocumentElement(), true);
                 janitor.release();
                 m_nameid = n.release();
             }
-#endif            
+#endif
             if (cache->inproc)
                 m_lock = Mutex::create();
         }
-        
+
         ~StoredSession() {
             delete m_lock;
             m_obj.destroy();
@@ -201,7 +234,7 @@ namespace shibsp {
             for_each(m_tokens.begin(), m_tokens.end(), cleanup_pair<string,Assertion>());
 #endif
         }
-        
+
         Lockable* lock() {
             if (m_lock)
                 m_lock->lock();
@@ -274,7 +307,7 @@ namespace shibsp {
             }
             return m_ids;
         }
-        
+
         void validate(const Application& application, const char* client_addr, time_t* timeout);
 
 #ifndef SHIBSP_LITE
@@ -302,13 +335,18 @@ namespace shibsp {
         time_t m_expires,m_lastAccess;
         Mutex* m_lock;
     };
-    
+
     SessionCache* SHIBSP_DLLLOCAL StorageServiceCacheFactory(const DOMElement* const & e)
     {
         return new SSCache(e);
     }
 }
 
+Session* SessionCache::find(const Application& application, HTTPRequest& request, const char* client_addr, time_t* timeout)
+{
+    return find(application, const_cast<const HTTPRequest&>(request), client_addr, timeout);
+}
+
 void SHIBSP_API shibsp::registerSessionCaches()
 {
     SPConfig::getConfig().SessionCacheManager.registerFactory(STORAGESERVICE_SESSION_CACHE, StorageServiceCacheFactory);
@@ -362,7 +400,7 @@ void StoredSession::validate(const Application& application, const char* client_
 
     if (!timeout)
         return;
-    
+
     if (!SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
         DDF in("touch::"STORAGESERVICE_SESSION_CACHE"::SessionCache"), out;
         DDFJanitor jin(in);
@@ -370,7 +408,7 @@ void StoredSession::validate(const Application& application, const char* client_
         in.addmember("key").string(getID());
         in.addmember("version").integer(m_obj["version"].integer());
         if (*timeout) {
-            // On 64-bit Windows, time_t doesn't fit in a long, so I'm using ISO timestamps.  
+            // On 64-bit Windows, time_t doesn't fit in a long, so I'm using ISO timestamps.
 #ifndef HAVE_GMTIME_R
             struct tm* ptime=gmtime(timeout);
 #else
@@ -420,7 +458,7 @@ void StoredSession::validate(const Application& application, const char* client_
         if (*timeout > 0 && now - lastAccess >= *timeout) {
             m_cache->m_log.info("session timed out (ID: %s)", getID());
             throw RetryableProfileException("Your session has expired, and you must re-authenticate.");
-        } 
+        }
 
         // Update storage expiration, if possible.
         try {
@@ -429,7 +467,7 @@ void StoredSession::validate(const Application& application, const char* client_
         catch (exception& ex) {
             m_cache->m_log.error("failed to update session expiration: %s", ex.what());
         }
-            
+
         if (ver > curver) {
             // We got an updated record back.
             DDF newobj;
@@ -462,7 +500,7 @@ void StoredSession::addAttributes(const vector<Attribute*>& attributes)
         throw ConfigurationException("Session modification requires a StorageService.");
 
     m_cache->m_log.debug("adding attributes to session (%s)", getID());
-    
+
     int ver;
     do {
         DDF attr;
@@ -473,13 +511,13 @@ void StoredSession::addAttributes(const vector<Attribute*>& attributes)
             attr = (*a)->marshall();
             attrs.add(attr);
         }
-        
+
         // Tentatively increment the version.
         m_obj["version"].integer(m_obj["version"].integer()+1);
-        
+
         ostringstream str;
         str << m_obj;
-        string record(str.str()); 
+        string record(str.str());
 
         try {
             ver = m_cache->m_storage->updateText(getID(), "session", record.c_str(), 0, m_obj["version"].integer()-1);
@@ -489,7 +527,7 @@ void StoredSession::addAttributes(const vector<Attribute*>& attributes)
             m_obj["version"].integer(m_obj["version"].integer()-1);
             vector<Attribute*>::size_type count = attributes.size();
             while (count--)
-                attrs.last().destroy();            
+                attrs.last().destroy();
             throw;
         }
 
@@ -498,7 +536,7 @@ void StoredSession::addAttributes(const vector<Attribute*>& attributes)
             m_obj["version"].integer(m_obj["version"].integer()-1);
             vector<Attribute*>::size_type count = attributes.size();
             while (count--)
-                attrs.last().destroy();            
+                attrs.last().destroy();
         }
         if (!ver) {
             // Fatal problem with update.
@@ -512,7 +550,7 @@ void StoredSession::addAttributes(const vector<Attribute*>& attributes)
                 m_cache->m_log.error("readText failed on StorageService for session (%s)", getID());
                 throw IOException("Unable to read back stored session.");
             }
-            
+
             // Reset object.
             DDF newobj;
             istringstream in(record);
@@ -554,18 +592,18 @@ const Assertion* StoredSession::getAssertion(const char* id) const
     map<string,Assertion*>::const_iterator i = m_tokens.find(id);
     if (i!=m_tokens.end())
         return i->second;
-    
+
     string tokenstr;
     if (!m_cache->m_storage->readText(getID(), id, &tokenstr, NULL))
         throw FatalProfileException("Assertion not found in cache.");
 
     // Parse and bind the document into an XMLObject.
     istringstream instr(tokenstr);
-    DOMDocument* doc = XMLToolingConfig::getConfig().getParser().parse(instr); 
+    DOMDocument* doc = XMLToolingConfig::getConfig().getParser().parse(instr);
     XercesJanitor<DOMDocument> janitor(doc);
     auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true));
     janitor.release();
-    
+
     Assertion* token = dynamic_cast<Assertion*>(xmlObject.get());
     if (!token)
         throw FatalProfileException("Request for cached assertion returned an unknown object type.");
@@ -600,7 +638,7 @@ void StoredSession::addAssertion(Assertion* assertion)
     tokenstr << *assertion;
     if (!m_cache->m_storage->createText(getID(), id.get(), tokenstr.str().c_str(), exp))
         throw IOException("Attempted to insert duplicate assertion ID into session.");
-    
+
     int ver;
     do {
         DDF token = DDF(NULL).string(id.get());
@@ -608,10 +646,10 @@ void StoredSession::addAssertion(Assertion* assertion)
 
         // Tentatively increment the version.
         m_obj["version"].integer(m_obj["version"].integer()+1);
-    
+
         ostringstream str;
         str << m_obj;
-        string record(str.str()); 
+        string record(str.str());
 
         try {
             ver = m_cache->m_storage->updateText(getID(), "session", record.c_str(), 0, m_obj["version"].integer()-1);
@@ -626,7 +664,7 @@ void StoredSession::addAssertion(Assertion* assertion)
         if (ver <= 0) {
             token.destroy();
             m_obj["version"].integer(m_obj["version"].integer()-1);
-        }            
+        }
         if (!ver) {
             // Fatal problem with update.
             m_cache->m_log.error("updateText failed on StorageService for session (%s)", getID());
@@ -642,7 +680,7 @@ void StoredSession::addAssertion(Assertion* assertion)
                 m_cache->m_storage->deleteText(getID(), id.get());
                 throw IOException("Unable to read back stored session.");
             }
-            
+
             // Reset object.
             DDF newobj;
             istringstream in(record);
@@ -655,7 +693,7 @@ void StoredSession::addAssertion(Assertion* assertion)
             newobj["version"].integer(ver);
             m_obj.destroy();
             m_obj = newobj;
-            
+
             ver = -1;
         }
     } while (ver < 0); // negative indicates a sync issue so we retry
@@ -674,15 +712,16 @@ void StoredSession::addAssertion(Assertion* assertion)
 #endif
 
 SSCache::SSCache(const DOMElement* e)
-    : m_log(Category::getInstance(SHIBSP_LOGCAT".SessionCache")), inproc(true), m_cacheTimeout(3600),
+    : m_log(Category::getInstance(SHIBSP_LOGCAT".SessionCache")), inproc(true), m_cacheTimeout(28800),
 #ifndef SHIBSP_LITE
-        m_storage(NULL),
+      m_storage(NULL), m_storage_lite(NULL),
 #endif
         m_root(e), m_inprocTimeout(900), m_lock(NULL), shutdown(false), shutdown_wait(NULL), cleanup_thread(NULL)
 {
     static const XMLCh cacheTimeout[] =     UNICODE_LITERAL_12(c,a,c,h,e,T,i,m,e,o,u,t);
     static const XMLCh inprocTimeout[] =    UNICODE_LITERAL_13(i,n,p,r,o,c,T,i,m,e,o,u,t);
     static const XMLCh _StorageService[] =  UNICODE_LITERAL_14(S,t,o,r,a,g,e,S,e,r,v,i,c,e);
+    static const XMLCh _StorageServiceLite[] = UNICODE_LITERAL_18(S,t,o,r,a,g,e,S,e,r,v,i,c,e,L,i,t,e);
 
     SPConfig& conf = SPConfig::getConfig();
     inproc = conf.isEnabled(SPConfig::InProcess);
@@ -692,7 +731,7 @@ SSCache::SSCache(const DOMElement* e)
         if (tag && *tag) {
             m_cacheTimeout = XMLString::parseInt(tag);
             if (!m_cacheTimeout)
-                m_cacheTimeout=3600;
+                m_cacheTimeout=28800;
         }
         if (inproc) {
             const XMLCh* tag=e->getAttributeNS(NULL,inprocTimeout);
@@ -715,6 +754,18 @@ SSCache::SSCache(const DOMElement* e)
         }
         if (!m_storage)
             throw ConfigurationException("SessionCache unable to locate StorageService, check configuration.");
+
+        tag = e ? e->getAttributeNS(NULL,_StorageServiceLite) : NULL;
+        if (tag && *tag) {
+            auto_ptr_char ssid(tag);
+            m_storage_lite = conf.getServiceProvider()->getStorageService(ssid.get());
+            if (m_storage_lite)
+                m_log.info("bound to StorageServiceLite (%s)", ssid.get());
+        }
+        if (!m_storage_lite) {
+            m_log.info("No StorageServiceLite specified. Using standard StorageService.");
+            m_storage_lite = m_storage;
+        }
     }
 #endif
 
@@ -788,7 +839,7 @@ void SSCache::insert(const char* key, time_t expires, const char* name, const ch
     // Since we can't guarantee uniqueness, check for an existing record.
     string record;
     time_t recordexp;
-    int ver = m_storage->readText("NameID", name, &record, &recordexp);
+    int ver = m_storage_lite->readText("NameID", name, &record, &recordexp);
     if (ver > 0) {
         // Existing record, so we need to unmarshall it.
         istringstream in(record);
@@ -813,13 +864,13 @@ void SSCache::insert(const char* key, time_t expires, const char* name, const ch
 
     // Try and store it back...
     if (ver > 0) {
-        ver = m_storage->updateText("NameID", name, out.str().c_str(), max(expires, recordexp), ver);
+        ver = m_storage_lite->updateText("NameID", name, out.str().c_str(), max(expires, recordexp), ver);
         if (ver <= 0) {
             // Out of sync, or went missing, so retry.
             return insert(key, expires, name, index);
         }
     }
-    else if (!m_storage->createText("NameID", name, out.str().c_str(), expires)) {
+    else if (!m_storage_lite->createText("NameID", name, out.str().c_str(), expires)) {
         // Hit a dup, so just retry, hopefully hitting the other branch.
         return insert(key, expires, name, index);
     }
@@ -859,7 +910,7 @@ void SSCache::insert(
         if (strlen(name.get()) > 255)
             const_cast<char*>(name.get())[255] = 0;
         string pending;
-        int ver = m_storage->readText("Logout", name.get(), &pending);
+        int ver = m_storage_lite->readText("Logout", name.get(), &pending);
         if (ver > 0) {
             DDF pendobj;
             DDFJanitor jpend(pendobj);
@@ -885,6 +936,7 @@ void SSCache::insert(
 
     // Store session properties in DDF.
     DDF obj = DDF(key.get()).structure();
+    DDFJanitor entryobj(obj);
     obj.addmember("version").integer(1);
     obj.addmember("application_id").string(application.getId());
 
@@ -935,7 +987,7 @@ void SSCache::insert(
             obj["assertions"].add(tokid);
         }
     }
-    
+
     if (attributes) {
         DDF attr;
         DDF attrlist = obj.addmember("attributes").list();
@@ -944,14 +996,14 @@ void SSCache::insert(
             attrlist.add(attr);
         }
     }
-    
+
     ostringstream record;
     record << obj;
-    
+
     m_log.debug("storing new session...");
     if (!m_storage->createText(key.get(), "session", record.str().c_str(), now + m_cacheTimeout))
         throw FatalProfileException("Attempted to create a session with a duplicate key.");
-    
+
     // Store the reverse mapping for logout.
     try {
         if (nameid)
@@ -997,8 +1049,10 @@ void SSCache::insert(
             (nameid ? name.get() : "none") <<
         ") using (Protocol: " <<
             (prot ? prot : "none") <<
+        ") from (AssertionID: " <<
+            (tokens ? obj["assertions"].first().string() : "none") <<
         ")";
-    
+
     if (attributes) {
         xlog->log.infoStream() <<
             "Cached the following attributes with session (ID: " <<
@@ -1011,9 +1065,23 @@ void SSCache::insert(
         xlog->log.info("}");
     }
 
-    pair<string,const char*> shib_cookie = application.getCookieNameProps("_shibsession_");
+    time_t cookieLifetime = 0;
+    pair<string,const char*> shib_cookie = application.getCookieNameProps("_shibsession_", &cookieLifetime);
     string k(key.get());
     k += shib_cookie.second;
+
+    if (cookieLifetime > 0) {
+        cookieLifetime += now;
+#ifndef HAVE_GMTIME_R
+        ptime=gmtime(&cookieLifetime);
+#else
+        ptime=gmtime_r(&cookieLifetime,&res);
+#endif
+        char cookietimebuf[64];
+        strftime(cookietimebuf,64,"; expires=%a, %d %b %Y %H:%M:%S GMT",ptime);
+        k += cookietimebuf;
+    }
+
     httpResponse.setCookie(shib_cookie.first.c_str(), k.c_str());
 }
 
@@ -1084,7 +1152,7 @@ vector<string>::size_type SSCache::logout(
         strftime(timebuf,32,"%Y-%m-%dT%H:%M:%SZ",ptime);
 
         time_t oldexp = 0;
-        ver = m_storage->readText("Logout", name.get(), &record, &oldexp);
+        ver = m_storage_lite->readText("Logout", name.get(), &record, &oldexp);
         if (ver > 0) {
             istringstream lin(record);
             lin >> obj;
@@ -1108,13 +1176,13 @@ vector<string>::size_type SSCache::logout(
         lout << obj;
 
         if (ver > 0) {
-            ver = m_storage->updateText("Logout", name.get(), lout.str().c_str(), max(expires, oldexp), ver);
+            ver = m_storage_lite->updateText("Logout", name.get(), lout.str().c_str(), max(expires, oldexp), ver);
             if (ver <= 0) {
                 // Out of sync, or went missing, so retry.
                 return logout(application, issuer, nameid, indexes, expires, sessionsKilled);
             }
         }
-        else if (!m_storage->createText("Logout", name.get(), lout.str().c_str(), expires)) {
+        else if (!m_storage_lite->createText("Logout", name.get(), lout.str().c_str(), expires)) {
             // Hit a dup, so just retry, hopefully hitting the other branch.
             return logout(application, issuer, nameid, indexes, expires, sessionsKilled);
         }
@@ -1124,7 +1192,7 @@ vector<string>::size_type SSCache::logout(
     }
 
     // Read in potentially matching sessions.
-    ver = m_storage->readText("NameID", name.get(), &record);
+    ver = m_storage_lite->readText("NameID", name.get(), &record);
     if (ver == 0) {
         m_log.debug("no active sessions to logout for supplied issuer and subject");
         return 0;
@@ -1180,19 +1248,19 @@ vector<string>::size_type SSCache::logout(
         }
         sessions = obj.next();
     }
-    
+
     if (obj.first().isnull())
         obj.destroy();
 
     // If possible, write back the mapping record (this isn't crucial).
     try {
         if (obj.isnull()) {
-            m_storage->deleteText("NameID", name.get());
+            m_storage_lite->deleteText("NameID", name.get());
         }
         else if (!sessionsKilled.empty()) {
             ostringstream out;
             out << obj;
-            if (m_storage->updateText("NameID", name.get(), out.str().c_str(), 0, ver) <= 0)
+            if (m_storage_lite->updateText("NameID", name.get(), out.str().c_str(), 0, ver) <= 0)
                 m_log.warn("logout mapping record changed behind us, leaving it alone");
         }
     }
@@ -1207,7 +1275,7 @@ bool SSCache::stronglyMatches(const XMLCh* idp, const XMLCh* sp, const saml2::Na
 {
     if (!XMLString::equals(n1.getName(), n2.getName()))
         return false;
-    
+
     const XMLCh* s1 = n1.getFormat();
     const XMLCh* s2 = n2.getFormat();
     if (!s1 || !*s1)
@@ -1216,7 +1284,7 @@ bool SSCache::stronglyMatches(const XMLCh* idp, const XMLCh* sp, const saml2::Na
         s2 = saml2::NameID::UNSPECIFIED;
     if (!XMLString::equals(s1,s2))
         return false;
-    
+
     s1 = n1.getNameQualifier();
     s2 = n2.getNameQualifier();
     if (!s1 || !*s1)
@@ -1273,7 +1341,7 @@ Session* SSCache::find(const Application& application, const char* key, const ch
             in.addmember("key").string(key);
             in.addmember("application_id").string(application.getId());
             if (timeout && *timeout) {
-                // On 64-bit Windows, time_t doesn't fit in a long, so I'm using ISO timestamps.  
+                // On 64-bit Windows, time_t doesn't fit in a long, so I'm using ISO timestamps.
 #ifndef HAVE_GMTIME_R
                 struct tm* ptime=gmtime(timeout);
 #else
@@ -1284,7 +1352,7 @@ Session* SSCache::find(const Application& application, const char* key, const ch
                 strftime(timebuf,32,"%Y-%m-%dT%H:%M:%SZ",ptime);
                 in.addmember("timeout").string(timebuf);
             }
-            
+
             try {
                 out=application.getServiceProvider().getListenerService()->send(in);
                 if (!out.isstruct()) {
@@ -1292,7 +1360,7 @@ Session* SSCache::find(const Application& application, const char* key, const ch
                     m_log.debug("session not found in remote cache");
                     return NULL;
                 }
-                
+
                 // Wrap the results in a local entry and save it.
                 session = new StoredSession(this, out);
                 // The remote end has handled timeout issues, we handle address and expiration checks.
@@ -1310,22 +1378,22 @@ Session* SSCache::find(const Application& application, const char* key, const ch
                 throw ConfigurationException("SessionCache lookup requires a StorageService.");
 
             m_log.debug("searching for session (%s)", key);
-            
+
             DDF obj;
             time_t lastAccess;
             string record;
             int ver = m_storage->readText(key, "session", &record, &lastAccess);
             if (!ver)
                 return NULL;
-            
+
             m_log.debug("reconstituting session and checking validity");
-            
+
             istringstream in(record);
             in >> obj;
-            
+
             lastAccess -= m_cacheTimeout;   // adjusts it back to the last time the record's timestamp was touched
             time_t now=time(NULL);
-            
+
             if (timeout && *timeout > 0 && now - lastAccess >= *timeout) {
                 m_log.info("session timed out (ID: %s)", key);
                 remove(application, key);
@@ -1338,7 +1406,7 @@ Session* SSCache::find(const Application& application, const char* key, const ch
                 obj.destroy();
                 throw RetryableProfileException("Your session has expired, and you must re-authenticate.", namedparams(1, "entityID", eid2.c_str()));
             }
-            
+
             if (timeout) {
                 // Update storage expiration, if possible.
                 try {
@@ -1390,7 +1458,7 @@ Session* SSCache::find(const Application& application, const char* key, const ch
         remove(application, key);
         throw;
     }
-    
+
     return session;
 }
 
@@ -1402,7 +1470,7 @@ void SSCache::remove(const Application& application, const char* key)
     // Take care of local copy.
     if (inproc)
         dormant(key);
-    
+
     if (SPConfig::getConfig().isEnabled(SPConfig::OutOfProcess)) {
         // Remove the session from storage directly.
 #ifndef SHIBSP_LITE
@@ -1423,7 +1491,7 @@ void SSCache::remove(const Application& application, const char* key)
         in.structure();
         in.addmember("key").string(key);
         in.addmember("application_id").string(application.getId());
-        
+
         DDF out = application.getServiceProvider().getListenerService()->send(in);
         out.destroy();
     }
@@ -1451,7 +1519,7 @@ void SSCache::dormant(const char* key)
     StoredSession* entry=i->second;
     m_hashtable.erase(key);
     entry->lock();
-    
+
     // unlock the cache
     m_lock->unlock();
 
@@ -1468,15 +1536,16 @@ void SSCache::cleanup()
 #endif
 
     Mutex* mutex = Mutex::create();
-  
+
     // Load our configuration details...
     static const XMLCh cleanupInterval[] = UNICODE_LITERAL_15(c,l,e,a,n,u,p,I,n,t,e,r,v,a,l);
     const XMLCh* tag=m_root ? m_root->getAttributeNS(NULL,cleanupInterval) : NULL;
     int rerun_timer = 900;
-    if (tag && *tag)
+    if (tag && *tag) {
         rerun_timer = XMLString::parseInt(tag);
-    if (rerun_timer <= 0)
-        rerun_timer = 900;
+        if (rerun_timer <= 0)
+            rerun_timer = 900;
+    }
 
     mutex->lock();
 
@@ -1492,12 +1561,12 @@ void SSCache::cleanup()
         // first pass is done holding a read-lock while we iterate over
         // the cache.  The second pass doesn't need a lock because
         // the 'deletes' will lock the cache.
-    
+
         // Pass 1: iterate over the map and find all entries that have not been
         // used in the allotted timeout.
         vector<string> stale_keys;
         time_t stale = time(NULL) - m_inprocTimeout;
-    
+
         m_log.debug("cleanup thread running");
 
         m_lock->rdlock();
@@ -1510,10 +1579,10 @@ void SSCache::cleanup()
                 stale_keys.push_back(i->first);
         }
         m_lock->unlock();
-    
+
         if (!stale_keys.empty()) {
             m_log.info("purging %d old sessions", stale_keys.size());
-    
+
             // Pass 2: walk through the list of stale entries and remove them from the cache
             for (vector<string>::const_iterator j = stale_keys.begin(); j != stale_keys.end(); ++j)
                 dormant(j->c_str());
@@ -1532,7 +1601,7 @@ void SSCache::cleanup()
 void* SSCache::cleanup_fn(void* cache_p)
 {
 #ifndef WIN32
-    // First, let's block all signals 
+    // First, let's block all signals
     Thread::mask_all_signals();
 #endif
 
@@ -1579,12 +1648,12 @@ void SSCache::receive(DDF& in, ostream& out)
             DateTime dtobj(dt.get());
             dtobj.parseDateTime();
             timeout = dtobj.getEpoch();
-                    
+
             if (timeout > 0 && now - lastAccess >= timeout) {
                 m_log.info("session timed out (ID: %s)", key);
                 remove(*app, key);
                 throw RetryableProfileException("Your session has expired, and you must re-authenticate.");
-            } 
+            }
 
             // Update storage expiration, if possible.
             try {
@@ -1594,7 +1663,7 @@ void SSCache::receive(DDF& in, ostream& out)
                 m_log.error("failed to update session expiration: %s", ex.what());
             }
         }
-            
+
         // Send the record back.
         out << record;
     }
@@ -1625,11 +1694,11 @@ void SSCache::receive(DDF& in, ostream& out)
             dtobj.parseDateTime();
             timeout = dtobj.getEpoch();
         }
-                
+
         if (timeout > 0 && now - lastAccess >= timeout) {
             m_log.info("session timed out (ID: %s)", key);
             throw RetryableProfileException("Your session has expired, and you must re-authenticate.");
-        } 
+        }
 
         // Update storage expiration, if possible.
         try {
@@ -1638,7 +1707,7 @@ void SSCache::receive(DDF& in, ostream& out)
         catch (exception& ex) {
             m_log.error("failed to update session expiration: %s", ex.what());
         }
-            
+
         if (ver > curver) {
             // Send the record back.
             out << record;
index eeb3f38..fb16a21 100644 (file)
@@ -124,6 +124,7 @@ namespace {
             return (!m_credResolver && m_base) ? m_base->getCredentialResolver() : m_credResolver;
         }
         const PropertySet* getRelyingParty(const EntityDescriptor* provider) const;
+        const PropertySet* getRelyingParty(const XMLCh* entityID) const;
         const vector<const XMLCh*>* getAudiences() const {
             return (m_audiences.empty() && m_base) ? m_base->getAudiences() : &m_audiences;
         }
@@ -977,6 +978,25 @@ const PropertySet* XMLApplication::getRelyingParty(const EntityDescriptor* provi
     return this;
 }
 
+const PropertySet* XMLApplication::getRelyingParty(const XMLCh* entityID) const
+{
+    if (!entityID)
+        return this;
+        
+#ifdef HAVE_GOOD_STL
+    map<xstring,PropertySet*>::const_iterator i=m_partyMap.find(entityID);
+    if (i!=m_partyMap.end())
+        return i->second;
+#else
+    map<const XMLCh*,PropertySet*>::const_iterator i=m_partyMap.begin();
+    for (; i!=m_partyMap.end(); i++) {
+        if (XMLString::equals(i->first,entityID))
+            return i->second;
+    }
+#endif
+    return this;
+}
+
 #endif
 
 string XMLApplication::getNotificationURL(const char* resource, bool front, unsigned int index) const
@@ -1394,8 +1414,10 @@ XMLConfigImpl::XMLConfigImpl(const DOMElement* e, bool first, const XMLConfig* o
             auto_ptr<XMLApplication> iapp(new XMLApplication(m_outer,child,defapp));
             if (m_appmap.count(iapp->getId()))
                 log.crit("found conf:ApplicationOverride element with duplicate id attribute (%s), skipping it", iapp->getId());
-            else
-                m_appmap[iapp->getId()]=iapp.release();
+            else {
+                const char* iappid=iapp->getId();
+                m_appmap[iappid]=iapp.release();
+            }
 
             child = XMLHelper::getNextSiblingElement(child,ApplicationOverride);
         }
index 1b5e9e5..6ccfbc3 100644 (file)
@@ -43,6 +43,7 @@
 #include "base.h"
 #include "SPConfig.h"
 
+#include <memory>
 #include <xmltooling/logging.h>
 
 using namespace xmltooling::logging;
diff --git a/shibsp/metadata/DynamicMetadataProvider.cpp b/shibsp/metadata/DynamicMetadataProvider.cpp
new file mode 100644 (file)
index 0000000..42545a3
--- /dev/null
@@ -0,0 +1,277 @@
+/*
+ *  Copyright 2001-2008 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.
+ */
+
+/**
+ * DynamicMetadataProvider.cpp
+ *
+ * Advanced implementation of a dynamic caching MetadataProvider.
+ */
+
+#include "internal.h"
+#include "exceptions.h"
+#include "ServiceProvider.h"
+#include "metadata/MetadataProviderCriteria.h"
+
+#include <saml/version.h>
+#include <saml/binding/SAMLArtifact.h>
+#include <saml/saml2/metadata/Metadata.h>
+#include <saml/saml2/metadata/DynamicMetadataProvider.h>
+
+#include <xmltooling/logging.h>
+#include <xmltooling/util/NDC.h>
+#include <xmltooling/security/Credential.h>
+#include <xmltooling/security/CredentialCriteria.h>
+#include <xmltooling/security/CredentialResolver.h>
+#include <xmltooling/security/X509TrustEngine.h>
+#include <xmltooling/soap/HTTPSOAPTransport.h>
+#include <xmltooling/util/XMLHelper.h>
+
+#include <xercesc/framework/Wrapper4InputSource.hpp>
+#include <xercesc/util/XMLUniDefs.hpp>
+
+using namespace shibsp;
+using namespace opensaml;
+using namespace xmltooling::logging;
+using namespace xmltooling;
+using namespace std;
+
+namespace shibsp {
+    class SAML_DLLLOCAL DummyCredentialResolver : public CredentialResolver
+    {
+    public:
+        DummyCredentialResolver() {}
+        ~DummyCredentialResolver() {}
+
+        Lockable* lock() {return this;}
+        void unlock() {}
+
+        const Credential* resolve(const CredentialCriteria* criteria=NULL) const {return NULL;}
+        vector<const Credential*>::size_type resolve(
+            vector<const Credential*>& results, const CredentialCriteria* criteria=NULL
+            ) const {return 0;}
+    };
+
+    class SHIBSP_DLLLOCAL DynamicMetadataProvider : public saml2md::DynamicMetadataProvider
+    {
+    public:
+        DynamicMetadataProvider(const xercesc::DOMElement* e=NULL);
+
+        virtual ~DynamicMetadataProvider() {
+            delete m_trust;
+        }
+
+    protected:
+        saml2md::EntityDescriptor* resolve(const saml2md::MetadataProvider::Criteria& criteria) const;
+
+    private:
+        bool m_verifyHost,m_ignoreTransport;
+        X509TrustEngine* m_trust;
+    };
+
+
+    saml2md::MetadataProvider* SHIBSP_DLLLOCAL DynamicMetadataProviderFactory(const DOMElement* const & e)
+    {
+        return new DynamicMetadataProvider(e);
+    }
+
+    static const XMLCh ignoreTransport[] =  UNICODE_LITERAL_15(i,g,n,o,r,e,T,r,a,n,s,p,o,r,t);
+    static const XMLCh _TrustEngine[] =     UNICODE_LITERAL_11(T,r,u,s,t,E,n,g,i,n,e);
+    static const XMLCh type[] =             UNICODE_LITERAL_4(t,y,p,e);
+    static const XMLCh verifyHost[] =       UNICODE_LITERAL_10(v,e,r,i,f,y,H,o,s,t);
+};
+
+DynamicMetadataProvider::DynamicMetadataProvider(const DOMElement* e)
+    : saml2md::DynamicMetadataProvider(e), m_verifyHost(true), m_ignoreTransport(false), m_trust(NULL)
+{
+    const XMLCh* flag = e ? e->getAttributeNS(NULL, verifyHost) : NULL;
+    if (flag && (*flag == chLatin_f || *flag == chDigit_0))
+        m_verifyHost = false;
+    flag = e ? e->getAttributeNS(NULL, ignoreTransport) : NULL;
+    if (flag && (*flag == chLatin_t || *flag == chDigit_1)) {
+        m_ignoreTransport = true;
+        return;
+    }
+
+    e = e ? XMLHelper::getFirstChildElement(e, _TrustEngine) : NULL;
+    auto_ptr_char t2(e ? e->getAttributeNS(NULL,type) : NULL);
+    if (t2.get()) {
+        TrustEngine* trust = XMLToolingConfig::getConfig().TrustEngineManager.newPlugin(t2.get(),e);
+        if (!(m_trust = dynamic_cast<X509TrustEngine*>(trust))) {
+            delete trust;
+            throw ConfigurationException("DynamicMetadataProvider requires an X509TrustEngine plugin.");
+        }
+        return;
+    }
+
+    throw ConfigurationException("DynamicMetadataProvider requires an X509TrustEngine plugin unless ignoreTransport is true.");
+}
+
+saml2md::EntityDescriptor* DynamicMetadataProvider::resolve(const saml2md::MetadataProvider::Criteria& criteria) const
+{
+#ifdef _DEBUG
+    xmltooling::NDC("resolve");
+#endif
+    Category& log=Category::getInstance(SHIBSP_LOGCAT".MetadataProvider.Dynamic");
+
+    string name;
+    if (criteria.entityID_ascii)
+        name = criteria.entityID_ascii;
+    else if (criteria.entityID_unicode) {
+        auto_ptr_char temp(criteria.entityID_unicode);
+        name = temp.get();
+    }
+    else if (criteria.artifact)
+        name = criteria.artifact->getSource();
+
+    // Establish networking properties based on calling application.
+    const MetadataProviderCriteria* mpc = dynamic_cast<const MetadataProviderCriteria*>(&criteria);
+    if (!mpc)
+        throw saml2md::MetadataException("Dynamic MetadataProvider requires Shibboleth-aware lookup criteria, check calling code.");
+    const PropertySet* relyingParty;
+    if (criteria.entityID_unicode)
+        relyingParty = mpc->application.getRelyingParty(criteria.entityID_unicode);
+    else {
+        auto_ptr_XMLCh temp2(name.c_str());
+        relyingParty = mpc->application.getRelyingParty(temp2.get());
+    }
+
+    // Prepare a transport object addressed appropriately.
+    SOAPTransport::Address addr(relyingParty->getString("entityID").second, name.c_str(), name.c_str());
+    const char* pch = strchr(addr.m_endpoint,':');
+    if (!pch)
+        throw IOException("entityID was not a URL.");
+    string scheme(addr.m_endpoint, pch-addr.m_endpoint);
+    SOAPTransport* transport=NULL;
+    try {
+        transport = XMLToolingConfig::getConfig().SOAPTransportManager.newPlugin(scheme.c_str(), addr);
+    }
+    catch (exception& ex) {
+        log.error("exception while building transport object to resolve URL: %s", ex.what());
+        throw IOException("Unable to resolve entityID with a known transport protocol.");
+    }
+    auto_ptr<SOAPTransport> transportwrapper(transport);
+
+    // Apply properties as directed.
+    transport->setVerifyHost(m_verifyHost);
+    DummyCredentialResolver dcr;
+    if (m_trust && !transport->setTrustEngine(m_trust, &dcr))
+        throw IOException("Unable to install X509TrustEngine into metadata resolver.");
+
+    Locker credlocker(NULL, false);
+    CredentialResolver* credResolver = NULL;
+    pair<bool,const char*> authType=relyingParty->getString("authType");
+    if (!authType.first || !strcmp(authType.second,"TLS")) {
+        credResolver = mpc->application.getCredentialResolver();
+        if (credResolver)
+            credlocker.assign(credResolver);
+        if (credResolver) {
+            CredentialCriteria cc;
+            cc.setUsage(Credential::TLS_CREDENTIAL);
+            authType = relyingParty->getString("keyName");
+            if (authType.first)
+                cc.getKeyNames().insert(authType.second);
+            const Credential* cred = credResolver->resolve(&cc);
+            cc.getKeyNames().clear();
+            if (cred) {
+                if (!transport->setCredential(cred))
+                    log.error("failed to load Credential into metadata resolver");
+            }
+            else {
+                log.error("no TLS credential supplied");
+            }
+        }
+        else {
+            log.error("no CredentialResolver available for TLS");
+        }
+    }
+    else {
+        SOAPTransport::transport_auth_t type=SOAPTransport::transport_auth_none;
+        pair<bool,const char*> username=relyingParty->getString("authUsername");
+        pair<bool,const char*> password=relyingParty->getString("authPassword");
+        if (!username.first || !password.first)
+            log.error("transport authType (%s) specified but authUsername or authPassword was missing", authType.second);
+        else if (!strcmp(authType.second,"basic"))
+            type = SOAPTransport::transport_auth_basic;
+        else if (!strcmp(authType.second,"digest"))
+            type = SOAPTransport::transport_auth_digest;
+        else if (!strcmp(authType.second,"ntlm"))
+            type = SOAPTransport::transport_auth_ntlm;
+        else if (!strcmp(authType.second,"gss"))
+            type = SOAPTransport::transport_auth_gss;
+        else if (strcmp(authType.second,"none"))
+            log.error("unknown authType (%s) specified for RelyingParty", authType.second);
+        if (type > SOAPTransport::transport_auth_none) {
+            if (transport->setAuth(type,username.second,password.second))
+                log.debug("configured for transport authentication (method=%s, username=%s)", authType.second, username.second);
+            else
+                log.error("failed to configure transport authentication (method=%s)", authType.second);
+        }
+    }
+
+    pair<bool,unsigned int> timeout = relyingParty->getUnsignedInt("connectTimeout");
+    transport->setConnectTimeout(timeout.first ? timeout.second : 10);
+    timeout = relyingParty->getUnsignedInt("timeout");
+    transport->setTimeout(timeout.first ? timeout.second : 20);
+    mpc->application.getServiceProvider().setTransportOptions(*transport);
+
+    HTTPSOAPTransport* http = dynamic_cast<HTTPSOAPTransport*>(transport);
+    if (http) {
+        pair<bool,bool> flag = relyingParty->getBool("chunkedEncoding");
+        http->useChunkedEncoding(flag.first && flag.second);
+        http->setRequestHeader("Xerces-C", XERCES_FULLVERSIONDOT);
+        http->setRequestHeader("XML-Security-C", XSEC_FULLVERSIONDOT);
+        http->setRequestHeader("OpenSAML-C", OPENSAML_FULLVERSIONDOT);
+        http->setRequestHeader("User-Agent", PACKAGE_NAME);
+        http->setRequestHeader(PACKAGE_NAME, PACKAGE_VERSION);
+    }
+
+    try {
+        // Use an empty stream to trigger a body-less "GET" operation.
+        istringstream dummy;
+        transport->send(dummy);
+        istream& msg = transport->receive();
+
+        DOMDocument* doc=NULL;
+        StreamInputSource src(msg, "DynamicMetadataProvider");
+        Wrapper4InputSource dsrc(&src,false);
+        if (m_validate)
+            doc=XMLToolingConfig::getConfig().getValidatingParser().parse(dsrc);
+        else
+            doc=XMLToolingConfig::getConfig().getParser().parse(dsrc);
+
+        // Wrap the document for now.
+        XercesJanitor<DOMDocument> docjanitor(doc);
+
+        // Unmarshall objects, binding the document.
+        auto_ptr<XMLObject> xmlObject(XMLObjectBuilder::buildOneFromElement(doc->getDocumentElement(), true));
+        docjanitor.release();
+
+        // Make sure it's metadata.
+        saml2md::EntityDescriptor* entity = dynamic_cast<saml2md::EntityDescriptor*>(xmlObject.get());
+        if (!entity) {
+            throw saml2md::MetadataException(
+                "Root of metadata instance not recognized: $1", params(1,xmlObject->getElementQName().toString().c_str())
+                );
+        }
+        xmlObject.release();
+        return entity;
+    }
+    catch (XMLException& e) {
+        auto_ptr_char msg(e.getMessage());
+        log.error("Xerces error while resolving entityID (%s): %s", name.c_str(), msg.get());
+        throw saml2md::MetadataException(msg.get());
+    }
+}
index e4a4e56..d175ba4 100644 (file)
 #include "exceptions.h"
 #include "metadata/MetadataExt.h"
 
+#include <saml/SAMLConfig.h>
+#include <saml/saml2/metadata/MetadataProvider.h>
 #include <xmltooling/validation/ValidatorSuite.h>
 
 using namespace shibsp;
+using namespace opensaml::saml2md;
 using namespace xmltooling;
 using namespace std;
 
@@ -38,6 +41,8 @@ namespace shibsp {
     BEGIN_XMLOBJECTVALIDATOR(SHIBSP_DLLLOCAL,KeyAuthority);
         XMLOBJECTVALIDATOR_NONEMPTY(KeyAuthority,KeyInfo);
     END_XMLOBJECTVALIDATOR;
+    
+    SHIBSP_DLLLOCAL PluginManager<MetadataProvider,string,const DOMElement*>::Factory DynamicMetadataProviderFactory;
 };
 
 #define REGISTER_ELEMENT(cname) \
@@ -49,4 +54,6 @@ void shibsp::registerMetadataExtClasses() {
     QName q;
     REGISTER_ELEMENT(Scope);
     REGISTER_ELEMENT(KeyAuthority);
+
+    opensaml::SAMLConfig::getConfig().MetadataProviderManager.registerFactory(DYNAMIC_METADATA_PROVIDER, DynamicMetadataProviderFactory);
 }
diff --git a/shibsp/metadata/MetadataProviderCriteria.h b/shibsp/metadata/MetadataProviderCriteria.h
new file mode 100644 (file)
index 0000000..4020005
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ *  Copyright 2001-2008 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.
+ */
+
+/**
+ * @file shibsp/metadata/MetadataProviderCriteria.h
+ *
+ * Extended criteria for metadata lookup for Shibboleth-aware metadata providers.
+ */
+
+#ifndef __shibsp_metaprovcrit_h__
+#define __shibsp_metaprovcrit_h__
+
+#include <shibsp/Application.h>
+#include <saml/saml2/metadata/MetadataProvider.h>
+
+namespace shibsp {
+
+    /**
+     * Extended criteria for metadata lookup for Shibboleth-aware metadata providers.
+     */
+    struct SHIBSP_API MetadataProviderCriteria : public opensaml::saml2md::MetadataProvider::Criteria
+    {
+        /**
+         * Constructor.
+         *
+         * @param app   application performing the lookup
+         * @param id    entityID to lookup
+         * @param q     element/type of role, if any
+         * @param prot  protocol support constant, if any
+         * @param valid true iff stale metadata should be ignored
+         */
+        MetadataProviderCriteria(const Application& app, const XMLCh* id, const xmltooling::QName* q=NULL, const XMLCh* prot=NULL, bool valid=true)
+            : opensaml::saml2md::MetadataProvider::Criteria(id, q, prot, valid), application(app) {
+        }
+
+        /**
+         * Constructor.
+         *
+         * @param app   application performing the lookup
+         * @param id    entityID to lookup
+         * @param q     element/type of role, if any
+         * @param prot  protocol support constant, if any
+         * @param valid true iff stale metadata should be ignored
+         */
+        MetadataProviderCriteria(const Application& app, const char* id, const xmltooling::QName* q=NULL, const XMLCh* prot=NULL, bool valid=true)
+            : opensaml::saml2md::MetadataProvider::Criteria(id, q, prot, valid), application(app) {
+        }
+
+        /**
+         * Constructor.
+         *
+         * @param app   application performing the lookup
+         * @param a     artifact to lookup
+         * @param q     element/type of role, if any
+         * @param prot  protocol support constant, if any
+         * @param valid true iff stale metadata should be ignored
+         */
+        MetadataProviderCriteria(const Application& app, const opensaml::SAMLArtifact* a, const xmltooling::QName* q=NULL, const XMLCh* prot=NULL, bool valid=true)
+            : opensaml::saml2md::MetadataProvider::Criteria(a, q, prot, valid), application(app) {
+        }
+
+        /** Controls whether stale metadata is ignored. */
+        const Application& application;
+    };
+};
+
+#endif /* __shibsp_metaprovcrit_h__ */
index c67492d..e211b20 100644 (file)
@@ -305,7 +305,8 @@ DDF SocketListener::send(const DDF& in)
     log->debug("send completed, reading response message");
 
     // Read the message.
-    if (recv(sock,(char*)&len,sizeof(len)) != sizeof(len)) {
+    while (recv(sock,(char*)&len,sizeof(len)) != sizeof(len)) {
+       if (errno == EINTR) continue;   // Apparently this happens when a signal interrupts the blocking call.
         log->error("error reading size of output message");
         this->close(sock);
         throw ListenerException("Failure receiving response to remoted message ($1).", params(1,in.name()));
@@ -315,9 +316,15 @@ DDF SocketListener::send(const DDF& in)
     char buf[16384];
     int size_read;
     stringstream is;
-    while (len && (size_read = recv(sock, buf, sizeof(buf))) > 0) {
-        is.write(buf, size_read);
-        len -= size_read;
+    while (len) {
+       size_read = recv(sock, buf, sizeof(buf));
+       if (size_read > 0) {
+            is.write(buf, size_read);
+            len -= size_read;
+       }
+       else if (errno != EINTR) {
+               break;
+       }
     }
     
     if (len) {
index 2a1e205..48dc6af 100644 (file)
@@ -11,6 +11,9 @@
                <Platform\r
                        Name="Win32"\r
                />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
        </Platforms>\r
        <ToolFiles>\r
        </ToolFiles>\r
@@ -63,7 +66,7 @@
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalDependencies="log4shib1D.lib xerces-c_2D.lib xmltooling-lite1D.lib wsock32.lib"\r
-                               OutputFile="$(OutDir)\$(ProjectName)1_0D.dll"\r
+                               OutputFile="$(OutDir)\$(ProjectName)1_1D.dll"\r
                                LinkIncremental="2"\r
                                AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(ConfigurationName)"\r
                                GenerateDebugInformation="true"\r
                        />\r
                </Configuration>\r
                <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".;..;..\..\cpp-xmltooling"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WANT_TCP_SHAR;SHIBSP_LITE"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_UNICODE;UNICODE;SHIBSP_LITE;_DEBUG"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1D.lib xerces-c_2D.lib xmltooling-lite1D.lib wsock32.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName)1_1D.dll"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               ImportLibrary="$(TargetDir)$(ProjectName)1D.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
                        Name="Release|Win32"\r
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
                        IntermediateDirectory="$(ProjectName)-$(ConfigurationName)"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalDependencies="log4shib1.lib xerces-c_2.lib xmltooling-lite1.lib wsock32.lib"\r
-                               OutputFile="$(OutDir)\$(ProjectName)1_0.dll"\r
+                               OutputFile="$(OutDir)\$(ProjectName)1_1.dll"\r
                                LinkIncremental="1"\r
                                AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(ConfigurationName)"\r
-                               GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                OptimizeReferences="2"\r
                                EnableCOMDATFolding="2"\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ProjectName)-$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".;..;..\..\cpp-xmltooling"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WANT_TCP_SHAR;SHIBSP_LITE"\r
+                               RuntimeLibrary="2"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_UNICODE;UNICODE;SHIBSP_LITE"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1.lib xerces-c_2.lib xmltooling-lite1.lib wsock32.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName)1_1.dll"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               ImportLibrary="$(TargetDir)$(ProjectName)1.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
        </Configurations>\r
        <References>\r
        </References>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\ApplicationAwarePlugin.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\base.h"\r
                                >\r
                        </File>\r
index a74a740..5f8cda8 100644 (file)
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //\r
 \r
 VS_VERSION_INFO VERSIONINFO\r
- FILEVERSION 1,0,0,0\r
- PRODUCTVERSION 2,0,0,0\r
+ FILEVERSION 1,1,0,0\r
+ PRODUCTVERSION 2,1,0,0\r
  FILEFLAGSMASK 0x3fL\r
 #ifdef _DEBUG\r
  FILEFLAGS 0x1L\r
@@ -51,38 +51,38 @@ BEGIN
 #else\r
             VALUE "FileDescription", "Shibboleth SP Library\0"\r
 #endif\r
-            VALUE "FileVersion", "1, 0, 0, 0\0"\r
+            VALUE "FileVersion", "1, 1, 0, 0\0"\r
 #ifdef SHIBSP_LITE\r
 #ifdef _DEBUG\r
-            VALUE "InternalName", "shibsp-lite1_0D\0"\r
+            VALUE "InternalName", "shibsp-lite1_1D\0"\r
 #else\r
-            VALUE "InternalName", "shibsp-lite1_0\0"\r
+            VALUE "InternalName", "shibsp-lite1_1\0"\r
 #endif\r
 #else\r
 #ifdef _DEBUG\r
-            VALUE "InternalName", "shibsp1_0D\0"\r
+            VALUE "InternalName", "shibsp1_1D\0"\r
 #else\r
-            VALUE "InternalName", "shibsp1_0\0"\r
+            VALUE "InternalName", "shibsp1_1\0"\r
 #endif\r
 #endif\r
-            VALUE "LegalCopyright", "Copyright Â© 2007 Internet2\0"\r
+            VALUE "LegalCopyright", "Copyright Â© 2008 Internet2\0"\r
             VALUE "LegalTrademarks", "\0"\r
 #ifdef SHIBSP_LITE\r
 #ifdef _DEBUG\r
-            VALUE "OriginalFilename", "shibsp-lite1_0D.dll\0"\r
+            VALUE "OriginalFilename", "shibsp-lite1_1D.dll\0"\r
 #else\r
-            VALUE "OriginalFilename", "shibsp-lite1_0.dll\0"\r
+            VALUE "OriginalFilename", "shibsp-lite1_1.dll\0"\r
 #endif\r
 #else\r
 #ifdef _DEBUG\r
-            VALUE "OriginalFilename", "shibsp1_0D.dll\0"\r
+            VALUE "OriginalFilename", "shibsp1_1D.dll\0"\r
 #else\r
-            VALUE "OriginalFilename", "shibsp1_0.dll\0"\r
+            VALUE "OriginalFilename", "shibsp1_1.dll\0"\r
 #endif\r
 #endif\r
             VALUE "PrivateBuild", "\0"\r
-            VALUE "ProductName", "Shibboleth 2.0\0"\r
-            VALUE "ProductVersion", "2, 0, 0, 0\0"\r
+            VALUE "ProductName", "Shibboleth 2.1\0"\r
+            VALUE "ProductVersion", "2, 1, 0, 0\0"\r
             VALUE "SpecialBuild", "\0"\r
         END\r
     END\r
index c8d78c2..bb58f7e 100644 (file)
@@ -11,6 +11,9 @@
                <Platform\r
                        Name="Win32"\r
                />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
        </Platforms>\r
        <ToolFiles>\r
        </ToolFiles>\r
@@ -63,7 +66,7 @@
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalDependencies="log4shib1D.lib xerces-c_2D.lib xsec_1D.lib saml2D.lib xmltooling1D.lib wsock32.lib"\r
-                               OutputFile="$(OutDir)\$(ProjectName)1_0D.dll"\r
+                               OutputFile="$(OutDir)\$(ProjectName)1_1D.dll"\r
                                LinkIncremental="2"\r
                                AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(ConfigurationName);..\..\cpp-xmltooling\$(ConfigurationName)"\r
                                GenerateDebugInformation="true"\r
                        />\r
                </Configuration>\r
                <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-opensaml2&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;WANT_TCP_SHAR"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_UNICODE;UNICODE;_DEBUG"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1D.lib xerces-c_2D.lib xsec_1D.lib saml2D.lib xmltooling1D.lib wsock32.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName)1_1D.dll"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(PlatformName)\$(ConfigurationName);..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               ImportLibrary="$(TargetDir)$(ProjectName)1D.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
                        Name="Release|Win32"\r
                        OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
                        IntermediateDirectory="$(ConfigurationName)"\r
                        <Tool\r
                                Name="VCLinkerTool"\r
                                AdditionalDependencies="log4shib1.lib xerces-c_2.lib xsec_1.lib saml2.lib xmltooling1.lib wsock32.lib"\r
-                               OutputFile="$(OutDir)\$(ProjectName)1_0.dll"\r
+                               OutputFile="$(OutDir)\$(ProjectName)1_1.dll"\r
                                LinkIncremental="1"\r
                                AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(ConfigurationName);..\..\cpp-xmltooling\$(ConfigurationName)"\r
-                               GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                OptimizeReferences="2"\r
                                EnableCOMDATFolding="2"\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-opensaml2&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WANT_TCP_SHAR"\r
+                               RuntimeLibrary="2"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1.lib xerces-c_2.lib xsec_1.lib saml2.lib xmltooling1.lib wsock32.lib"\r
+                               OutputFile="$(OutDir)\$(ProjectName)1_1.dll"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(PlatformName)\$(ConfigurationName);..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               ImportLibrary="$(TargetDir)$(ProjectName)1.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
        </Configurations>\r
        <References>\r
        </References>\r
                                Name="metadata"\r
                                >\r
                                <File\r
+                                       RelativePath=".\metadata\DynamicMetadataProvider.cpp"\r
+                                       >\r
+                               </File>\r
+                               <File\r
                                        RelativePath=".\metadata\MetadataExtImpl.cpp"\r
                                        >\r
                                </File>\r
                                        >\r
                                </File>\r
                                <File\r
+                                       RelativePath=".\attribute\NameIDFromScopedAttributeDecoder.cpp"\r
+                                       >\r
+                               </File>\r
+                               <File\r
                                        RelativePath=".\attribute\ScopedAttributeDecoder.cpp"\r
                                        >\r
                                </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath=".\ApplicationAwarePlugin.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath=".\base.h"\r
                                >\r
                        </File>\r
                                        RelativePath=".\security\SecurityPolicy.h"\r
                                        >\r
                                </File>\r
-                               <Filter\r
-                                       Name="metadata"\r
-                                       >\r
-                                       <File\r
-                                               RelativePath=".\metadata\MetadataExt.h"\r
-                                               >\r
-                                       </File>\r
-                               </Filter>\r
                        </Filter>\r
                        <Filter\r
                                Name="remoting"\r
                                        >\r
                                </File>\r
                        </Filter>\r
+                       <Filter\r
+                               Name="metadata"\r
+                               >\r
+                               <File\r
+                                       RelativePath=".\metadata\MetadataExt.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath=".\metadata\MetadataProviderCriteria.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
                </Filter>\r
                <Filter\r
                        Name="Resource Files"\r
index 17ab6e3..8836d4a 100644 (file)
@@ -39,7 +39,7 @@
 
 #define SHIBSP_VERSION_MAJOR 1
 #define SHIBSP_VERSION_MINOR 0
-#define SHIBSP_VERSION_REVISION 0
+#define SHIBSP_VERSION_REVISION 1
 
 /** DO NOT MODIFY BELOW THIS LINE */
 
index f672466..b9ced07 100644 (file)
@@ -45,7 +45,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libtool.m4 \
        $(top_srcdir)/acx_pthread.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
@@ -101,6 +101,8 @@ BUILD_AP22_FALSE = @BUILD_AP22_FALSE@
 BUILD_AP22_TRUE = @BUILD_AP22_TRUE@
 BUILD_FASTCGI_FALSE = @BUILD_FASTCGI_FALSE@
 BUILD_FASTCGI_TRUE = @BUILD_FASTCGI_TRUE@
+BUILD_MEMCACHED_FALSE = @BUILD_MEMCACHED_FALSE@
+BUILD_MEMCACHED_TRUE = @BUILD_MEMCACHED_TRUE@
 BUILD_NSAPI_FALSE = @BUILD_NSAPI_FALSE@
 BUILD_NSAPI_TRUE = @BUILD_NSAPI_TRUE@
 CC = @CC@
@@ -186,6 +188,9 @@ LOG4CPP_CONFIG = @LOG4CPP_CONFIG@
 LOG4SHIB_CONFIG = @LOG4SHIB_CONFIG@
 LTLIBOBJS = @LTLIBOBJS@
 MAKEINFO = @MAKEINFO@
+MEMCACHED_INCLUDE = @MEMCACHED_INCLUDE@
+MEMCACHED_LDFLAGS = @MEMCACHED_LDFLAGS@
+MEMCACHED_LIBS = @MEMCACHED_LIBS@
 NSAPI_INCLUDE = @NSAPI_INCLUDE@
 OBJEXT = @OBJEXT@
 ODBC_CFLAGS = @ODBC_CFLAGS@
index 00e1e49..33435cc 100644 (file)
@@ -35,6 +35,7 @@
 #include <shibsp/exceptions.h>\r
 #include <shibsp/SPConfig.h>\r
 #include <shibsp/ServiceProvider.h>\r
+#include <shibsp/metadata/MetadataProviderCriteria.h>\r
 #include <shibsp/util/SPConstants.h>\r
 #include <saml/saml2/metadata/Metadata.h>\r
 #include <xmltooling/logging.h>\r
@@ -106,7 +107,7 @@ int main(int argc,char* argv[])
     XMLToolingConfig::getConfig().log_config(getenv("SHIBSP_LOGGING") ? getenv("SHIBSP_LOGGING") : SHIBSP_LOGGING);\r
 \r
     SPConfig& conf=SPConfig::getConfig();\r
-    conf.setFeatures(SPConfig::Metadata | SPConfig::OutOfProcess);\r
+    conf.setFeatures(SPConfig::Metadata | SPConfig::Trust | SPConfig::OutOfProcess | SPConfig::Credentials);\r
     if (!conf.init(path))\r
         return -1;\r
 \r
@@ -153,7 +154,7 @@ int main(int argc,char* argv[])
     }\r
 \r
     app->getMetadataProvider()->lock();\r
-    MetadataProvider::Criteria mc(entityID, NULL, NULL, strict);\r
+    MetadataProviderCriteria mc(*app, entityID, NULL, NULL, strict);\r
     if (rname) {\r
         const XMLCh* ns = rns ? XMLString::transcode(rns) : samlconstants::SAML20MD_NS;\r
         auto_ptr_XMLCh n(rname);\r
index 5992811..5240966 100644 (file)
@@ -10,6 +10,9 @@
                <Platform\r
                        Name="Win32"\r
                />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
        </Platforms>\r
        <ToolFiles>\r
        </ToolFiles>\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-opensaml2&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               RuntimeTypeInfo="true"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1.lib saml2.lib xmltooling1.lib xerces-c_2.lib"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(PlatformName)\$(ConfigurationName);..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               SubSystem="1"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-opensaml2&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               RuntimeTypeInfo="true"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1D.lib saml2D.lib xmltooling1D.lib xerces-c_2D.lib"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(PlatformName)\$(ConfigurationName);..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
        </Configurations>\r
        <References>\r
        </References>\r
index 6e589f7..43a0e49 100644 (file)
@@ -38,6 +38,7 @@
 #include <shibsp/attribute/Attribute.h>
 #include <shibsp/attribute/resolver/ResolutionContext.h>
 #include <shibsp/handler/AssertionConsumerService.h>
+#include <shibsp/metadata/MetadataProviderCriteria.h>
 #include <shibsp/util/SPConstants.h>
 
 #include <saml/saml1/core/Assertions.h>
@@ -216,7 +217,7 @@ int main(int argc,char* argv[])
 
             MetadataProvider* m=app->getMetadataProvider();
             xmltooling::Locker mlocker(m);
-            MetadataProvider::Criteria mc(i_param, &IDPSSODescriptor::ELEMENT_QNAME, protocol);
+            MetadataProviderCriteria mc(*app, i_param, &IDPSSODescriptor::ELEMENT_QNAME, protocol);
             pair<const EntityDescriptor*,const RoleDescriptor*> site=m->getEntityDescriptor(mc);
             if (!site.first)
                 throw MetadataException("Unable to locate metadata for IdP ($1).", params(1,i_param));
@@ -287,7 +288,7 @@ int main(int argc,char* argv[])
 
             MetadataProvider* m=app->getMetadataProvider();
             xmltooling::Locker mlocker(m);
-            MetadataProvider::Criteria mc(issuer, &IDPSSODescriptor::ELEMENT_QNAME, protocol);
+            MetadataProviderCriteria mc(*app, issuer, &IDPSSODescriptor::ELEMENT_QNAME, protocol);
             pair<const EntityDescriptor*,const RoleDescriptor*> site=m->getEntityDescriptor(mc);
             if (!site.first) {
                 auto_ptr_char temp(issuer);
index a8600d1..4ced967 100644 (file)
@@ -10,6 +10,9 @@
                <Platform\r
                        Name="Win32"\r
                />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
        </Platforms>\r
        <ToolFiles>\r
        </ToolFiles>\r
                                Name="VCPostBuildEventTool"\r
                        />\r
                </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-opensaml2&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="2"\r
+                               EnableFunctionLevelLinking="true"\r
+                               RuntimeTypeInfo="true"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1.lib saml2.lib xmltooling1.lib xerces-c_2.lib"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(PlatformName)\$(ConfigurationName);..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               SubSystem="1"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
+                       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                               HeaderFileName=""\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".;..;&quot;..\..\cpp-opensaml2&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="_CONSOLE;WIN32;_DEBUG"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               RuntimeTypeInfo="true"\r
+                               BrowseInformation="1"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="log4shib1D.lib saml2D.lib xmltooling1D.lib xerces-c_2D.lib"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="..\..\cpp-opensaml2\$(PlatformName)\$(ConfigurationName);..\..\cpp-xmltooling\$(PlatformName)\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
        </Configurations>\r
        <References>\r
        </References>\r