view src/opendiameter-1.0.7-i-tls.patch @ 0:9e5a3c884de6

Initial import of the virtual testbed.
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 17 Jun 2010 11:00:32 +0900
parents
children
line wrap: on
line source

diff -Nur opendiameter-1.0.7-i/applications/pana/Makefile.am opendiameter-1.0.7-i-tls/applications/pana/Makefile.am
--- opendiameter-1.0.7-i/applications/pana/Makefile.am	2007-03-01 08:26:40.000000000 +0900
+++ opendiameter-1.0.7-i-tls/applications/pana/Makefile.am	2010-04-26 14:42:42.000000000 +0900
@@ -14,11 +14,11 @@
 AM_LDFLAGS = @L_LDFLAGS@
 
 # Distribution
-if compile_EAPTLS
-noinst_PROGRAMS = pacd client_pana_eaptls
-else
+# if compile_EAPTLS
+# noinst_PROGRAMS = pacd client_pana_eaptls
+# else
 noinst_PROGRAMS = pacd
-endif
+# endif
 
 pacd_SOURCES = pacd.cxx pacd_config.cxx pacd_config.h
 pacd_LDADD = @L_LIBS@ \
@@ -29,8 +29,9 @@
              $(top_builddir)/libodutl/libodutl.la
 
 if compile_EAPTLS
-client_pana_eaptls_SOURCES = client_pana_eap-tls.cxx
+# client_pana_eaptls_SOURCES = client_pana_eap-tls.cxx
 client_pana_eaptls_LDADD = @L_LIBS@ \
+		-lxerces-c	\
              $(top_builddir)/libpana/libpana.la \
              $(top_builddir)/libeap/libeap.la \
              $(top_builddir)/libeap/libeaparchie.la \
diff -Nur opendiameter-1.0.7-i/applications/pana/Makefile.in opendiameter-1.0.7-i-tls/applications/pana/Makefile.in
--- opendiameter-1.0.7-i/applications/pana/Makefile.in	2007-03-01 08:31:02.000000000 +0900
+++ opendiameter-1.0.7-i-tls/applications/pana/Makefile.in	2010-04-26 14:42:42.000000000 +0900
@@ -34,9 +34,7 @@
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-@compile_EAPTLS_FALSE@noinst_PROGRAMS = pacd$(EXEEXT)
-@compile_EAPTLS_TRUE@noinst_PROGRAMS = pacd$(EXEEXT) \
-@compile_EAPTLS_TRUE@	client_pana_eaptls$(EXEEXT)
+noinst_PROGRAMS = pacd$(EXEEXT)
 subdir = applications/pana
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -46,17 +44,6 @@
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
-am__client_pana_eaptls_SOURCES_DIST = client_pana_eap-tls.cxx
-@compile_EAPTLS_TRUE@am_client_pana_eaptls_OBJECTS =  \
-@compile_EAPTLS_TRUE@	client_pana_eap-tls.$(OBJEXT)
-client_pana_eaptls_OBJECTS = $(am_client_pana_eaptls_OBJECTS)
-@compile_EAPTLS_TRUE@client_pana_eaptls_DEPENDENCIES =  \
-@compile_EAPTLS_TRUE@	$(top_builddir)/libpana/libpana.la \
-@compile_EAPTLS_TRUE@	$(top_builddir)/libeap/libeap.la \
-@compile_EAPTLS_TRUE@	$(top_builddir)/libeap/libeaparchie.la \
-@compile_EAPTLS_TRUE@	$(top_builddir)/libeap/libeaptls.la \
-@compile_EAPTLS_TRUE@	$(top_builddir)/libdiamparser/libdiamparser.la \
-@compile_EAPTLS_TRUE@	$(top_builddir)/libodutl/libodutl.la
 am_pacd_OBJECTS = pacd.$(OBJEXT) pacd_config.$(OBJEXT)
 pacd_OBJECTS = $(am_pacd_OBJECTS)
 pacd_DEPENDENCIES = $(top_builddir)/libpana/libpana.la \
@@ -83,8 +70,8 @@
 CCLD = $(CC)
 LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(client_pana_eaptls_SOURCES) $(pacd_SOURCES)
-DIST_SOURCES = $(am__client_pana_eaptls_SOURCES_DIST) $(pacd_SOURCES)
+SOURCES = $(pacd_SOURCES)
+DIST_SOURCES = $(pacd_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -214,6 +201,7 @@
               -D@HOST_OS@
 
 AM_LDFLAGS = @L_LDFLAGS@
+# endif
 pacd_SOURCES = pacd.cxx pacd_config.cxx pacd_config.h
 pacd_LDADD = @L_LIBS@ \
              $(top_builddir)/libpana/libpana.la \
@@ -222,8 +210,10 @@
              $(top_builddir)/libdiamparser/libdiamparser.la \
              $(top_builddir)/libodutl/libodutl.la
 
-@compile_EAPTLS_TRUE@client_pana_eaptls_SOURCES = client_pana_eap-tls.cxx
+
+# client_pana_eaptls_SOURCES = client_pana_eap-tls.cxx
 @compile_EAPTLS_TRUE@client_pana_eaptls_LDADD = @L_LIBS@ \
+@compile_EAPTLS_TRUE@		-lxerces-c	\
 @compile_EAPTLS_TRUE@             $(top_builddir)/libpana/libpana.la \
 @compile_EAPTLS_TRUE@             $(top_builddir)/libeap/libeap.la \
 @compile_EAPTLS_TRUE@             $(top_builddir)/libeap/libeaparchie.la \
@@ -271,9 +261,6 @@
 	  echo " rm -f $$p $$f"; \
 	  rm -f $$p $$f ; \
 	done
-client_pana_eaptls$(EXEEXT): $(client_pana_eaptls_OBJECTS) $(client_pana_eaptls_DEPENDENCIES) 
-	@rm -f client_pana_eaptls$(EXEEXT)
-	$(CXXLINK) $(client_pana_eaptls_LDFLAGS) $(client_pana_eaptls_OBJECTS) $(client_pana_eaptls_LDADD) $(LIBS)
 pacd$(EXEEXT): $(pacd_OBJECTS) $(pacd_DEPENDENCIES) 
 	@rm -f pacd$(EXEEXT)
 	$(CXXLINK) $(pacd_LDFLAGS) $(pacd_OBJECTS) $(pacd_LDADD) $(LIBS)
@@ -284,7 +271,6 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client_pana_eap-tls.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pacd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pacd_config.Po@am__quote@
 
diff -Nur opendiameter-1.0.7-i/libdiametereap/Makefile.am opendiameter-1.0.7-i-tls/libdiametereap/Makefile.am
--- opendiameter-1.0.7-i/libdiametereap/Makefile.am	2007-02-14 00:53:56.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libdiametereap/Makefile.am	2010-04-26 14:42:42.000000000 +0900
@@ -49,6 +49,7 @@
 
 if compile_EAPTLS
 LDADD = @L_LIBS@ \
+	-lxerces-c	\
         $(top_builddir)/libdiametereap/libdiametereap.la \
 	$(top_builddir)/libdiameter/libdiameter.la \
 	$(top_builddir)/libdiamparser/libdiamparser.la \
diff -Nur opendiameter-1.0.7-i/libdiametereap/Makefile.in opendiameter-1.0.7-i-tls/libdiametereap/Makefile.in
--- opendiameter-1.0.7-i/libdiametereap/Makefile.in	2007-03-01 08:31:03.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libdiametereap/Makefile.in	2010-04-26 14:42:42.000000000 +0900
@@ -316,6 +316,7 @@
 @compile_EAPTLS_FALSE@	$(top_builddir)/libodutl/libodutl.la
 
 @compile_EAPTLS_TRUE@LDADD = @L_LIBS@ \
+@compile_EAPTLS_TRUE@	-lxerces-c	\
 @compile_EAPTLS_TRUE@        $(top_builddir)/libdiametereap/libdiametereap.la \
 @compile_EAPTLS_TRUE@	$(top_builddir)/libdiameter/libdiameter.la \
 @compile_EAPTLS_TRUE@	$(top_builddir)/libdiamparser/libdiamparser.la \
diff -Nur opendiameter-1.0.7-i/libdiametereap/test/server_test_tls.cxx opendiameter-1.0.7-i-tls/libdiametereap/test/server_test_tls.cxx
--- opendiameter-1.0.7-i/libdiametereap/test/server_test_tls.cxx	2007-03-02 01:46:38.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libdiametereap/test/server_test_tls.cxx	2010-04-26 16:56:34.000000000 +0900
@@ -180,13 +180,13 @@
 protected:
   std::string& InputConfigFile()
   {
-    std::cout << "Received an Tls-Request "<< std::endl;
-      
+       
 //    static std::string configFile;
 //    std::cout << "Input config filename (within 10sec.): " << std::endl;
 //    std::cin >> configFile;
 //    std::cout << "Config file name = " << configFile << std::endl;
 static std::string configFile("./config/server.eap-tls.xml");
+   std::cout << "Requested EAP conf file, giving config/server.eap-tls.xml "<< std::endl;
     return configFile;
 }
 
@@ -250,7 +250,8 @@
 
   void Start() throw(AAA_Error)
   { 
-    DiameterEapServerSession::Start(); 
+   std::cout << "Diameter EAP server session Start." << std::endl;
+     DiameterEapServerSession::Start(); 
   }
 
   /// This virtual function is called when an EAP server session is
@@ -276,10 +277,7 @@
 	(DiameterScholarAttribute<diameter_octetstring_t> &eapMasterSessionKey)
     {
 	std::cout << "Setting master session key" << std::endl;
-	if (userNameValidate)
-	{
-	    eapMasterSessionKey.Set (((MyEapAuthTlsStateMachine &) (eap->MethodStateMachine ())).MSK ());
-	}
+        eapMasterSessionKey.Set (((MyEapAuthTlsStateMachine &) (eap->MethodStateMachine ())).MSK ());
 	return true;
     }
 // End New
@@ -295,7 +293,8 @@
       return false;
 #endif
 // New
-    userNameValidate = (userName == "ohba");
+   std::cout << "Validate Username (always OK in test) : " << userName << std::endl;
+    userNameValidate = true;
     return userNameValidate;
 // End New
   }
@@ -392,12 +391,30 @@
 typedef AAAServerSessionClassFactory<MyDiameterEapServerSession> 
 MyServerFactory;
 
+/***************** Accoutning ********************/
+
+class MyAAAAccountingServerSession : public AAAAccountingServerSession
+{
+ public:
+  MyAAAAccountingServerSession(AAAApplicationCore& appCore, 
+			     diameter_unsigned32_t appId) 
+    : AAAAccountingServerSession(appCore, appId)
+  {
+   std::cout << "Accounting server session class instantiated."<< std::endl;
+  }
+
+};
+
+typedef AAAServerSessionClassFactory<MyAAAAccountingServerSession> 
+        MyAcctServerFactory;
+
+
+/*******************************************************************/
 class MyInitializer
 {
  public:
   MyInitializer(AAA_Task &t, AAAApplicationCore &appCore) 
-    : task(t), applicationCore(appCore), 
-      myAuthFactory(MyServerFactory(appCore, 2000))
+    : task(t), applicationCore(appCore)
   {
     Start();
   }
@@ -412,7 +429,16 @@
   void Start()
   {
     InitEap();
-    applicationCore.RegisterServerSessionFactory(&myAuthFactory);
+    
+   m_AuthFactory = std::auto_ptr<MyServerFactory>
+         (new MyServerFactory(applicationCore, EapApplicationId));
+
+   applicationCore.RegisterServerSessionFactory(m_AuthFactory.get());
+
+   m_AcctFactory = std::auto_ptr<MyAcctServerFactory>
+         (new MyAcctServerFactory(applicationCore, (diameter_unsigned32_t)3));
+
+   applicationCore.RegisterServerSessionFactory(m_AcctFactory.get());
   }
 
   void Stop() {}
@@ -427,7 +453,7 @@
   methodRegistrar.registerMethod
     (std::string("TLS"), EapType(TLS_METHOD_TYPE), 
      Authenticator, myAuthTlsCreator);
-  }
+ }
 
   AAA_Task &task;
   AAAApplicationCore &applicationCore;
@@ -439,7 +465,8 @@
   EapMethodStateMachineCreator<MyEapAuthIdentityStateMachine> 
   myAuthIdentityCreator;
 
-  MyServerFactory myAuthFactory;
+      std::auto_ptr<MyServerFactory> m_AuthFactory;
+      std::auto_ptr<MyAcctServerFactory> m_AcctFactory;
 };
 
 int
@@ -462,7 +489,8 @@
 	exit(1);
       }
   MyInitializer initializer(task, applicationCore);
-
+    AAA_LOG((LM_DEBUG, "Test Application initialized\n"));
+ 
   while (1) 
       ACE_OS::sleep(1);
   return 0;
diff -Nur opendiameter-1.0.7-i/libeap/eap-tls/eap_tls_mng.cxx opendiameter-1.0.7-i-tls/libeap/eap-tls/eap_tls_mng.cxx
--- opendiameter-1.0.7-i/libeap/eap-tls/eap_tls_mng.cxx	2007-03-02 02:16:49.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libeap/eap-tls/eap_tls_mng.cxx	2010-04-26 14:42:42.000000000 +0900
@@ -209,8 +209,8 @@
   std::string random_file = conf.get_random_file();
 	if (!(RAND_load_file(random_file.c_str(), 1024*1024))) {
 		ERR_print_errors_fp(stderr);
-		EAP_LOG(LM_ERROR, "rlm_eap_tls: Error loading randomness");
-		return NULL;
+		EAP_LOG(LM_ERROR, "rlm_eap_tls: Error loading randomness, ignored\n");
+		// return NULL;
 	}
 
    SSL_CTX_set_session_id_context(ctx,(const unsigned char*)&session_id_context,sizeof session_id_context);
diff -Nur opendiameter-1.0.7-i/libeap/eap-tls/eap_tls_xml_parser.cxx opendiameter-1.0.7-i-tls/libeap/eap-tls/eap_tls_xml_parser.cxx
--- opendiameter-1.0.7-i/libeap/eap-tls/eap_tls_xml_parser.cxx	2007-03-02 01:46:38.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libeap/eap-tls/eap_tls_xml_parser.cxx	2010-04-26 14:42:42.000000000 +0900
@@ -30,8 +30,12 @@
 /*                                                                        */
 /* END_COPYRIGHT                                                          */
 
+/* For compilation */
+#include "../../libdiamparser/include/diameter_parser.h"
+
 #include "xml.h"
 #include "xml_errorreporter.h"
+
 #include "eap_tls_xml_parser.hxx"
 #include <xercesc/util/PlatformUtils.hpp>
 #include <xercesc/util/XMLString.hpp>
@@ -92,10 +96,10 @@
       XercesDOMParser parser;
       myDOMTreeErrorReporter errReporter;
 
-      parser.setValidationScheme(XercesDOMParser::Val_Always);
+      parser.setValidationScheme(XercesDOMParser::Val_Auto);
       parser.setDoNamespaces(true);
       parser.setDoSchema(true);
-      parser.setErrorHandler(&errReporter);
+      //parser.setErrorHandler(&errReporter);
 
       try {
          parser.parse(filename.data());
diff -Nur opendiameter-1.0.7-i/libeap/include/eap_tls_data_defs.hxx opendiameter-1.0.7-i-tls/libeap/include/eap_tls_data_defs.hxx
--- opendiameter-1.0.7-i/libeap/include/eap_tls_data_defs.hxx	2007-03-02 01:47:11.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libeap/include/eap_tls_data_defs.hxx	2010-04-26 14:42:42.000000000 +0900
@@ -41,6 +41,10 @@
 //#include "rbtree.h"
 #include "ace/Singleton.h"
 
+/* For compilation */
+#include "../../libdiamparser/include/diameter_parser.h"
+
+
 //
 // Definition of default values
 //
diff -Nur opendiameter-1.0.7-i/libeap/include/eap_tls_fsm.hxx opendiameter-1.0.7-i-tls/libeap/include/eap_tls_fsm.hxx
--- opendiameter-1.0.7-i/libeap/include/eap_tls_fsm.hxx	2007-03-02 02:16:38.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libeap/include/eap_tls_fsm.hxx	2010-04-26 14:42:42.000000000 +0900
@@ -200,6 +200,7 @@
 	if (parser.open(fname, rootData) != 0)
 	{
 		// TODO: Error message
+	        EAP_LOG(LM_DEBUG, "Error in input file\n");
 		return;
 	}
 
diff -Nur opendiameter-1.0.7-i/libeap/include/xml_errorreporter.h opendiameter-1.0.7-i-tls/libeap/include/xml_errorreporter.h
--- opendiameter-1.0.7-i/libeap/include/xml_errorreporter.h	1970-01-01 09:00:00.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libeap/include/xml_errorreporter.h	2010-04-26 14:42:42.000000000 +0900
@@ -0,0 +1,150 @@
+/* BEGIN_COPYRIGHT                                                        */
+/*                                                                        */
+/* Open Diameter: Open-source software for the Diameter and               */
+/*                Diameter related protocols                              */
+/*                                                                        */
+/* Copyright (C) 2002-2004 Open Diameter Project                          */
+/*                                                                        */
+/* This library is free software; you can redistribute it and/or modify   */
+/* it under the terms of the GNU Lesser General Public License as         */
+/* published by the Free Software Foundation; either version 2.1 of the   */
+/* License, or (at your option) any later version.                        */
+/*                                                                        */
+/* This library is distributed in the hope that it will be useful,        */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of         */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      */
+/* Lesser General Public License for more details.                        */
+/*                                                                        */
+/* You should have received a copy of the GNU Lesser General Public       */
+/* License along with this library; if not, write to the Free Software    */
+/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307    */
+/* USA.                                                                   */
+/*                                                                        */
+/* In addition, when you copy and redistribute some or the entire part of */
+/* the source code of this software with or without modification, you     */
+/* MUST include this copyright notice in each copy.                       */
+/*                                                                        */
+/* If you make any changes that are appeared to be useful, please send    */
+/* sources that include the changed part to                               */
+/* diameter-developers@lists.sourceforge.net so that we can reflect your  */
+/* changes to one unified version of this software.                       */
+/*                                                                        */
+/* END_COPYRIGHT                                                          */
+
+/*
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Xerces" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact apache\@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation, and was
+ * originally based on software copyright (c) 1999, International
+ * Business Machines, Inc., http://www.ibm.com .  For more information
+ * on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
+
+#include "../libdiamparser/include/diameter_parser_api.h"
+#include <xercesc/util/XercesDefs.hpp>
+#include <xercesc/sax/ErrorHandler.hpp>
+
+class AAA_PARSER_EXPORT myDOMTreeErrorReporter  : public ErrorHandler
+{
+public:
+    // -----------------------------------------------------------------------
+    //  Constructors and Destructor
+    // -----------------------------------------------------------------------
+/*
+    myDOMTreeErrorReporter (int i) :
+       fSawErrors(false)
+    {
+
+    }
+*/
+    myDOMTreeErrorReporter ()
+    {
+	fSawErrors = false;
+    }
+
+
+
+
+//    myDOMTreeErrorReporter ();
+
+    ~myDOMTreeErrorReporter ()
+    {
+    }
+
+    // -----------------------------------------------------------------------
+    //  Implementation of the error handler interface
+    // -----------------------------------------------------------------------
+    void warning(const SAXParseException& toCatch){};
+    void error(const SAXParseException& toCatch){};
+    void fatalError(const SAXParseException& toCatch){};
+    void resetErrors(){};
+
+    // -----------------------------------------------------------------------
+    //  Getter methods
+    // -----------------------------------------------------------------------
+    bool getSawErrors() const;
+
+    // -----------------------------------------------------------------------
+    //  Private data members
+    //
+    //  fSawErrors
+    //      This is set if we get any errors, and is queryable via a getter
+    //      method. Its used by the main code to suppress output if there are
+    //      errors.
+    // -----------------------------------------------------------------------
+    bool    fSawErrors;
+};
+
+inline bool myDOMTreeErrorReporter ::getSawErrors() const
+{
+    return fSawErrors;
+}
+
diff -Nur opendiameter-1.0.7-i/libeap/include/xml.h opendiameter-1.0.7-i-tls/libeap/include/xml.h
--- opendiameter-1.0.7-i/libeap/include/xml.h	1970-01-01 09:00:00.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libeap/include/xml.h	2010-04-26 14:42:42.000000000 +0900
@@ -0,0 +1,54 @@
+/* BEGIN_COPYRIGHT                                                        */
+/*                                                                        */
+/* Open Diameter: Open-source software for the Diameter and               */
+/*                Diameter related protocols                              */
+/*                                                                        */
+/* Copyright (C) 2002-2004 Open Diameter Project                          */
+/*                                                                        */
+/* This library is free software; you can redistribute it and/or modify   */
+/* it under the terms of the GNU Lesser General Public License as         */
+/* published by the Free Software Foundation; either version 2.1 of the   */
+/* License, or (at your option) any later version.                        */
+/*                                                                        */
+/* This library is distributed in the hope that it will be useful,        */
+/* but WITHOUT ANY WARRANTY; without even the implied warranty of         */
+/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU      */
+/* Lesser General Public License for more details.                        */
+/*                                                                        */
+/* You should have received a copy of the GNU Lesser General Public       */
+/* License along with this library; if not, write to the Free Software    */
+/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307    */
+/* USA.                                                                   */
+/*                                                                        */
+/* In addition, when you copy and redistribute some or the entire part of */
+/* the source code of this software with or without modification, you     */
+/* MUST include this copyright notice in each copy.                       */
+/*                                                                        */
+/* If you make any changes that are appeared to be useful, please send    */
+/* sources that include the changed part to                               */
+/* diameter-developers@lists.sourceforge.net so that we can reflect your  */
+/* changes to one unified version of this software.                       */
+/*                                                                        */
+/* END_COPYRIGHT                                                          */
+#ifndef __UTL_XML_H__
+#define __UTL_XML_H__
+
+#include <string>
+#include <xercesc/dom/DOM.hpp>
+#include "../libdiamparser/include/diameter_parser_api.h"
+
+#if defined(XERCES_HAS_CPP_NAMESPACE)
+using namespace xercesc;
+#endif
+
+class AAA_PARSER_EXPORT UtilXML
+{
+public:
+	static std::string getProp(const DOMNode *n, const char* name, char* const dflt);
+	static std::string getProp(const DOMNode *n, const char* name);
+	static bool matchNode(const DOMNode *n, const char* name);
+	static DOMNode* getNextElementNode(DOMNode *n);
+	static std::string transcodeFromXMLCh(const XMLCh*);
+};
+
+#endif // __UTL_XML_H__
diff -Nur opendiameter-1.0.7-i/libeap/Makefile.am opendiameter-1.0.7-i-tls/libeap/Makefile.am
--- opendiameter-1.0.7-i/libeap/Makefile.am	2007-02-14 00:53:56.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libeap/Makefile.am	2010-04-26 14:42:42.000000000 +0900
@@ -116,6 +116,7 @@
 libeaptls_la_LDFLAGS = -version-info 1:0:0 
 libeaptls_la_AR = $(AR) -qcs
 LDADD = @L_LIBS@ \
+	-lxerces-c	\
         $(top_builddir)/libeap/libeap.la \
         $(top_builddir)/libeap/libeaparchie.la \
         $(top_builddir)/libeap/libeaptls.la \
diff -Nur opendiameter-1.0.7-i/libeap/Makefile.in opendiameter-1.0.7-i-tls/libeap/Makefile.in
--- opendiameter-1.0.7-i/libeap/Makefile.in	2007-03-01 08:31:03.000000000 +0900
+++ opendiameter-1.0.7-i-tls/libeap/Makefile.in	2010-04-26 14:42:42.000000000 +0900
@@ -420,6 +420,7 @@
 @compile_EAPTLS_FALSE@        $(top_builddir)/libeap/libeaparchie.la
 
 @compile_EAPTLS_TRUE@LDADD = @L_LIBS@ \
+@compile_EAPTLS_TRUE@	-lxerces-c	\
 @compile_EAPTLS_TRUE@        $(top_builddir)/libeap/libeap.la \
 @compile_EAPTLS_TRUE@        $(top_builddir)/libeap/libeaparchie.la \
 @compile_EAPTLS_TRUE@        $(top_builddir)/libeap/libeaptls.la \
"Welcome to our mercurial repository"