Porting changes from 1.2 branch
authorScott Cantor <cantor.2@osu.edu>
Mon, 25 Oct 2004 03:14:39 +0000 (03:14 +0000)
committerScott Cantor <cantor.2@osu.edu>
Mon, 25 Oct 2004 03:14:39 +0000 (03:14 +0000)
xmlproviders/Makefile.am
xmlproviders/XMLTrust.cpp
xmlproviders/resource.h [new file with mode: 0644]
xmlproviders/xmlproviders.dsp
xmlproviders/xmlproviders.rc [new file with mode: 0644]

index f0b3051..c0d4653 100644 (file)
@@ -27,5 +27,5 @@ xmlproviders_la_LDFLAGS = -module -avoid-version
 install-exec-hook:
        for la in $(plugin_LTLIBRARIES) ; do rm -f $(DESTDIR)$(plugindir)/$$la ; done
 
-EXTRA_DIST = xmlproviders.dsp
+EXTRA_DIST = xmlproviders.dsp resource.h xmlproviders.rc
 
index d98ad06..e1d175c 100644 (file)
@@ -67,6 +67,7 @@
 #include <log4cpp/Category.hh>
 #include <xercesc/framework/URLInputSource.hpp>
 #include <xercesc/util/regx/RegularExpression.hpp>
+#include <xsec/enc/XSECCryptoException.hpp>
 #include <xsec/enc/XSECKeyInfoResolverDefault.hpp>
 
 using namespace shibboleth;
@@ -248,7 +249,7 @@ void XMLTrustImpl::init()
                 if (x)
                     ka->m_certs.push_back(x);
                 else
-                    log.warn("unable to create certificate from inline X509Certificate data");
+                    log.error("unable to create certificate from inline X509Certificate data");
             }
 
             // Now look for externally referenced objects.
@@ -269,7 +270,7 @@ void XMLTrustImpl::init()
                         else
                             log_openssl();
                     }
-                    log.warn("unable to create certificate from externally referenced file");
+                    log.error("unable to create certificate from externally referenced file");
                 }
                 else if (!XMLString::compareString(cert->getAttributeNS(NULL,SHIB_L(Type)),::XML::SHIB_RETMETHOD_PEMX509)) {
                     // PEM format
@@ -284,7 +285,7 @@ void XMLTrustImpl::init()
                         }
                     }
                     if (!count)
-                        log.warn("unable to create certificate from externally referenced file");
+                        log.error("unable to create certificate from externally referenced file");
                 }
             }
 
@@ -333,8 +334,13 @@ void XMLTrustImpl::init()
             DOMElement* child=saml::XML::getFirstChildElement(kidom);
             int count2=1;
             while (child) {
-                if (!KIL->addXMLKeyInfo(child))
-                    log.warn("skipped unsupported ds:KeyInfo child element (%d)",count2);
+                try {
+                    if (!KIL->addXMLKeyInfo(child))
+                        log.warn("skipped unsupported ds:KeyInfo child element (%d)",count2);
+                }
+                catch (XSECCryptoException& xe) {
+                    log.error("unable to resolve ds:KeyInfo child element (%d) to usable key: %s",count2,xe.getMsg());
+                }
                 child=saml::XML::getNextSiblingElement(child);
                 count2++;
             }
diff --git a/xmlproviders/resource.h b/xmlproviders/resource.h
new file mode 100644 (file)
index 0000000..8b3ea69
--- /dev/null
@@ -0,0 +1,15 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by xmlproviders.rc
+//
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        101
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1000
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
index 189c1bb..2eee85d 100644 (file)
@@ -97,6 +97,10 @@ SOURCE=.\internal.h
 # End Source File
 # Begin Source File
 
+SOURCE=.\resource.h
+# End Source File
+# Begin Source File
+
 SOURCE=.\ScopedAttribute.cpp
 # End Source File
 # Begin Source File
@@ -121,6 +125,10 @@ SOURCE=.\XMLProviders.cpp
 # End Source File
 # Begin Source File
 
+SOURCE=.\xmlproviders.rc
+# End Source File
+# Begin Source File
+
 SOURCE=.\XMLRevocation.cpp
 # End Source File
 # Begin Source File
diff --git a/xmlproviders/xmlproviders.rc b/xmlproviders/xmlproviders.rc
new file mode 100644 (file)
index 0000000..23361ae
--- /dev/null
@@ -0,0 +1,109 @@
+//Microsoft Developer Studio 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
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,2,1,0
+ PRODUCTVERSION 1,2,1,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "Comments", "\0"
+            VALUE "CompanyName", "UCAID\0"
+            VALUE "FileDescription", "Shibboleth Core Plugins\0"
+            VALUE "FileVersion", "1, 2, 1, 0\0"
+            VALUE "InternalName", "xmlproviders\0"
+            VALUE "LegalCopyright", "Copyright © 2004 UCAID\0"
+            VALUE "LegalTrademarks", "\0"
+            VALUE "OriginalFilename", "xmlproviders.so\0"
+            VALUE "PrivateBuild", "\0"
+            VALUE "ProductName", "Shibboleth 1.2.1\0"
+            VALUE "ProductVersion", "1, 2, 1, 0\0"
+            VALUE "SpecialBuild", "\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // !_MAC
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+