Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog33
-rw-r--r--configure.in111
-rw-r--r--doc/pending-classes.in246
-rw-r--r--man/gacutil.162
-rw-r--r--mcs/class/Mono.Security/ChangeLog4
-rwxr-xr-xmcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeBase.cs184
-rwxr-xr-xmcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeDeformatter.cs123
-rwxr-xr-xmcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs11
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Authenticode/ChangeLog6
-rw-r--r--mcs/class/Mono.Security/Mono.Security.X509/ChangeLog5
-rwxr-xr-xmcs/class/Mono.Security/Mono.Security.X509/X509Chain.cs9
-rwxr-xr-xmcs/class/Mono.Security/Mono.Security.X509/X509Store.cs31
-rw-r--r--mcs/class/Mono.Security/Mono.Security_test.dll.sources1
-rw-r--r--mcs/class/Mono.Security/Test/Mono.Security.Authenticode/AuthenticodeDeformatterTest.cs724
-rw-r--r--mcs/class/Mono.Security/Test/Mono.Security.Authenticode/ChangeLog4
-rw-r--r--mcs/class/System.Data/System.Data.Odbc/ChangeLog14
-rw-r--r--mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs21
-rw-r--r--mcs/class/System.Data/System.Data.Odbc/OdbcType.cs2
-rwxr-xr-xmcs/class/System.Data/System.Data.SqlClient/ChangeLog4
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs21
-rw-r--r--mcs/class/System.Data/Test/ChangeLog3
-rw-r--r--mcs/class/System.Data/Test/MySqlTestBed.cs15
-rw-r--r--mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog10
-rw-r--r--mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs4
-rw-r--r--mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataReaderTest.cs101
-rw-r--r--mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandTest.cs99
-rw-r--r--mcs/class/System.Drawing/System.Drawing/ChangeLog11
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Font.cs67
-rwxr-xr-xmcs/class/System.Drawing/System.Drawing/Graphics.cs13
-rwxr-xr-xmcs/class/System.Web.Services/System.Web.Services.Discovery/ChangeLog5
-rwxr-xr-xmcs/class/System.Web.Services/System.Web.Services.Discovery/ContractReference.cs2
-rwxr-xr-xmcs/class/System.Web.Services/System.Web.Services.Discovery/DiscoveryClientProtocol.cs4
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog5
-rwxr-xr-xmcs/class/System.Web.Services/System.Web.Services.Protocols/HttpSoapWebServiceHandler.cs5
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHandler.cs8
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services/ChangeLog6
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services/WebService.cs6
-rw-r--r--mcs/class/System.Web.Services/Test/standalone/ChangeLog4
-rw-r--r--mcs/class/System.Web.Services/Test/standalone/server/SessionCounter.asmx6
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs19
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs51
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/ChangeLog24
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/IImplicitResourceProvider.cs42
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/IResourceReader.cs39
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/ImplicitResourceKey.cs43
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/Location.cs5
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs13
-rw-r--r--mcs/class/System.Web/System.Web.Mail/ChangeLog7
-rw-r--r--mcs/class/System.Web/System.Web.Mail/MailMessage.cs5
-rw-r--r--mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs13
-rw-r--r--mcs/class/System.Web/System.Web.Mail/SmtpClient.cs6
-rw-r--r--mcs/class/System.Web/System.Web.Security/ChangeLog4
-rw-r--r--mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs2
-rw-r--r--mcs/class/System.Web/System.Web.SessionState/ChangeLog6
-rw-r--r--mcs/class/System.Web/System.Web.SessionState/HttpSessionState.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog15
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs30
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs4
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs30
-rw-r--r--mcs/class/System.Web/System.Web.UI/ChangeLog21
-rw-r--r--mcs/class/System.Web/System.Web.UI/Control.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/LiteralControl.cs96
-rw-r--r--mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs7
-rwxr-xr-xmcs/class/System.Web/System.Web.UI/TemplateParser.cs4
-rw-r--r--mcs/class/System.Web/System.Web/ChangeLog50
-rw-r--r--mcs/class/System.Web/System.Web/HttpApplication.cs10
-rw-r--r--mcs/class/System.Web/System.Web/HttpContext.cs6
-rw-r--r--mcs/class/System.Web/System.Web/HttpRuntime.cs51
-rw-r--r--mcs/class/System.Web/System.Web/HttpServerUtility.cs11
-rw-r--r--mcs/class/System.Web/System.Web/HttpStaticObjectsCollection.cs17
-rw-r--r--mcs/class/System.Web/System.Web/HttpValueCollection.cs2
-rw-r--r--mcs/class/System.Web/System.Web/QueueManager.cs52
-rw-r--r--mcs/class/System.Web/System.Web/TraceContext.cs6
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog5
-rwxr-xr-xmcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs20
-rw-r--r--mcs/class/System.XML/System.Xml.Schema/BuiltInDatatype.cs52
-rwxr-xr-xmcs/class/System.XML/System.Xml.Schema/ChangeLog11
-rwxr-xr-xmcs/class/System.XML/System.Xml.Schema/SchemaDataValueType.cs10
-rwxr-xr-xmcs/class/System.XML/System.Xml.Schema/XmlSchema.cs5
-rwxr-xr-xmcs/class/System.XML/System.Xml.Serialization/ChangeLog5
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs2
-rw-r--r--mcs/class/System.XML/System.Xml/ChangeLog23
-rw-r--r--mcs/class/System.XML/System.Xml/XmlAttribute.cs15
-rw-r--r--mcs/class/System.XML/System.Xml/XmlNode.cs2
-rw-r--r--mcs/class/System.XML/System.Xml/XmlTextReader.cs24
-rw-r--r--mcs/class/System.XML/System.Xml/XmlTextWriter.cs27
-rw-r--r--mcs/class/System.XML/System.Xml/XmlWriter.cs2
-rw-r--r--mcs/class/System/System.Diagnostics/ChangeLog14
-rwxr-xr-xmcs/class/System/System.Diagnostics/Process.cs43
-rwxr-xr-xmcs/class/System/System.IO/ChangeLog10
-rw-r--r--mcs/class/System/System.IO/FAMWatcher.cs10
-rw-r--r--mcs/class/System/System.IO/KeventWatcher.cs351
-rw-r--r--mcs/class/System/System.Net/ChangeLog4
-rw-r--r--mcs/class/System/System.Net/HttpWebResponse.cs14
-rwxr-xr-xmcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs184
-rwxr-xr-xmcs/class/corlib/Mono.Security.Authenticode/AuthenticodeDeformatter.cs124
-rwxr-xr-xmcs/class/corlib/Mono.Security.Authenticode/ChangeLog5
-rw-r--r--mcs/class/corlib/Mono.Security.X509/ChangeLog4
-rwxr-xr-xmcs/class/corlib/Mono.Security.X509/X509Chain.cs9
-rw-r--r--mcs/class/corlib/System.IO/ChangeLog8
-rwxr-xr-xmcs/class/corlib/System.IO/Stream.cs1
-rw-r--r--mcs/class/corlib/System.IO/StreamWriter.cs25
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ChangeLog11
-rwxr-xr-xmcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.cs18
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs3
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs3
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/ChangeLog6
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/UnmanagedType.cs1
-rw-r--r--mcs/class/corlib/System.Security.Cryptography.X509Certificates/ChangeLog4
-rw-r--r--mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs23
-rw-r--r--mcs/class/corlib/System.Threading/ChangeLog5
-rwxr-xr-xmcs/class/corlib/System.Threading/Timer.cs3
-rw-r--r--mcs/class/corlib/System/Activator.cs14
-rw-r--r--mcs/class/corlib/System/ChangeLog10
-rw-r--r--mcs/class/corlib/System/Environment.cs2
-rw-r--r--mcs/class/corlib/System/Random.cs2
-rw-r--r--mcs/ilasm/AssemblyInfo.cs2
-rw-r--r--mcs/mcs/AssemblyInfo.cs2
-rwxr-xr-xmcs/mcs/ChangeLog39
-rwxr-xr-xmcs/mcs/cs-parser.jay31
-rwxr-xr-xmcs/mcs/expression.cs50
-rwxr-xr-xmcs/tests/ChangeLog14
-rw-r--r--mcs/tests/Makefile5
-rw-r--r--mcs/tests/test-280.cs4
-rw-r--r--mcs/tests/test-290.cs14
-rw-r--r--mcs/tests/test-292.cs11
-rw-r--r--mcs/tools/mono-rpm-helpers/ChangeLog5
-rw-r--r--mcs/tools/mono-rpm-helpers/mono-find-provides/mono-find-provides.cs2
-rw-r--r--mcs/tools/security/ChangeLog5
-rwxr-xr-xmcs/tools/security/certmgr.cs34
-rw-r--r--mono/dis/get.c1
-rw-r--r--mono/interpreter/ChangeLog6
-rw-r--r--mono/interpreter/interp.c2
-rw-r--r--mono/interpreter/mintops.h10
-rw-r--r--mono/io-layer/ChangeLog34
-rw-r--r--mono/io-layer/daemon.c10
-rw-r--r--mono/io-layer/io.c35
-rw-r--r--mono/io-layer/mutexes.c20
-rw-r--r--mono/io-layer/threads.c12
-rw-r--r--mono/io-layer/timed-thread.c2
-rw-r--r--mono/io-layer/wait.c12
-rw-r--r--mono/metadata/ChangeLog88
-rw-r--r--mono/metadata/appdomain.c14
-rw-r--r--mono/metadata/class.c2
-rw-r--r--mono/metadata/debug-mono-symfile.c2
-rw-r--r--mono/metadata/gc.c70
-rw-r--r--mono/metadata/locales.c21
-rw-r--r--mono/metadata/marshal.c230
-rw-r--r--mono/metadata/object.c10
-rw-r--r--mono/metadata/object.h6
-rw-r--r--mono/metadata/process.c2
-rw-r--r--mono/metadata/reflection.c4
-rw-r--r--mono/metadata/socket-io.c52
-rw-r--r--mono/metadata/socket-io.h15
-rw-r--r--mono/mini/ChangeLog43
-rw-r--r--mono/mini/exceptions-x86.c6
-rw-r--r--mono/mini/inssel-ppc.brg20
-rw-r--r--mono/mini/inssel-x86.brg1
-rw-r--r--mono/mini/mini-ppc.c17
-rw-r--r--mono/mini/mini-s390.c2
-rw-r--r--mono/mini/mini-sparc.c1
-rw-r--r--mono/mini/mini.c94
-rw-r--r--mono/mini/mini.h1
-rw-r--r--mono/tests/Makefile.am1
-rw-r--r--mono/tests/libtest.c40
-rwxr-xr-xmono/tests/pinvoke2.cs18
-rwxr-xr-xmono/tests/pinvoke3.cs14
-rw-r--r--mono/tests/typeof-ptr.cs20
-rw-r--r--web/pending-classes.in246
-rw-r--r--web/web/masterinfos/.cvsignore1
-rw-r--r--web/web/masterinfos/Makefile96
172 files changed, 3699 insertions, 1601 deletions
diff --git a/ChangeLog b/ChangeLog
index cd09bef3dcd..7c4aa6bea3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,36 +1,3 @@
-2004-08-17 Dick Porter <dick@ximian.com>
-
- * configure.in: Correct intl library for FreeBSD and OpenBSD.
- Fixes bug 62884, patch by Tom McLaughlin (tmclaugh@sdf.lonestar.org).
-
-2004-07-27 John Merryweather Cooper <john_m_cooper@yahoo.com>
- * configure.in: Disable __thread test (TLS) for FreeBSD as
- it succeeds on FreeBSD 5.x when it should fail. Fix pthread
- library detection for FreeBSD 4.x since pthread is embedded
- in libc_r on this platform. Fix some typos in my host
- regexes for freebsd.
-
-2004-07-23 Dick Porter <dick@ximian.com>
-
- * configure.in: Changes for FreeBSD thread support by John
- Merryweather Cooper <john_m_cooper@yahoo.com>.
-
-2004-07-03 Zoltan Varga <vargaz@freemail.hu>
-
- * configure.in: Add --with-tls option to replace the misnamed
- --with-nptl option.
-
-2004-06-30 Zoltan Varga <vargaz@freemail.hu>
-
- * configure.in: Fix trunc check + add SPARC64 defines.
-
- * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
- delegates from a delegate. Fixes #61033.
-
-2004-06-29 Jackson Harper <jackson@ximian.com>
-
- * man/gacutil.1: Update man with new command line options.
-
2004-06-29 Raja R Harinath <rharinath@novell.com>
Atsushi Enomoto <atsushi@ximian.com>
diff --git a/configure.in b/configure.in
index 94361a0cb06..248763c5a0d 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono,1.0.1)
+AM_INIT_AUTOMAKE(mono,1.0)
AM_MAINTAINER_MODE
AC_PROG_LN_S
@@ -67,62 +67,7 @@ case "$host" in
libdl=
libgc_threads=no
;;
-# these flags will work for all versions of -STABLE
-#
- *-*-*freebsd4*)
- platform_win32=no
- if test "x$PTHREAD_CFLAGS" = "x"; then
- CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
- libmono_cflags="-D_THREAD_SAFE"
- else
- CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
- libmono_cflags="$PTHREAD_CFLAGS"
- fi
- if test "x$PTHREAD_LIBS" = "x"; then
- LDFLAGS="$LDFLAGS -pthread"
- libmono_ldflags="-pthread"
- else
- LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
- libmono_ldflags="$PTHREAD_LIBS"
- fi
- need_link_unlink=yes
- AC_DEFINE(PTHREAD_POINTER_ID)
- libdl=
- libgc_threads=pthreads
-# TLS isn't implemented at all on -STABLE
- with_nptl=no
- with_tls=pthread
- ;;
-# older versions of -CURRENT will break with these flags but testing
-# indicates these older versions won't run Mono anyway
-#
- *-*-*freebsd5*)
- platform_win32=no
- if test "x$PTHREAD_CFLAGS" = "x"; then
- CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
- libmono_cflags=
- else
- CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
- libmono_cflags="$PTHREAD_CFLAGS"
- fi
- if test "x$PTHREAD_LIBS" = "x"; then
- LDFLAGS="$LDFLAGS -lpthread"
- libmono_ldflags="-lpthread"
- else
- LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
- libmono_ldflags="$PTHREAD_LIBS"
- fi
- need_link_unlink=yes
- AC_DEFINE(PTHREAD_POINTER_ID)
- libdl=
- libgc_threads=pthreads
-# TLS is only partially implemented on -CURRENT (compiler support
-# but NOT library support)
-#
- with_nptl=no
- with_tls=pthread
- ;;
- *-*-*openbsd*)
+ *-*-*freebsd*|*-*-*openbsd*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
libmono_cflags="-D_THREAD_SAFE"
@@ -303,21 +248,9 @@ AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default]
# Enable support for fast thread-local storage
# Some systems have broken support, so we allow to disable it.
-AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage implementation],[],[with_tls=__thread])
-
-# Kept for compatibility
-AC_ARG_WITH(nptl, [ --with-nptl=yes,no deprecated, use --with-tls instead],[],[with_nptl=default])
-
-if test "x$with_nptl" != "xdefault"; then
- if test "x$with_nptl" = "xyes"; then
- AC_MSG_WARN([--with-nptl=yes is deprecated, use --with-tls=__thread option instead.])
- with_tls=__thread
- fi
- if test "x$with_nptl" = "xno"; then
- AC_MSG_WARN([--with-nptl=no is deprecated, use --with-tls=pthread option instead.])
- with_tls=pthread
- fi
-fi
+# This is misnamed: __thread support has no relation to NPTL,
+# but people already use it...
+AC_ARG_WITH(nptl, [ --with-nptl=yes,no enable/disable support for __thread support],[],[with_nptl=yes])
# Enable support for using sigaltstack for SIGSEGV and stack overflow handling
# This does not work on some platforms (bug #55253)
@@ -708,17 +641,7 @@ if test x$platform_win32 = xno; then
dnl *****************************
dnl *** Checks for libpthread ***
dnl *****************************
-# on FreeBSD -STABLE, the pthreads functions all reside in libc_r
-# and libpthread does not exist
-#
- case "${host}" in
- *-*-*freebsd4*)
- AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread")
- ;;
- *)
- AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
- ;;
- esac
+ AC_CHECK_LIB(pthread, main, LIBS="$LIBS -lpthread")
AC_CHECK_HEADERS(pthread.h)
AC_CHECK_FUNCS(pthread_mutex_timedlock)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np)
@@ -739,7 +662,7 @@ if test x$platform_win32 = xno; then
dnl *** Checks for working __thread ***
dnl ***********************************
AC_MSG_CHECKING(for working __thread)
- if test "x$with_tls" != "x__thread"; then
+ if test "x$with_nptl" != "xyes"; then
AC_MSG_RESULT(disabled)
else
AC_TRY_RUN([
@@ -1031,9 +954,8 @@ ac_cv_c_socklen_t=yes
])
AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
- # Simply calling trunc (0.0) is no good since gcc will optimize the call away
AC_TRY_LINK([#include <math.h>],
- [ static void *p = &trunc; ],
+ [ trunc(0.0); ],
[
AC_DEFINE(HAVE_TRUNC)
AC_MSG_RESULT(yes)
@@ -1174,11 +1096,7 @@ case "$host" in
JIT_SUPPORTED=no
;;
sparc*-*-*)
- if test "x$ac_cv_sizeof_void_p" = "x8"; then
- TARGET=SPARC64
- else
- TARGET=SPARC
- fi
+ TARGET=SPARC;
arch_target=sparc;
JIT_SUPPORTED=yes
ACCESS_UNALIGNED="no"
@@ -1266,14 +1184,6 @@ case "$host" in
LIBC="libc.so.12"
INTL="libintl.so.0"
;;
- *-*-*freebsd*)
- LIBC="libc.so"
- INTL="libintl.so"
- ;;
- *-*-*openbsd*)
- LIBC="libc.so"
- INTL="libintl.so"
- ;;
esac
AC_SUBST(libsuffix)
@@ -1317,7 +1227,6 @@ AM_CONDITIONAL(INSTALL_2_0, test x$PREVIEW = xyes)
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
-AM_CONDITIONAL(SPARC64, test x$TARGET = xSPARC64)
AM_CONDITIONAL(X86, test x$TARGET = xX86)
AM_CONDITIONAL(AMD64, test x$TARGET = xAMD64)
AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
@@ -1390,7 +1299,7 @@ echo "
GC: $gc
ICU: $enable_icu
- TLS: $with_tls
+ __thread: $with_nptl
SIGALTSTACK: $with_sigaltstack
Engine: $jit_status
2.0 Alpha: $PREVIEW
diff --git a/doc/pending-classes.in b/doc/pending-classes.in
new file mode 100644
index 00000000000..1cdb5a4cb36
--- /dev/null
+++ b/doc/pending-classes.in
@@ -0,0 +1,246 @@
+System.Object
+System.Exception
+System.ValueType
+System.Delegate
+System.MulticastDelegate
+System.Enum
+System.Activator
+System.ArgIterator
+System.__ComObject
+System.TypedReference
+System.Security.AllowPartiallyTrustedCallersAttribute
+System.Runtime.Serialization.Formatter
+System.Runtime.Serialization.FormatterConverter
+System.Runtime.Serialization.FormatterServices
+System.Runtime.Serialization.ObjectIDGenerator
+System.Runtime.Serialization.ObjectManager
+System.Reflection.ModuleResolveEventHandler
+System.Reflection.Pointer
+System.Globalization.CompareInfo
+System.Globalization.HebrewCalendar
+System.Globalization.HijriCalendar
+System.Globalization.JapaneseCalendar
+System.Globalization.KoreanCalendar
+System.Globalization.SortKey
+System.Globalization.StringInfo
+System.Globalization.TaiwanCalendar
+System.Globalization.TextElementEnumerator
+System.Globalization.TextInfo
+System.Globalization.ThaiBuddhistCalendar
+System.IO.IsolatedStorage.IsolatedStorageFile
+System.Reflection.Emit.MethodRental
+System.Runtime.CompilerServices.AccessedThroughPropertyAttribute
+System.Runtime.CompilerServices.CallConvCdecl
+System.Runtime.CompilerServices.CallConvStdcall
+System.Runtime.CompilerServices.CallConvThiscall
+System.Runtime.CompilerServices.CallConvFastcall
+System.Runtime.CompilerServices.CustomConstantAttribute
+System.Runtime.CompilerServices.DateTimeConstantAttribute
+System.Runtime.CompilerServices.DiscardableAttribute
+System.Runtime.CompilerServices.DecimalConstantAttribute
+System.Runtime.CompilerServices.CompilationRelaxationsAttribute
+System.Runtime.CompilerServices.CompilerGlobalScopeAttribute
+System.Runtime.CompilerServices.IDispatchConstantAttribute
+System.Runtime.CompilerServices.IsVolatile
+System.Runtime.CompilerServices.IUnknownConstantAttribute
+System.Runtime.CompilerServices.RequiredAttributeAttribute
+System.Runtime.InteropServices.ArrayWithOffset
+System.Runtime.InteropServices.DispIdAttribute
+System.Runtime.InteropServices.ClassInterfaceType
+System.Runtime.InteropServices.ClassInterfaceAttribute
+System.Runtime.InteropServices.ComVisibleAttribute
+System.Runtime.InteropServices.LCIDConversionAttribute
+System.Runtime.InteropServices.ComRegisterFunctionAttribute
+System.Runtime.InteropServices.ComUnregisterFunctionAttribute
+System.Runtime.InteropServices.ProgIdAttribute
+System.Runtime.InteropServices.ImportedFromTypeLibAttribute
+System.Runtime.InteropServices.IDispatchImplType
+System.Runtime.InteropServices.IDispatchImplAttribute
+System.Runtime.InteropServices.ComSourceInterfacesAttribute
+System.Runtime.InteropServices.ComConversionLossAttribute
+System.Runtime.InteropServices.TypeLibTypeFlags
+System.Runtime.InteropServices.TypeLibFuncFlags
+System.Runtime.InteropServices.TypeLibVarFlags
+System.Runtime.InteropServices.TypeLibTypeAttribute
+System.Runtime.InteropServices.TypeLibFuncAttribute
+System.Runtime.InteropServices.TypeLibVarAttribute
+System.Runtime.InteropServices.ComImportAttribute
+System.Runtime.InteropServices.PreserveSigAttribute
+System.Runtime.InteropServices.ComAliasNameAttribute
+System.Runtime.InteropServices.AutomationProxyAttribute
+System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute
+System.Runtime.InteropServices.CoClassAttribute
+System.Runtime.InteropServices.ComEventInterfaceAttribute
+System.Runtime.InteropServices.COMException
+System.Runtime.InteropServices.ComMemberType
+System.Runtime.InteropServices.CurrencyWrapper
+System.Runtime.InteropServices.DispatchWrapper
+System.Runtime.InteropServices.ErrorWrapper
+System.Runtime.InteropServices.ExtensibleClassFactory
+System.Runtime.InteropServices.HandleRef
+System.Runtime.InteropServices.InvalidComObjectException
+System.Runtime.InteropServices.InvalidOleVariantTypeException
+System.Runtime.InteropServices.TypeLibImporterFlags
+System.Runtime.InteropServices.ExporterEventKind
+System.Runtime.InteropServices.ITypeLibExporterNotifySink
+System.Runtime.InteropServices.ITypeLibConverter
+System.Runtime.InteropServices.MarshalDirectiveException
+System.Runtime.InteropServices.ObjectCreationDelegate
+System.Runtime.InteropServices.RuntimeEnvironment
+System.Runtime.InteropServices.RegistrationServices
+System.Runtime.InteropServices.SafeArrayRankMismatchException
+System.Runtime.InteropServices.SafeArrayTypeMismatchException
+System.Runtime.InteropServices.SEHException
+System.Runtime.InteropServices.TypeLibConverter
+System.Runtime.InteropServices.BIND_OPTS
+System.Runtime.InteropServices.UCOMIBindCtx
+System.Runtime.InteropServices.UCOMIConnectionPointContainer
+System.Runtime.InteropServices.UCOMIConnectionPoint
+System.Runtime.InteropServices.UCOMIEnumMoniker
+System.Runtime.InteropServices.CONNECTDATA
+System.Runtime.InteropServices.UCOMIEnumConnections
+System.Runtime.InteropServices.UCOMIEnumConnectionPoints
+System.Runtime.InteropServices.UCOMIEnumString
+System.Runtime.InteropServices.UCOMIEnumVARIANT
+System.Runtime.InteropServices.FILETIME
+System.Runtime.InteropServices.UCOMIMoniker
+System.Runtime.InteropServices.UCOMIPersistFile
+System.Runtime.InteropServices.UCOMIRunningObjectTable
+System.Runtime.InteropServices.STATSTG
+System.Runtime.InteropServices.UCOMIStream
+System.Runtime.InteropServices.DESCKIND
+System.Runtime.InteropServices.BINDPTR
+System.Runtime.InteropServices.UCOMITypeComp
+System.Runtime.InteropServices.TYPEKIND
+System.Runtime.InteropServices.TYPEFLAGS
+System.Runtime.InteropServices.IMPLTYPEFLAGS
+System.Runtime.InteropServices.TYPEATTR
+System.Runtime.InteropServices.FUNCDESC
+System.Runtime.InteropServices.IDLFLAG
+System.Runtime.InteropServices.IDLDESC
+System.Runtime.InteropServices.PARAMFLAG
+System.Runtime.InteropServices.PARAMDESC
+System.Runtime.InteropServices.TYPEDESC
+System.Runtime.InteropServices.ELEMDESC
+System.Runtime.InteropServices.VARDESC
+System.Runtime.InteropServices.DISPPARAMS
+System.Runtime.InteropServices.EXCEPINFO
+System.Runtime.InteropServices.FUNCKIND
+System.Runtime.InteropServices.INVOKEKIND
+System.Runtime.InteropServices.CALLCONV
+System.Runtime.InteropServices.FUNCFLAGS
+System.Runtime.InteropServices.VARFLAGS
+System.Runtime.InteropServices.UCOMITypeInfo
+System.Runtime.InteropServices.SYSKIND
+System.Runtime.InteropServices.LIBFLAGS
+System.Runtime.InteropServices.TYPELIBATTR
+System.Runtime.InteropServices.UCOMITypeLib
+System.Runtime.InteropServices.UnknownWrapper
+System.Runtime.Remoting.IObjectHandle
+System.Runtime.Remoting.IRemotingTypeInfo
+System.Runtime.Remoting.IChannelInfo
+System.Runtime.Remoting.IEnvoyInfo
+System.Runtime.Remoting.RemotingConfiguration
+System.Runtime.Remoting.TypeEntry
+System.Runtime.Remoting.ActivatedClientTypeEntry
+System.Runtime.Remoting.ActivatedServiceTypeEntry
+System.Runtime.Remoting.WellKnownClientTypeEntry
+System.Runtime.Remoting.WellKnownServiceTypeEntry
+System.Runtime.Remoting.RemotingException
+System.Runtime.Remoting.ServerException
+System.Runtime.Remoting.RemotingTimeoutException
+System.Runtime.Remoting.RemotingServices
+System.Runtime.Remoting.InternalRemotingServices
+System.Runtime.Remoting.SoapServices
+System.Runtime.Remoting.Activation.UrlAttribute
+System.Runtime.Remoting.Messaging.IMessageSink
+System.Runtime.Remoting.Messaging.AsyncResult
+System.Runtime.Remoting.Messaging.CallContext
+System.Runtime.Remoting.Messaging.ILogicalThreadAffinative
+System.Runtime.Remoting.Messaging.InternalMessageWrapper
+System.Runtime.Remoting.Messaging.IMethodCallMessage
+System.Runtime.Remoting.Messaging.MethodCallMessageWrapper
+System.Runtime.Remoting.Messaging.HeaderHandler
+System.Runtime.Remoting.Messaging.IMessageCtrl
+System.Runtime.Remoting.Messaging.IRemotingFormatter
+System.Runtime.Remoting.Messaging.ReturnMessage
+System.Runtime.Remoting.Messaging.MethodCall
+System.Runtime.Remoting.Messaging.ConstructionCall
+System.Runtime.Remoting.Messaging.MethodResponse
+System.Runtime.Remoting.Messaging.ConstructionResponse
+System.Runtime.Remoting.Messaging.MethodReturnMessageWrapper
+System.Runtime.Remoting.Messaging.OneWayAttribute
+System.Runtime.Remoting.Messaging.MessageSurrogateFilter
+System.Runtime.Remoting.Messaging.RemotingSurrogateSelector
+System.Runtime.Remoting.Contexts.CrossContextDelegate
+System.Runtime.Remoting.Contexts.ContextProperty
+System.Runtime.Remoting.Contexts.IContextPropertyActivator
+System.Runtime.Remoting.Contexts.IContributeClientContextSink
+System.Runtime.Remoting.Contexts.IContributeDynamicSink
+System.Runtime.Remoting.Contexts.IContributeEnvoySink
+System.Runtime.Remoting.Contexts.IContributeObjectSink
+System.Runtime.Remoting.Contexts.IContributeServerContextSink
+System.Runtime.Serialization.Formatters.InternalRM
+System.Runtime.Serialization.Formatters.InternalST
+System.Runtime.Serialization.Formatters.SoapMessage
+System.Runtime.Serialization.Formatters.SoapFault
+System.Runtime.Serialization.Formatters.ServerFault
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+System.Security.Cryptography.CryptoConfig
+System.Security.Cryptography.KeyedHashAlgorithm
+System.Security.Cryptography.HMACSHA1
+System.Security.Cryptography.MACTripleDES
+System.Security.Cryptography.MaskGenerationMethod
+System.Security.Cryptography.PasswordDeriveBytes
+System.Security.Cryptography.PKCS1MaskGenerationMethod
+System.Security.Cryptography.RC2
+System.Security.Cryptography.RC2CryptoServiceProvider
+System.Security.Cryptography.RSACryptoServiceProvider
+System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter
+System.Security.Cryptography.RSAOAEPKeyExchangeFormatter
+System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter
+System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
+System.Security.Cryptography.RSAPKCS1SignatureDeformatter
+System.Security.Cryptography.RSAPKCS1SignatureFormatter
+System.Security.Cryptography.SHA1Managed
+System.Security.Cryptography.TripleDES
+System.Security.Cryptography.TripleDESCryptoServiceProvider
+System.Security.Permissions.EnvironmentPermission
+System.Security.Permissions.FileDialogPermission
+System.Security.Permissions.IsolatedStorageFilePermission
+System.Security.Permissions.PrincipalPermissionAttribute
+System.Security.Permissions.SecurityPermissionAttribute
+System.Security.Permissions.PublisherIdentityPermissionAttribute
+System.Security.Permissions.PublisherIdentityPermission
+System.Security.Permissions.ReflectionPermission
+System.Security.Permissions.RegistryPermission
+System.Security.Permissions.PrincipalPermission
+System.Security.Permissions.SiteIdentityPermission
+System.Security.Permissions.StrongNameIdentityPermission
+System.Security.Permissions.StrongNamePublicKeyBlob
+System.Security.Permissions.UIPermission
+System.Security.Permissions.UrlIdentityPermission
+System.Security.Permissions.ZoneIdentityPermission
+System.Security.Policy.ApplicationDirectory
+System.Security.Policy.ApplicationDirectoryMembershipCondition
+System.Security.Policy.FirstMatchCodeGroup
+System.Security.Policy.Hash
+System.Security.Policy.HashMembershipCondition
+System.Security.Policy.NetCodeGroup
+System.Security.Policy.PermissionRequestEvidence
+System.Security.Policy.Publisher
+System.Security.Policy.PublisherMembershipCondition
+System.Security.Policy.Site
+System.Security.Policy.SiteMembershipCondition
+System.Security.Policy.StrongName
+System.Security.Policy.StrongNameMembershipCondition
+System.Security.Policy.UnionCodeGroup
+System.Security.Policy.Url
+System.Security.Policy.UrlMembershipCondition
+System.Security.Policy.Zone
+System.Security.Policy.ZoneMembershipCondition
+System.Security.Principal.WindowsIdentity
+System.Security.Principal.WindowsImpersonationContext
+System.Security.Principal.WindowsPrincipal
+System.Threading.CompressedStack
+
diff --git a/man/gacutil.1 b/man/gacutil.1
index 704c263486f..54838e02cc6 100644
--- a/man/gacutil.1
+++ b/man/gacutil.1
@@ -24,17 +24,20 @@ convention is that assemblies must also be placed in a separate
directory for being accessed to the compiler. This is done with the
-package directive to gacutil.
.PP
-The tool allows for installation, removal, and listing of the
+The tool allows for installationl, removal, and listing of the
contents of the assembly cache.
.PP
The GAC is relative to the Mono installation prefix:
mono_prefix/lib/mono.
+.SH FLAGS
+The "-user" flag enables you to install/remove the assembly into the
+user's assembly cache, as opposed to the global one.
.PP
.SH COMMANDS
-.I -i <assembly_path> [-check_refs] [-package NAME] [-root ROOTDIR] [-gacdir GACDIR]
+.I "-i path_to_assembly" [-f] [-root ROOTDIR] [-package NAME]
.Sp
- Installs an assembly into the global assembly cache. <assembly_path>
-is the name of the file that contains the assembly manifest
+The above installs the assembly into the GAC, use the -f flag to force
+an installation an overwrite anything in there.
.Sp
The -package option can be used to also create a directory in in
prefix/lib/mono with the name NAME, and a symlink is created from
@@ -44,32 +47,18 @@ developers can reference a set of libraries at once.
The -root option is used by developers integrating this with automake
tools or packaging tools that require a prefix directory to be
specified. The root represents the "libdir" component of a prefix
-(typically prefix/lib).
-.Sp
-The -gacdir option is used to specify the GACs base directory. Once an
-assembly has been installed to a non standard gacdir the MONO_GAC_PATH
-environment variable must be used to access the assembly.
-.Sp
-The -check_refs option is used to ensure that the assembly being
-installed into the GAC does not reference any non strong named
-assemblies. Assemblies being installed to the GAC should not reference
-non strong named assemblies, however the is an optional check.
+(typically prefix/lib).
.fi
.PP
-.I "-l" [assembly_name] [-root ROOTDIR] [-gacdir GACDIR]
+.I "-l"
.Sp
-Lists the contents of the global assembly cache. When the
-<assembly_name> parameter is specified only matching assemblies are
-listed.
+Lists the contents of the Global Assembly Cache
.PP
-.I "-u" <assembly_display_name> [-package NAME] [-root ROOTDIR] [-gacdir GACDIR]
+.I "-u assembly_name [-root]"
.Sp
-Uninstalls an assembly from the global assembly cache.
-<assembly_display_name> is the name of the assembly (partial or
-fully qualified) to remove from the global assembly cache. If a
-partial name is specified all matching assemblies will be
-uninstalled. As opposed to the install option that takes a filename,
-this takes as an argument the assembly name, which looks like this:
+The above removes the given assembly name from the Global Assembly
+Cache. As opposed to the install option that takes a filename, this
+takes as an argument the assembly name, which looks like this:
.nf
MyLibrary.Something, version=1.0.0.0, publicKeyToken=xxxx,culture=neutral
.fi
@@ -80,29 +69,6 @@ to quote them.
The removal performs a greedy removal, if you only specifiy one
component like, "MyLibrary.Something", it will remove all versions of
the library.
-.Sp
-.I "-us" <assembly_path> [-package NAME] [-root ROOTDIR] [-gacdir GACDIR]
-Uninstalls an assembly using the specifed assemblies full name.
-<assembly path> is the path to an assembly. The full assembly name
-is retrieved from the specified assembly if there is an assembly in
-the GAC with a matching name, it is removed. Unlike the -u option this
-option takes a file name, like this:
-.nf
- Example: -us myDll.dll
-.fi
-.Sp
-.I "-ul" <assembly_list_file> [-package NAME] [-root ROOTDIR] [-gacdir GACDIR]
-Uninstalls one or more assemblies from the global assembly cache.
-<assembly_list_file> is the path to a test file containing a list of
-assembly names on separate lines.
-.nf
-Example -ul assembly_list.txt
-.fi
-.nf
-assembly_list.txt contents:
- assembly1,Version=1.0.0.0,Culture=en,PublicKeyToken=0123456789abcdef
- assembly2,Version=2.0.0.0,Culture=en,PublicKeyToken=0123456789abcdef
-.fi
.SH FILES
On Unix assemblies are loaded from the installation lib directory. If you set
`prefix' to /usr, the assemblies will be located in /usr/lib. On
diff --git a/mcs/class/Mono.Security/ChangeLog b/mcs/class/Mono.Security/ChangeLog
index 236840ba508..6d00422c990 100644
--- a/mcs/class/Mono.Security/ChangeLog
+++ b/mcs/class/Mono.Security/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * Mono.Security_test.dll.sources: Merge new unit tests from HEAD.
+
2004-05-11 Carlos Guzman Alvarez <carlosga@telefonica.net>
* Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs:
diff --git a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeBase.cs b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeBase.cs
index 63fbab93a8c..c2d609ecec2 100755
--- a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeBase.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeBase.cs
@@ -5,9 +5,7 @@
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// (C) 2004 Novell (http://www.novell.com)
-//
-
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -58,63 +56,167 @@ namespace Mono.Security.Authenticode {
public const string spcIndirectDataContext = "1.3.6.1.4.1.311.2.1.4";
- internal byte[] rawData;
+ private byte[] fileblock;
+ private FileStream fs;
+ private int blockNo;
+ private int blockLength;
+ private int peOffset;
+ private int dirSecurityOffset;
+ private int dirSecuritySize;
public AuthenticodeBase ()
{
+ fileblock = new byte [4096];
}
- protected byte[] HashFile (string fileName, string hashName)
+ internal void Open (string filename)
{
- FileStream fs = new FileStream (fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
- byte[] file = new byte [fs.Length];
- fs.Read (file, 0, file.Length);
- fs.Close ();
+ if (fs != null)
+ Close ();
+ fs = new FileStream (filename, FileMode.Open, FileAccess.Read, FileShare.Read);
+ }
- // MZ - DOS header
- if (BitConverterLE.ToUInt16 (file, 0) != 0x5A4D)
- return null;
+ internal void Close ()
+ {
+ if (fs != null) {
+ fs.Close ();
+ fs = null;
+ blockNo = 0;
+ }
+ }
- // find offset of PE header
- int peOffset = BitConverterLE.ToInt32 (file, 60);
- if (peOffset > file.Length)
- return null;
+ internal bool ReadFirstBlock ()
+ {
+ if (fs == null)
+ return false;
+
+ fs.Position = 0;
+ // read first block - it will include (100% sure)
+ // the MZ header and (99.9% sure) the PE header
+ blockLength = fs.Read (fileblock, 0, fileblock.Length);
+ blockNo = 1;
+ if (blockLength < 64)
+ return false; // invalid PE file
+
+ // 1. Validate the MZ header informations
+ // 1.1. Check for magic MZ at start of header
+ if (BitConverterLE.ToUInt16 (fileblock, 0) != 0x5A4D)
+ return false;
+
+ // 1.2. Find the offset of the PE header
+ peOffset = BitConverterLE.ToInt32 (fileblock, 60);
+ if (peOffset > fileblock.Length) {
+ // just in case (0.1%) this can actually happen
+ string msg = String.Format (Locale.GetText (
+ "Header size too big (> {0} bytes)."),
+ fileblock.Length);
+ throw new NotSupportedException (msg);
+ }
+ if (peOffset > fs.Length)
+ return false;
- // PE - NT header
- if (BitConverterLE.ToUInt16 (file, peOffset) != 0x4550)
- return null;
+ // 2. Read between DOS header and first part of PE header
+ // 2.1. Check for magic PE at start of header
+ if (BitConverterLE.ToUInt16 (fileblock, peOffset) != 0x4550)
+ return false;
- // IMAGE_DIRECTORY_ENTRY_SECURITY
- int dirSecurityOffset = BitConverterLE.ToInt32 (file, peOffset + 152);
- int dirSecuritySize = BitConverterLE.ToInt32 (file, peOffset + 156);
+ // 2.2. Locate IMAGE_DIRECTORY_ENTRY_SECURITY (offset and size)
+ dirSecurityOffset = BitConverterLE.ToInt32 (fileblock, peOffset + 152);
+ dirSecuritySize = BitConverterLE.ToInt32 (fileblock, peOffset + 156);
+
+ return true;
+ }
+
+ internal byte[] GetSecurityEntry ()
+ {
+ if (blockNo < 1)
+ ReadFirstBlock ();
if (dirSecuritySize > 8) {
- rawData = new byte [dirSecuritySize - 8];
- Buffer.BlockCopy (file, dirSecurityOffset + 8, rawData, 0, rawData.Length);
-/* DEBUG
- FileStream debug = new FileStream (fileName + ".sig", FileMode.Create, FileAccess.Write);
- debug.Write (rawData, 0, rawData.Length);
- debug.Close ();*/
+ // remove header from size (not ASN.1 based)
+ byte[] secEntry = new byte [dirSecuritySize - 8];
+ // position after header and read entry
+ fs.Position = dirSecurityOffset + 8;
+ fs.Read (secEntry, 0, secEntry.Length);
+ return secEntry;
+ }
+ return null;
+ }
+
+ // returns null if the file isn't signed
+ internal byte[] GetHash (HashAlgorithm hash)
+ {
+ if (blockNo < 1)
+ ReadFirstBlock ();
+ fs.Position = blockLength;
+
+ // hash the rest of the file
+ long n = fs.Length - blockLength;
+ // minus any authenticode signature (with 8 bytes header)
+ if (dirSecurityOffset > 0) {
+ // it is also possible that the signature block
+ // starts within the block in memory (small EXE)
+ if (dirSecurityOffset < blockLength) {
+ blockLength = dirSecurityOffset;
+ n = 0;
+ }
+ else
+ n -= (dirSecuritySize);
}
- else
- rawData = null;
- HashAlgorithm hash = HashAlgorithm.Create (hashName);
- // 0 to 215 (216) then skip 4 (checksum)
+ // Authenticode(r) gymnastics
+ // Hash from (generally) 0 to 215 (216 bytes)
int pe = peOffset + 88;
- hash.TransformBlock (file, 0, pe, file, 0);
+ hash.TransformBlock (fileblock, 0, pe, fileblock, 0);
+ // then skip 4 for checksum
pe += 4;
- // 220 to 279 (60) then skip 8 (IMAGE_DIRECTORY_ENTRY_SECURITY)
- hash.TransformBlock (file, pe, 60, file, pe);
+ // Continue hashing from (generally) 220 to 279 (60 bytes)
+ hash.TransformBlock (fileblock, pe, 60, fileblock, pe);
+ // then skip 8 bytes for IMAGE_DIRECTORY_ENTRY_SECURITY
pe += 68;
- // 288 to end of file
- int n = file.Length - pe;
- // minus any authenticode signature (with 8 bytes header)
- if (dirSecurityOffset != 0)
- n -= (dirSecuritySize);
- hash.TransformFinalBlock (file, pe, n);
+ // everything is present so start the hashing
+ if (n == 0) {
+ // hash the (only) block
+ hash.TransformFinalBlock (fileblock, pe, blockLength - pe);
+ }
+ else {
+ // hash the last part of the first (already in memory) block
+ hash.TransformBlock (fileblock, pe, blockLength - pe, fileblock, 0);
+
+ // hash by blocks of 4096 bytes
+ long blocks = (n >> 12);
+ int remainder = (int)(n - (blocks << 12));
+ if (remainder == 0) {
+ blocks--;
+ remainder = 4096;
+ }
+ // blocks
+ while (blocks-- > 0) {
+ fs.Read (fileblock, 0, fileblock.Length);
+ hash.TransformBlock (fileblock, 0, fileblock.Length, fileblock, 0);
+ }
+ // remainder
+ if (fs.Read (fileblock, 0, remainder) != remainder)
+ return null;
+ hash.TransformFinalBlock (fileblock, 0, remainder);
+ }
return hash.Hash;
}
+
+ // for compatibility only
+ protected byte[] HashFile (string fileName, string hashName)
+ {
+ try {
+ Open (fileName);
+ HashAlgorithm hash = HashAlgorithm.Create (hashName);
+ byte[] result = GetHash (hash);
+ Close ();
+ return result;
+ }
+ catch {
+ return null;
+ }
+ }
}
}
diff --git a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeDeformatter.cs b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeDeformatter.cs
index 4d30ea38aab..ea0bd30e242 100755
--- a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeDeformatter.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeDeformatter.cs
@@ -5,9 +5,7 @@
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// (C) 2004 Novell (http://www.novell.com)
-//
-
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -56,6 +54,9 @@ namespace Mono.Security.Authenticode {
private DateTime timestamp;
private X509Certificate signingCertificate;
private int reason;
+ private bool trustedRoot;
+ private bool trustedTimestampRoot;
+ private byte[] entry;
private X509Chain signerChain;
private X509Chain timestampChain;
@@ -69,17 +70,20 @@ namespace Mono.Security.Authenticode {
public AuthenticodeDeformatter (string fileName) : this ()
{
- if (!CheckSignature (fileName)) {
- // invalid or no signature
- if (signedHash != null)
- throw new COMException ("Invalid signature");
- // no exception is thrown when there's no signature in the PE file
- }
+ FileName = fileName;
}
public string FileName {
get { return filename; }
- set { CheckSignature (value); }
+ set {
+ Reset ();
+ try {
+ CheckSignature (value);
+ }
+ catch {
+ reason = 1;
+ }
+ }
}
public byte[] Hash {
@@ -100,7 +104,7 @@ namespace Mono.Security.Authenticode {
public bool IsTrusted ()
{
- if (rawData == null) {
+ if (entry == null) {
reason = 1;
return false;
}
@@ -110,13 +114,13 @@ namespace Mono.Security.Authenticode {
return false;
}
- if (signerChain.Root == null) {
+ if ((signerChain.Root == null) || !trustedRoot) {
reason = 6;
return false;
}
if (timestamp != DateTime.MinValue) {
- if (timestampChain.Root == null) {
+ if ((timestampChain.Root == null) || !trustedTimestampRoot) {
reason = 6;
return false;
}
@@ -138,7 +142,11 @@ namespace Mono.Security.Authenticode {
}
public byte[] Signature {
- get { return (byte[]) rawData.Clone (); }
+ get {
+ if (entry == null)
+ return null;
+ return (byte[]) entry.Clone ();
+ }
}
public DateTime Timestamp {
@@ -156,43 +164,58 @@ namespace Mono.Security.Authenticode {
private bool CheckSignature (string fileName)
{
filename = fileName;
-
- // by default we try with MD5
- string hashName = "MD5";
- // compare the signature's hash with the hash of the file
- hash = HashFile (filename, hashName);
-
- // is a signature present ?
- if (rawData == null)
+ base.Open (filename);
+ entry = base.GetSecurityEntry ();
+ if (entry == null) {
+ // no signature is present
+ reason = 1;
+ base.Close ();
return false;
+ }
- PKCS7.ContentInfo ci = new PKCS7.ContentInfo (rawData);
- if (ci.ContentType != PKCS7.Oid.signedData)
+ PKCS7.ContentInfo ci = new PKCS7.ContentInfo (entry);
+ if (ci.ContentType != PKCS7.Oid.signedData) {
+ base.Close ();
return false;
+ }
PKCS7.SignedData sd = new PKCS7.SignedData (ci.Content);
- if (sd.ContentInfo.ContentType != spcIndirectDataContext)
+ if (sd.ContentInfo.ContentType != spcIndirectDataContext) {
+ base.Close ();
return false;
+ }
coll = sd.Certificates;
ASN1 spc = sd.ContentInfo.Content;
signedHash = spc [0][1][1];
- if (signedHash.Length == 20) {
- // seems to be SHA-1, restart hashing
- hashName = "SHA1";
- hash = HashFile (filename, hashName);
+
+ HashAlgorithm ha = null;
+ switch (signedHash.Length) {
+ case 16:
+ ha = HashAlgorithm.Create ("MD5");
+ hash = GetHash (ha);
+ break;
+ case 20:
+ ha = HashAlgorithm.Create ("SHA1");
+ hash = GetHash (ha);
+ break;
+ default:
+ reason = 5;
+ base.Close ();
+ return false;
}
+ base.Close ();
if (!signedHash.CompareValue (hash))
return false;
// messageDigest is a hash of spcIndirectDataContext (which includes the file hash)
byte[] spcIDC = spc [0].Value;
- HashAlgorithm ha = HashAlgorithm.Create (hashName);
+ ha.Initialize (); // re-using hash instance
byte[] messageDigest = ha.ComputeHash (spcIDC);
- return VerifySignature (sd, messageDigest, hashName);
+ return VerifySignature (sd, messageDigest, ha);
}
private bool CompareIssuerSerial (string issuer, byte[] serial, X509Certificate x509)
@@ -212,7 +235,7 @@ namespace Mono.Security.Authenticode {
}
//private bool VerifySignature (ASN1 cs, byte[] calculatedMessageDigest, string hashName)
- private bool VerifySignature (PKCS7.SignedData sd, byte[] calculatedMessageDigest, string hashName)
+ private bool VerifySignature (PKCS7.SignedData sd, byte[] calculatedMessageDigest, HashAlgorithm ha)
{
string contentType = null;
ASN1 messageDigest = null;
@@ -241,7 +264,7 @@ namespace Mono.Security.Authenticode {
case "1.3.6.1.4.1.311.2.1.12":
// spcSpOpusInfo (Microsoft code signing)
try {
- spcSpOpusInfo = System.Text.Encoding.UTF8.GetString (attr[1][0][1][0].Value);
+ spcSpOpusInfo = System.Text.Encoding.UTF8.GetString (attr[1][0][0][0].Value);
}
catch (NullReferenceException) {
spcSpOpusInfo = null;
@@ -261,13 +284,13 @@ namespace Mono.Security.Authenticode {
return false;
// verify signature
- string hashOID = CryptoConfig.MapNameToOID (hashName);
+ string hashOID = CryptoConfig.MapNameToOID (ha.ToString ());
// change to SET OF (not [0]) as per PKCS #7 1.5
ASN1 aa = new ASN1 (0x31);
foreach (ASN1 a in sd.SignerInfo.AuthenticatedAttributes)
aa.Add (a);
- HashAlgorithm ha = HashAlgorithm.Create (hashName);
+ ha.Initialize ();
byte[] p7hash = ha.ComputeHash (aa.GetBytes ());
byte[] signature = sd.SignerInfo.Signature;
@@ -281,10 +304,9 @@ namespace Mono.Security.Authenticode {
RSACryptoServiceProvider rsa = (RSACryptoServiceProvider) x509.RSA;
if (rsa.VerifyHash (p7hash, hashOID, signature)) {
signerChain.LoadCertificates (coll);
- if (signerChain.Build (x509))
- signingCertificate = x509;
- else
- return false;
+ trustedRoot = signerChain.Build (x509);
+ signingCertificate = x509;
+ break;
}
}
}
@@ -300,17 +322,18 @@ namespace Mono.Security.Authenticode {
// countersignature (1 2 840 113549 1 9 6)
// SET {
PKCS7.SignerInfo cs = new PKCS7.SignerInfo (attr [1]);
- return VerifyCounterSignature (cs, signature, hashName);
+ trustedTimestampRoot = VerifyCounterSignature (cs, signature);
+ break;
default:
// we don't support other unauthenticated attributes
break;
}
}
- return true;
+ return (trustedRoot && trustedTimestampRoot);
}
- private bool VerifyCounterSignature (PKCS7.SignerInfo cs, byte[] signature, string hashName)
+ private bool VerifyCounterSignature (PKCS7.SignerInfo cs, byte[] signature)
{
// SEQUENCE {
// INTEGER 1
@@ -357,6 +380,7 @@ namespace Mono.Security.Authenticode {
if (messageDigest == null)
return false;
// TODO: must be read from the ASN.1 structure
+ string hashName = null;
switch (messageDigest.Length) {
case 16:
hashName = "MD5";
@@ -397,5 +421,20 @@ namespace Mono.Security.Authenticode {
// no certificate can verify this signature!
return false;
}
+
+ private void Reset ()
+ {
+ filename = null;
+ entry = null;
+ hash = null;
+ signedHash = null;
+ signingCertificate = null;
+ reason = -1;
+ trustedRoot = false;
+ trustedTimestampRoot = false;
+ signerChain.Reset ();
+ timestampChain.Reset ();
+ timestamp = DateTime.MinValue;
+ }
}
}
diff --git a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs
index 9813f809be4..983c55534cc 100755
--- a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs
@@ -5,9 +5,7 @@
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// (C) 2004 Novell (http://www.novell.com)
-//
-
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -54,6 +52,7 @@ namespace Mono.Security.Authenticode {
private PKCS7.SignedData pkcs7;
private string description;
private Uri url;
+ private byte [] entry;
public AuthenticodeFormatter () : base ()
{
@@ -242,11 +241,11 @@ namespace Mono.Security.Authenticode {
int dirSecuritySize = BitConverter.ToInt32 (file, peOffset + 156);
if (dirSecuritySize > 8) {
- rawData = new byte [dirSecuritySize - 8];
- Buffer.BlockCopy (file, dirSecurityOffset + 8, rawData, 0, rawData.Length);
+ entry = new byte [dirSecuritySize - 8];
+ Buffer.BlockCopy (file, dirSecurityOffset + 8, entry, 0, entry.Length);
}
else
- rawData = null;
+ entry = null;
HashAlgorithm hash = HashAlgorithm.Create (hashAlgorithm);
// 0 to 215 (216) then skip 4 (checksum)
diff --git a/mcs/class/Mono.Security/Mono.Security.Authenticode/ChangeLog b/mcs/class/Mono.Security/Mono.Security.Authenticode/ChangeLog
index 19cc3c81335..0e1b07e15aa 100644
--- a/mcs/class/Mono.Security/Mono.Security.Authenticode/ChangeLog
+++ b/mcs/class/Mono.Security/Mono.Security.Authenticode/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * AuthenticodeBase.cs: Merge optimizations from HEAD.
+ * AuthenticodeDeformatter.cs: Merge optimizations from HEAD.
+ * AuthenticodeFormatter.cs: Merge optimizations from HEAD.
+
2004-05-11 Sebastien Pouliot <sebastien@ximian.com>
* PrivateKey.cs: Better exception reporting. Added globalization to
diff --git a/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog b/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog
index 38b3d393aa5..fc6c1b3b64b 100644
--- a/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog
+++ b/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * X509Chain.cs: Merge bug fixes from HEAD.
+ * X509Store.cs: Merge enhancements from HEAD.
+
2004-07-15 Sebastien Pouliot <sebastien@ximian.com>
* X501Name.cs: Support for E (email) in FromString.
diff --git a/mcs/class/Mono.Security/Mono.Security.X509/X509Chain.cs b/mcs/class/Mono.Security/Mono.Security.X509/X509Chain.cs
index 254ff1b70fa..f8035e6c661 100755
--- a/mcs/class/Mono.Security/Mono.Security.X509/X509Chain.cs
+++ b/mcs/class/Mono.Security/Mono.Security.X509/X509Chain.cs
@@ -9,9 +9,7 @@
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// (C) 2004 Novell (http://www.novell.com)
-//
-
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -134,7 +132,7 @@ namespace Mono.Security.X509 {
tmp = FindCertificateParent (x);
if (x != null) {
_chain.Add (x);
- tmp = x; // last valid
+ x = tmp; // last valid
}
}
// find a trusted root
@@ -191,7 +189,8 @@ namespace Mono.Security.X509 {
_status = X509ChainStatusFlags.NoError;
roots = null; // this force a reload
certs.Clear ();
- _chain.Clear ();
+ if (_chain != null)
+ _chain.Clear ();
}
// private stuff
diff --git a/mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs b/mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs
index 81db71b5c75..aa27a4a7dfd 100755
--- a/mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs
+++ b/mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs
@@ -4,9 +4,7 @@
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
-// (C) 2004 Novell (http://www.novell.com)
-//
-
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -106,9 +104,7 @@ namespace Mono.Security.X509 {
public void Import (X509Certificate certificate)
{
- if (!Directory.Exists (_storePath)) {
- Directory.CreateDirectory (_storePath);
- }
+ CheckStore (_storePath, true);
string filename = Path.Combine (_storePath, GetUniqueName (certificate));
if (!File.Exists (filename)) {
@@ -183,14 +179,28 @@ namespace Mono.Security.X509 {
return crl;
}
- private X509CertificateCollection BuildCertificatesCollection (string storeName)
+ private bool CheckStore (string path, bool throwException)
{
- string path = Path.Combine (_storePath, storeName);
- if (!Directory.Exists (path)) {
+ try {
+ if (Directory.Exists (path))
+ return true;
Directory.CreateDirectory (path);
+ return Directory.Exists (path);
+ }
+ catch {
+ if (throwException)
+ throw;
+ return false;
}
+ }
+ private X509CertificateCollection BuildCertificatesCollection (string storeName)
+ {
X509CertificateCollection coll = new X509CertificateCollection ();
+ string path = Path.Combine (_storePath, storeName);
+ if (!CheckStore (path, false))
+ return coll; // empty collection
+
string[] files = Directory.GetFiles (path, "*.cer");
if ((files != null) && (files.Length > 0)) {
foreach (string file in files) {
@@ -213,6 +223,9 @@ namespace Mono.Security.X509 {
{
ArrayList list = new ArrayList ();
string path = Path.Combine (_storePath, storeName);
+ if (!CheckStore (path, false))
+ return list; // empty list
+
string[] files = Directory.GetFiles (path, "*.crl");
if ((files != null) && (files.Length > 0)) {
foreach (string file in files) {
diff --git a/mcs/class/Mono.Security/Mono.Security_test.dll.sources b/mcs/class/Mono.Security/Mono.Security_test.dll.sources
index 2e75e37c1e4..41e1458d054 100644
--- a/mcs/class/Mono.Security/Mono.Security_test.dll.sources
+++ b/mcs/class/Mono.Security/Mono.Security_test.dll.sources
@@ -9,6 +9,7 @@ Mono.Math/PrimeTestingTest.cs
Mono.Math/SearchGeneratorTest.cs
Mono.Security/ASN1ConvertTest.cs
Mono.Security/StrongNameTest.cs
+Mono.Security.Authenticode/AuthenticodeDeformatterTest.cs
Mono.Security.Authenticode/PrivateKeyTest.cs
Mono.Security.Authenticode/SoftwarePublisherCertificateTest.cs
Mono.Security.Cryptography/ARC4ManagedTest.cs
diff --git a/mcs/class/Mono.Security/Test/Mono.Security.Authenticode/AuthenticodeDeformatterTest.cs b/mcs/class/Mono.Security/Test/Mono.Security.Authenticode/AuthenticodeDeformatterTest.cs
new file mode 100644
index 00000000000..fa708c3d6a8
--- /dev/null
+++ b/mcs/class/Mono.Security/Test/Mono.Security.Authenticode/AuthenticodeDeformatterTest.cs
@@ -0,0 +1,724 @@
+//
+// AuthenticodeDeformatterTest.cs -
+// NUnit Test Cases for AuthenticodeDeformatter
+//
+// Author:
+// Sebastien Pouliot (sebastien@ximian.com)
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.IO;
+using System.Reflection;
+using System.Security.Cryptography;
+
+using Mono.Security.Authenticode;
+using NUnit.Framework;
+
+namespace MonoTests.Mono.Security.Authenticode {
+
+ [TestFixture]
+ public class AuthenticodeDeformatterTest {
+
+ static byte[] helloworld_signed = {
+ 0x4D, 0x5A, 0x90, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0xFF, 0xFF, 0x00, 0x00, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0xBA, 0x0E, 0x00, 0xB4, 0x09, 0xCD,
+ 0x21, 0xB8, 0x01, 0x4C, 0xCD, 0x21, 0x54, 0x68, 0x69, 0x73, 0x20, 0x70,
+ 0x72, 0x6F, 0x67, 0x72, 0x61, 0x6D, 0x20, 0x63, 0x61, 0x6E, 0x6E, 0x6F,
+ 0x74, 0x20, 0x62, 0x65, 0x20, 0x72, 0x75, 0x6E, 0x20, 0x69, 0x6E, 0x20,
+ 0x44, 0x4F, 0x53, 0x20, 0x6D, 0x6F, 0x64, 0x65, 0x2E, 0x0D, 0x0D, 0x0A,
+ 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x45, 0x00, 0x00,
+ 0x4C, 0x01, 0x03, 0x00, 0xF5, 0xE5, 0xFA, 0x3E, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x0E, 0x01, 0x0B, 0x01, 0x06, 0x00,
+ 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x1E, 0x23, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+ 0x96, 0x96, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x10, 0x00,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xC4, 0x22, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00,
+ 0x00, 0x40, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0xA8, 0x11, 0x00, 0x00,
+ 0x00, 0x60, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x20, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x2E, 0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 0x00,
+ 0x24, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x60, 0x2E, 0x72, 0x73, 0x72,
+ 0x63, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
+ 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40,
+ 0x2E, 0x72, 0x65, 0x6C, 0x6F, 0x63, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x7C, 0x20, 0x00, 0x00, 0x48, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x13, 0x30, 0x01, 0x00, 0x0B, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x72, 0x01, 0x00, 0x00, 0x70, 0x28, 0x03, 0x00,
+ 0x00, 0x0A, 0x2A, 0x00, 0x13, 0x30, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x28, 0x04, 0x00, 0x00, 0x0A, 0x2A, 0x00,
+ 0x42, 0x53, 0x4A, 0x42, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0C, 0x00, 0x00, 0x00, 0x76, 0x31, 0x2E, 0x31, 0x2E, 0x34, 0x33, 0x32,
+ 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x6C, 0x00, 0x00, 0x00,
+ 0xEC, 0x00, 0x00, 0x00, 0x23, 0x7E, 0x00, 0x00, 0x58, 0x01, 0x00, 0x00,
+ 0x9C, 0x00, 0x00, 0x00, 0x23, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x73,
+ 0x00, 0x00, 0x00, 0x00, 0xF4, 0x01, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
+ 0x23, 0x55, 0x53, 0x00, 0x0C, 0x02, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x23, 0x47, 0x55, 0x49, 0x44, 0x00, 0x00, 0x00, 0x1C, 0x02, 0x00, 0x00,
+ 0x2C, 0x00, 0x00, 0x00, 0x23, 0x42, 0x6C, 0x6F, 0x62, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x47, 0x15, 0x00, 0x00,
+ 0x09, 0x00, 0x00, 0x00, 0x00, 0xFA, 0x01, 0x33, 0x00, 0x02, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0A, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
+ 0x25, 0x00, 0x1E, 0x00, 0x06, 0x00, 0x5C, 0x00, 0x49, 0x00, 0x06, 0x00,
+ 0x70, 0x00, 0x1E, 0x00, 0x06, 0x00, 0x88, 0x00, 0x1E, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x2C, 0x00, 0x33, 0x00, 0x05, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x50, 0x20, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x3E, 0x00,
+ 0x0A, 0x00, 0x01, 0x00, 0x68, 0x20, 0x00, 0x00, 0x00, 0x00, 0x86, 0x18,
+ 0x43, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x83, 0x00,
+ 0x11, 0x00, 0x43, 0x00, 0x14, 0x00, 0x19, 0x00, 0x43, 0x00, 0x10, 0x00,
+ 0x21, 0x00, 0x90, 0x00, 0x1F, 0x00, 0x09, 0x00, 0x43, 0x00, 0x10, 0x00,
+ 0x20, 0x00, 0x13, 0x00, 0x1A, 0x00, 0x2E, 0x00, 0x0B, 0x00, 0x24, 0x00,
+ 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x88, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x4D, 0x6F,
+ 0x64, 0x75, 0x6C, 0x65, 0x3E, 0x00, 0x43, 0x6C, 0x61, 0x73, 0x73, 0x31,
+ 0x2E, 0x65, 0x78, 0x65, 0x00, 0x6D, 0x73, 0x63, 0x6F, 0x72, 0x6C, 0x69,
+ 0x62, 0x00, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x00, 0x4F, 0x62, 0x6A,
+ 0x65, 0x63, 0x74, 0x00, 0x43, 0x6C, 0x61, 0x73, 0x73, 0x31, 0x00, 0x68,
+ 0x65, 0x6C, 0x6C, 0x6F, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x00, 0x4D, 0x61,
+ 0x69, 0x6E, 0x00, 0x2E, 0x63, 0x74, 0x6F, 0x72, 0x00, 0x53, 0x79, 0x73,
+ 0x74, 0x65, 0x6D, 0x2E, 0x44, 0x69, 0x61, 0x67, 0x6E, 0x6F, 0x73, 0x74,
+ 0x69, 0x63, 0x73, 0x00, 0x44, 0x65, 0x62, 0x75, 0x67, 0x67, 0x61, 0x62,
+ 0x6C, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x00,
+ 0x53, 0x54, 0x41, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x41, 0x74, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x00, 0x61, 0x72, 0x67, 0x73, 0x00,
+ 0x43, 0x6F, 0x6E, 0x73, 0x6F, 0x6C, 0x65, 0x00, 0x57, 0x72, 0x69, 0x74,
+ 0x65, 0x4C, 0x69, 0x6E, 0x65, 0x00, 0x00, 0x00, 0x00, 0x15, 0x48, 0x00,
+ 0x65, 0x00, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0x00, 0x20, 0x00, 0x77, 0x00,
+ 0x6F, 0x00, 0x72, 0x00, 0x64, 0x00, 0x00, 0x00, 0xA7, 0x01, 0xAB, 0x9B,
+ 0xF7, 0xF7, 0x3F, 0x49, 0xB9, 0x45, 0x97, 0xAF, 0x40, 0x00, 0x5D, 0x9D,
+ 0x00, 0x08, 0xB7, 0x7A, 0x5C, 0x56, 0x19, 0x34, 0xE0, 0x89, 0x05, 0x00,
+ 0x01, 0x01, 0x1D, 0x0E, 0x03, 0x20, 0x00, 0x01, 0x05, 0x20, 0x02, 0x01,
+ 0x02, 0x02, 0x04, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x01, 0x0E,
+ 0x06, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xEC, 0x22, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x23, 0x00, 0x00,
+ 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x43,
+ 0x6F, 0x72, 0x45, 0x78, 0x65, 0x4D, 0x61, 0x69, 0x6E, 0x00, 0x6D, 0x73,
+ 0x63, 0x6F, 0x72, 0x65, 0x65, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xFF, 0x25, 0x00, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x80,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x80,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
+ 0x58, 0x40, 0x00, 0x00, 0xD4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xD4, 0x02, 0x34, 0x00, 0x00, 0x00, 0x56, 0x00,
+ 0x53, 0x00, 0x5F, 0x00, 0x56, 0x00, 0x45, 0x00, 0x52, 0x00, 0x53, 0x00,
+ 0x49, 0x00, 0x4F, 0x00, 0x4E, 0x00, 0x5F, 0x00, 0x49, 0x00, 0x4E, 0x00,
+ 0x46, 0x00, 0x4F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBD, 0x04, 0xEF, 0xFE,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x44, 0x00, 0x00, 0x00, 0x01, 0x00, 0x56, 0x00, 0x61, 0x00, 0x72, 0x00,
+ 0x46, 0x00, 0x69, 0x00, 0x6C, 0x00, 0x65, 0x00, 0x49, 0x00, 0x6E, 0x00,
+ 0x66, 0x00, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x54, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6E, 0x00, 0x73, 0x00,
+ 0x6C, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x04, 0x34, 0x02, 0x00, 0x00,
+ 0x01, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6E, 0x00,
+ 0x67, 0x00, 0x46, 0x00, 0x69, 0x00, 0x6C, 0x00, 0x65, 0x00, 0x49, 0x00,
+ 0x6E, 0x00, 0x66, 0x00, 0x6F, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00,
+ 0x01, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00,
+ 0x34, 0x00, 0x62, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x02, 0x00,
+ 0x01, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x6D, 0x00, 0x6D, 0x00, 0x65, 0x00,
+ 0x6E, 0x00, 0x74, 0x00, 0x73, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x24, 0x00, 0x02, 0x00, 0x01, 0x00, 0x43, 0x00, 0x6F, 0x00, 0x6D, 0x00,
+ 0x70, 0x00, 0x61, 0x00, 0x6E, 0x00, 0x79, 0x00, 0x4E, 0x00, 0x61, 0x00,
+ 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x2C, 0x00, 0x02, 0x00, 0x01, 0x00, 0x46, 0x00, 0x69, 0x00, 0x6C, 0x00,
+ 0x65, 0x00, 0x44, 0x00, 0x65, 0x00, 0x73, 0x00, 0x63, 0x00, 0x72, 0x00,
+ 0x69, 0x00, 0x70, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x30, 0x00, 0x08, 0x00,
+ 0x01, 0x00, 0x46, 0x00, 0x69, 0x00, 0x6C, 0x00, 0x65, 0x00, 0x56, 0x00,
+ 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x2E, 0x00,
+ 0x30, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0B, 0x00,
+ 0x01, 0x00, 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00,
+ 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00,
+ 0x65, 0x00, 0x00, 0x00, 0x43, 0x00, 0x6C, 0x00, 0x61, 0x00, 0x73, 0x00,
+ 0x73, 0x00, 0x31, 0x00, 0x2E, 0x00, 0x65, 0x00, 0x78, 0x00, 0x65, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x02, 0x00, 0x01, 0x00, 0x4C, 0x00,
+ 0x65, 0x00, 0x67, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x43, 0x00, 0x6F, 0x00,
+ 0x70, 0x00, 0x79, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x68, 0x00,
+ 0x74, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x02, 0x00,
+ 0x01, 0x00, 0x4C, 0x00, 0x65, 0x00, 0x67, 0x00, 0x61, 0x00, 0x6C, 0x00,
+ 0x54, 0x00, 0x72, 0x00, 0x61, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6D, 0x00,
+ 0x61, 0x00, 0x72, 0x00, 0x6B, 0x00, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x0B, 0x00, 0x01, 0x00, 0x4F, 0x00,
+ 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x61, 0x00,
+ 0x6C, 0x00, 0x46, 0x00, 0x69, 0x00, 0x6C, 0x00, 0x65, 0x00, 0x6E, 0x00,
+ 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x43, 0x00, 0x6C, 0x00,
+ 0x61, 0x00, 0x73, 0x00, 0x73, 0x00, 0x31, 0x00, 0x2E, 0x00, 0x65, 0x00,
+ 0x78, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x02, 0x00,
+ 0x01, 0x00, 0x50, 0x00, 0x72, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x63, 0x00, 0x74, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x34, 0x00, 0x08, 0x00,
+ 0x01, 0x00, 0x50, 0x00, 0x72, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x75, 0x00,
+ 0x63, 0x00, 0x74, 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00,
+ 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x00, 0x00, 0x30, 0x00, 0x2E, 0x00,
+ 0x30, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x00, 0x00,
+ 0x38, 0x00, 0x08, 0x00, 0x01, 0x00, 0x41, 0x00, 0x73, 0x00, 0x73, 0x00,
+ 0x65, 0x00, 0x6D, 0x00, 0x62, 0x00, 0x6C, 0x00, 0x79, 0x00, 0x20, 0x00,
+ 0x56, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6F, 0x00,
+ 0x6E, 0x00, 0x00, 0x00, 0x30, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x2E, 0x00,
+ 0x30, 0x00, 0x2E, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
+ 0x20, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xA8, 0x11, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x30, 0x82, 0x11, 0x97,
+ 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x02, 0xA0,
+ 0x82, 0x11, 0x88, 0x30, 0x82, 0x11, 0x84, 0x02, 0x01, 0x01, 0x31, 0x0E,
+ 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05,
+ 0x05, 0x00, 0x30, 0x67, 0x06, 0x0A, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82,
+ 0x37, 0x02, 0x01, 0x04, 0xA0, 0x59, 0x30, 0x57, 0x30, 0x33, 0x06, 0x0A,
+ 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x02, 0x01, 0x0F, 0x30, 0x25,
+ 0x03, 0x01, 0x00, 0xA0, 0x20, 0xA2, 0x1E, 0x80, 0x1C, 0x00, 0x3C, 0x00,
+ 0x3C, 0x00, 0x3C, 0x00, 0x4F, 0x00, 0x62, 0x00, 0x73, 0x00, 0x6F, 0x00,
+ 0x6C, 0x00, 0x65, 0x00, 0x74, 0x00, 0x65, 0x00, 0x3E, 0x00, 0x3E, 0x00,
+ 0x3E, 0x30, 0x20, 0x30, 0x0C, 0x06, 0x08, 0x2A, 0x86, 0x48, 0x86, 0xF7,
+ 0x0D, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10, 0x35, 0xA5, 0x21, 0x3B, 0xFC,
+ 0xFE, 0xFA, 0x40, 0x97, 0xAA, 0xBB, 0xDE, 0x3B, 0x52, 0x15, 0x6F, 0xA0,
+ 0x82, 0x0C, 0xF4, 0x30, 0x82, 0x02, 0xBC, 0x30, 0x82, 0x02, 0x25, 0x02,
+ 0x10, 0x4A, 0x19, 0xD2, 0x38, 0x8C, 0x82, 0x59, 0x1C, 0xA5, 0x5D, 0x73,
+ 0x5F, 0x15, 0x5D, 0xDC, 0xA3, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48,
+ 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x04, 0x05, 0x00, 0x30, 0x81, 0x9E, 0x31,
+ 0x1F, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x16, 0x56, 0x65,
+ 0x72, 0x69, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x54, 0x72, 0x75, 0x73, 0x74,
+ 0x20, 0x4E, 0x65, 0x74, 0x77, 0x6F, 0x72, 0x6B, 0x31, 0x17, 0x30, 0x15,
+ 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x0E, 0x56, 0x65, 0x72, 0x69, 0x53,
+ 0x69, 0x67, 0x6E, 0x2C, 0x20, 0x49, 0x6E, 0x63, 0x2E, 0x31, 0x2C, 0x30,
+ 0x2A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x23, 0x56, 0x65, 0x72, 0x69,
+ 0x53, 0x69, 0x67, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x53, 0x74,
+ 0x61, 0x6D, 0x70, 0x69, 0x6E, 0x67, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x31, 0x34, 0x30, 0x32, 0x06,
+ 0x03, 0x55, 0x04, 0x0B, 0x13, 0x2B, 0x4E, 0x4F, 0x20, 0x4C, 0x49, 0x41,
+ 0x42, 0x49, 0x4C, 0x49, 0x54, 0x59, 0x20, 0x41, 0x43, 0x43, 0x45, 0x50,
+ 0x54, 0x45, 0x44, 0x2C, 0x20, 0x28, 0x63, 0x29, 0x39, 0x37, 0x20, 0x56,
+ 0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6E, 0x2C, 0x20, 0x49, 0x6E, 0x63,
+ 0x2E, 0x30, 0x1E, 0x17, 0x0D, 0x39, 0x37, 0x30, 0x35, 0x31, 0x32, 0x30,
+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x5A, 0x17, 0x0D, 0x30, 0x34, 0x30, 0x31,
+ 0x30, 0x37, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5A, 0x30, 0x81, 0x9E,
+ 0x31, 0x1F, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x16, 0x56,
+ 0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x54, 0x72, 0x75, 0x73,
+ 0x74, 0x20, 0x4E, 0x65, 0x74, 0x77, 0x6F, 0x72, 0x6B, 0x31, 0x17, 0x30,
+ 0x15, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x0E, 0x56, 0x65, 0x72, 0x69,
+ 0x53, 0x69, 0x67, 0x6E, 0x2C, 0x20, 0x49, 0x6E, 0x63, 0x2E, 0x31, 0x2C,
+ 0x30, 0x2A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x23, 0x56, 0x65, 0x72,
+ 0x69, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x53,
+ 0x74, 0x61, 0x6D, 0x70, 0x69, 0x6E, 0x67, 0x20, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x31, 0x34, 0x30, 0x32,
+ 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x2B, 0x4E, 0x4F, 0x20, 0x4C, 0x49,
+ 0x41, 0x42, 0x49, 0x4C, 0x49, 0x54, 0x59, 0x20, 0x41, 0x43, 0x43, 0x45,
+ 0x50, 0x54, 0x45, 0x44, 0x2C, 0x20, 0x28, 0x63, 0x29, 0x39, 0x37, 0x20,
+ 0x56, 0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6E, 0x2C, 0x20, 0x49, 0x6E,
+ 0x63, 0x2E, 0x30, 0x81, 0x9F, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48,
+ 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81, 0x8D, 0x00,
+ 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xD3, 0x2E, 0x20, 0xF0, 0x68,
+ 0x7C, 0x2C, 0x2D, 0x2E, 0x81, 0x1C, 0xB1, 0x06, 0xB2, 0xA7, 0x0B, 0xB7,
+ 0x11, 0x0D, 0x57, 0xDA, 0x53, 0xD8, 0x75, 0xE3, 0xC9, 0x33, 0x2A, 0xB2,
+ 0xD4, 0xF6, 0x09, 0x5B, 0x34, 0xF3, 0xE9, 0x90, 0xFE, 0x09, 0x0C, 0xD0,
+ 0xDB, 0x1B, 0x5A, 0xB9, 0xCD, 0xE7, 0xF6, 0x88, 0xB1, 0x9D, 0xC0, 0x87,
+ 0x25, 0xEB, 0x7D, 0x58, 0x10, 0x73, 0x6A, 0x78, 0xCB, 0x71, 0x15, 0xFD,
+ 0xC6, 0x58, 0xF6, 0x29, 0xAB, 0x58, 0x5E, 0x96, 0x04, 0xFD, 0x2D, 0x62,
+ 0x11, 0x58, 0x81, 0x1C, 0xCA, 0x71, 0x94, 0xD5, 0x22, 0x58, 0x2F, 0xD5,
+ 0xCC, 0x14, 0x05, 0x84, 0x36, 0xBA, 0x94, 0xAA, 0xB4, 0x4D, 0x4A, 0xE9,
+ 0xEE, 0x3B, 0x22, 0xAD, 0x56, 0x99, 0x7E, 0x21, 0x9C, 0x6C, 0x86, 0xC0,
+ 0x4A, 0x47, 0x97, 0x6A, 0xB4, 0xA6, 0x36, 0xD5, 0xFC, 0x09, 0x2D, 0xD3,
+ 0xB4, 0x39, 0x9B, 0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x0D, 0x06, 0x09,
+ 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x04, 0x05, 0x00, 0x03,
+ 0x81, 0x81, 0x00, 0x61, 0x55, 0x0E, 0x3E, 0x7B, 0xC7, 0x92, 0x12, 0x7E,
+ 0x11, 0x10, 0x8E, 0x22, 0xCC, 0xD4, 0xB3, 0x13, 0x2B, 0x5B, 0xE8, 0x44,
+ 0xE4, 0x0B, 0x78, 0x9E, 0xA4, 0x7E, 0xF3, 0xA7, 0x07, 0x72, 0x1E, 0xE2,
+ 0x59, 0xEF, 0xCC, 0x84, 0xE3, 0x89, 0x94, 0x4C, 0xDB, 0x4E, 0x61, 0xEF,
+ 0xB3, 0xA4, 0xFB, 0x46, 0x3D, 0x50, 0x34, 0x0B, 0x9F, 0x70, 0x56, 0xF6,
+ 0x8E, 0x2A, 0x7F, 0x17, 0xCE, 0xE5, 0x63, 0xBF, 0x79, 0x69, 0x07, 0x73,
+ 0x2E, 0xB0, 0x95, 0x28, 0x8A, 0xF5, 0xED, 0xAA, 0xA9, 0xD2, 0x5D, 0xCD,
+ 0x0A, 0xCA, 0x10, 0x09, 0x8F, 0xCE, 0xB3, 0xAF, 0x28, 0x96, 0xC4, 0x79,
+ 0x29, 0x84, 0x92, 0xDC, 0xFF, 0xBA, 0x67, 0x42, 0x48, 0xA6, 0x90, 0x10,
+ 0xE4, 0xBF, 0x61, 0xF8, 0x9C, 0x53, 0xE5, 0x93, 0xD1, 0x73, 0x3F, 0xF8,
+ 0xFD, 0x9D, 0x4F, 0x84, 0xAC, 0x55, 0xD1, 0xFD, 0x11, 0x63, 0x63, 0x30,
+ 0x82, 0x03, 0x13, 0x30, 0x82, 0x02, 0x7C, 0xA0, 0x03, 0x02, 0x01, 0x02,
+ 0x02, 0x01, 0x01, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7,
+ 0x0D, 0x01, 0x01, 0x04, 0x05, 0x00, 0x30, 0x81, 0xC4, 0x31, 0x0B, 0x30,
+ 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x5A, 0x41, 0x31, 0x15,
+ 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0C, 0x57, 0x65, 0x73,
+ 0x74, 0x65, 0x72, 0x6E, 0x20, 0x43, 0x61, 0x70, 0x65, 0x31, 0x12, 0x30,
+ 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61, 0x70, 0x65,
+ 0x20, 0x54, 0x6F, 0x77, 0x6E, 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x03, 0x55,
+ 0x04, 0x0A, 0x13, 0x14, 0x54, 0x68, 0x61, 0x77, 0x74, 0x65, 0x20, 0x43,
+ 0x6F, 0x6E, 0x73, 0x75, 0x6C, 0x74, 0x69, 0x6E, 0x67, 0x20, 0x63, 0x63,
+ 0x31, 0x28, 0x30, 0x26, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x1F, 0x43,
+ 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E,
+ 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x44, 0x69,
+ 0x76, 0x69, 0x73, 0x69, 0x6F, 0x6E, 0x31, 0x19, 0x30, 0x17, 0x06, 0x03,
+ 0x55, 0x04, 0x03, 0x13, 0x10, 0x54, 0x68, 0x61, 0x77, 0x74, 0x65, 0x20,
+ 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x43, 0x41, 0x31, 0x26, 0x30,
+ 0x24, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01,
+ 0x16, 0x17, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2D, 0x63, 0x65, 0x72,
+ 0x74, 0x73, 0x40, 0x74, 0x68, 0x61, 0x77, 0x74, 0x65, 0x2E, 0x63, 0x6F,
+ 0x6D, 0x30, 0x1E, 0x17, 0x0D, 0x39, 0x36, 0x30, 0x38, 0x30, 0x31, 0x30,
+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x5A, 0x17, 0x0D, 0x32, 0x30, 0x31, 0x32,
+ 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5A, 0x30, 0x81, 0xC4,
+ 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x5A,
+ 0x41, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0C,
+ 0x57, 0x65, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x43, 0x61, 0x70, 0x65,
+ 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43,
+ 0x61, 0x70, 0x65, 0x20, 0x54, 0x6F, 0x77, 0x6E, 0x31, 0x1D, 0x30, 0x1B,
+ 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x14, 0x54, 0x68, 0x61, 0x77, 0x74,
+ 0x65, 0x20, 0x43, 0x6F, 0x6E, 0x73, 0x75, 0x6C, 0x74, 0x69, 0x6E, 0x67,
+ 0x20, 0x63, 0x63, 0x31, 0x28, 0x30, 0x26, 0x06, 0x03, 0x55, 0x04, 0x0B,
+ 0x13, 0x1F, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
+ 0x69, 0x6F, 0x6E, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
+ 0x20, 0x44, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6F, 0x6E, 0x31, 0x19, 0x30,
+ 0x17, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x10, 0x54, 0x68, 0x61, 0x77,
+ 0x74, 0x65, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x43, 0x41,
+ 0x31, 0x26, 0x30, 0x24, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D,
+ 0x01, 0x09, 0x01, 0x16, 0x17, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2D,
+ 0x63, 0x65, 0x72, 0x74, 0x73, 0x40, 0x74, 0x68, 0x61, 0x77, 0x74, 0x65,
+ 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x81, 0x9F, 0x30, 0x0D, 0x06, 0x09, 0x2A,
+ 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81,
+ 0x8D, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81, 0x00, 0xD3, 0xA4, 0x50,
+ 0x6E, 0xC8, 0xFF, 0x56, 0x6B, 0xE6, 0xCF, 0x5D, 0xB6, 0xEA, 0x0C, 0x68,
+ 0x75, 0x47, 0xA2, 0xAA, 0xC2, 0xDA, 0x84, 0x25, 0xFC, 0xA8, 0xF4, 0x47,
+ 0x51, 0xDA, 0x85, 0xB5, 0x20, 0x74, 0x94, 0x86, 0x1E, 0x0F, 0x75, 0xC9,
+ 0xE9, 0x08, 0x61, 0xF5, 0x06, 0x6D, 0x30, 0x6E, 0x15, 0x19, 0x02, 0xE9,
+ 0x52, 0xC0, 0x62, 0xDB, 0x4D, 0x99, 0x9E, 0xE2, 0x6A, 0x0C, 0x44, 0x38,
+ 0xCD, 0xFE, 0xBE, 0xE3, 0x64, 0x09, 0x70, 0xC5, 0xFE, 0xB1, 0x6B, 0x29,
+ 0xB6, 0x2F, 0x49, 0xC8, 0x3B, 0xD4, 0x27, 0x04, 0x25, 0x10, 0x97, 0x2F,
+ 0xE7, 0x90, 0x6D, 0xC0, 0x28, 0x42, 0x99, 0xD7, 0x4C, 0x43, 0xDE, 0xC3,
+ 0xF5, 0x21, 0x6D, 0x54, 0x9F, 0x5D, 0xC3, 0x58, 0xE1, 0xC0, 0xE4, 0xD9,
+ 0x5B, 0xB0, 0xB8, 0xDC, 0xB4, 0x7B, 0xDF, 0x36, 0x3A, 0xC2, 0xB5, 0x66,
+ 0x22, 0x12, 0xD6, 0x87, 0x0D, 0x02, 0x03, 0x01, 0x00, 0x01, 0xA3, 0x13,
+ 0x30, 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF,
+ 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xFF, 0x30, 0x0D, 0x06, 0x09, 0x2A,
+ 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x04, 0x05, 0x00, 0x03, 0x81,
+ 0x81, 0x00, 0x07, 0xFA, 0x4C, 0x69, 0x5C, 0xFB, 0x95, 0xCC, 0x46, 0xEE,
+ 0x85, 0x83, 0x4D, 0x21, 0x30, 0x8E, 0xCA, 0xD9, 0xA8, 0x6F, 0x49, 0x1A,
+ 0xE6, 0xDA, 0x51, 0xE3, 0x60, 0x70, 0x6C, 0x84, 0x61, 0x11, 0xA1, 0x1A,
+ 0xC8, 0x48, 0x3E, 0x59, 0x43, 0x7D, 0x4F, 0x95, 0x3D, 0xA1, 0x8B, 0xB7,
+ 0x0B, 0x62, 0x98, 0x7A, 0x75, 0x8A, 0xDD, 0x88, 0x4E, 0x4E, 0x9E, 0x40,
+ 0xDB, 0xA8, 0xCC, 0x32, 0x74, 0xB9, 0x6F, 0x0D, 0xC6, 0xE3, 0xB3, 0x44,
+ 0x0B, 0xD9, 0x8A, 0x6F, 0x9A, 0x29, 0x9B, 0x99, 0x18, 0x28, 0x3B, 0xD1,
+ 0xE3, 0x40, 0x28, 0x9A, 0x5A, 0x3C, 0xD5, 0xB5, 0xE7, 0x20, 0x1B, 0x8B,
+ 0xCA, 0xA4, 0xAB, 0x8D, 0xE9, 0x51, 0xD9, 0xE2, 0x4C, 0x2C, 0x59, 0xA9,
+ 0xDA, 0xB9, 0xB2, 0x75, 0x1B, 0xF6, 0x42, 0xF2, 0xEF, 0xC7, 0xF2, 0x18,
+ 0xF9, 0x89, 0xBC, 0xA3, 0xFF, 0x8A, 0x23, 0x2E, 0x70, 0x47, 0x30, 0x82,
+ 0x03, 0x13, 0x30, 0x82, 0x02, 0x7C, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02,
+ 0x03, 0x09, 0xCE, 0x15, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86,
+ 0xF7, 0x0D, 0x01, 0x01, 0x04, 0x05, 0x00, 0x30, 0x81, 0xC4, 0x31, 0x0B,
+ 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x5A, 0x41, 0x31,
+ 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0C, 0x57, 0x65,
+ 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x43, 0x61, 0x70, 0x65, 0x31, 0x12,
+ 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43, 0x61, 0x70,
+ 0x65, 0x20, 0x54, 0x6F, 0x77, 0x6E, 0x31, 0x1D, 0x30, 0x1B, 0x06, 0x03,
+ 0x55, 0x04, 0x0A, 0x13, 0x14, 0x54, 0x68, 0x61, 0x77, 0x74, 0x65, 0x20,
+ 0x43, 0x6F, 0x6E, 0x73, 0x75, 0x6C, 0x74, 0x69, 0x6E, 0x67, 0x20, 0x63,
+ 0x63, 0x31, 0x28, 0x30, 0x26, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x1F,
+ 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6F,
+ 0x6E, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x44,
+ 0x69, 0x76, 0x69, 0x73, 0x69, 0x6F, 0x6E, 0x31, 0x19, 0x30, 0x17, 0x06,
+ 0x03, 0x55, 0x04, 0x03, 0x13, 0x10, 0x54, 0x68, 0x61, 0x77, 0x74, 0x65,
+ 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x43, 0x41, 0x31, 0x26,
+ 0x30, 0x24, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09,
+ 0x01, 0x16, 0x17, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2D, 0x63, 0x65,
+ 0x72, 0x74, 0x73, 0x40, 0x74, 0x68, 0x61, 0x77, 0x74, 0x65, 0x2E, 0x63,
+ 0x6F, 0x6D, 0x30, 0x1E, 0x17, 0x0D, 0x30, 0x33, 0x30, 0x31, 0x31, 0x35,
+ 0x30, 0x36, 0x33, 0x35, 0x32, 0x37, 0x5A, 0x17, 0x0D, 0x30, 0x34, 0x30,
+ 0x32, 0x30, 0x38, 0x30, 0x39, 0x35, 0x30, 0x35, 0x32, 0x5A, 0x30, 0x81,
+ 0x9C, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
+ 0x43, 0x41, 0x31, 0x0F, 0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13,
+ 0x06, 0x51, 0x75, 0x65, 0x62, 0x65, 0x63, 0x31, 0x0F, 0x30, 0x0D, 0x06,
+ 0x03, 0x55, 0x04, 0x07, 0x13, 0x06, 0x51, 0x75, 0x65, 0x62, 0x65, 0x63,
+ 0x31, 0x20, 0x30, 0x1E, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x17, 0x4D,
+ 0x6F, 0x74, 0x75, 0x73, 0x20, 0x54, 0x65, 0x63, 0x68, 0x6E, 0x6F, 0x6C,
+ 0x6F, 0x67, 0x69, 0x65, 0x73, 0x20, 0x49, 0x6E, 0x63, 0x2E, 0x31, 0x27,
+ 0x30, 0x25, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x1E, 0x53, 0x65, 0x63,
+ 0x75, 0x72, 0x65, 0x20, 0x41, 0x70, 0x70, 0x6C, 0x69, 0x63, 0x61, 0x74,
+ 0x69, 0x6F, 0x6E, 0x20, 0x44, 0x65, 0x76, 0x65, 0x6C, 0x6F, 0x70, 0x6D,
+ 0x65, 0x6E, 0x74, 0x31, 0x20, 0x30, 0x1E, 0x06, 0x03, 0x55, 0x04, 0x03,
+ 0x13, 0x17, 0x4D, 0x6F, 0x74, 0x75, 0x73, 0x20, 0x54, 0x65, 0x63, 0x68,
+ 0x6E, 0x6F, 0x6C, 0x6F, 0x67, 0x69, 0x65, 0x73, 0x20, 0x49, 0x6E, 0x63,
+ 0x2E, 0x30, 0x5C, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7,
+ 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x4B, 0x00, 0x30, 0x48, 0x02,
+ 0x41, 0x00, 0xC5, 0x46, 0xCD, 0xDA, 0xE2, 0x72, 0xC5, 0x63, 0x5B, 0xE5,
+ 0xAC, 0x2A, 0x3A, 0x61, 0xFA, 0x63, 0x1F, 0xC3, 0xC9, 0x32, 0x82, 0x9D,
+ 0xBD, 0x83, 0x56, 0x50, 0x07, 0x66, 0x45, 0xB4, 0x6C, 0xFF, 0x4A, 0x68,
+ 0x37, 0xB4, 0x6B, 0xA3, 0x92, 0x1E, 0xA8, 0x35, 0xC7, 0x06, 0xCB, 0xE1,
+ 0x39, 0x22, 0xB5, 0x0E, 0xA1, 0x7B, 0x7B, 0x33, 0x16, 0x6F, 0xA7, 0x14,
+ 0xE5, 0x51, 0x1A, 0x7D, 0x41, 0xB5, 0x02, 0x03, 0x01, 0x00, 0x01, 0xA3,
+ 0x7D, 0x30, 0x7B, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x25, 0x04, 0x18,
+ 0x30, 0x16, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x03,
+ 0x06, 0x0A, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x02, 0x01, 0x16,
+ 0x30, 0x11, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x42, 0x01,
+ 0x01, 0x04, 0x04, 0x03, 0x02, 0x04, 0x10, 0x30, 0x1D, 0x06, 0x03, 0x55,
+ 0x1D, 0x04, 0x04, 0x16, 0x30, 0x14, 0x30, 0x0E, 0x30, 0x0C, 0x06, 0x0A,
+ 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x02, 0x01, 0x16, 0x03, 0x02,
+ 0x07, 0x80, 0x30, 0x18, 0x06, 0x03, 0x55, 0x1D, 0x11, 0x04, 0x11, 0x30,
+ 0x0F, 0x82, 0x0D, 0x77, 0x77, 0x77, 0x2E, 0x6D, 0x6F, 0x74, 0x75, 0x73,
+ 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x0C, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x01,
+ 0x01, 0xFF, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86,
+ 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x04, 0x05, 0x00, 0x03, 0x81, 0x81,
+ 0x00, 0x6D, 0xD6, 0x83, 0xDA, 0x39, 0xA2, 0xD8, 0x81, 0x12, 0x8D, 0xA5,
+ 0x3E, 0xE5, 0xB7, 0xBE, 0x17, 0x42, 0x34, 0x6C, 0x34, 0xF7, 0x92, 0x89,
+ 0x28, 0xD0, 0xE7, 0xF2, 0xAA, 0x91, 0xAA, 0x76, 0x40, 0xE2, 0x0B, 0xC3,
+ 0x5A, 0x61, 0x3F, 0x00, 0x21, 0x68, 0x8E, 0xB3, 0x20, 0xCD, 0x42, 0x47,
+ 0x6B, 0x14, 0xB2, 0x60, 0x36, 0x28, 0xC9, 0xC6, 0x97, 0xB5, 0xC3, 0x9F,
+ 0x23, 0xED, 0xF6, 0x9B, 0xC9, 0x80, 0x07, 0x10, 0x0F, 0xA2, 0x54, 0x63,
+ 0x5E, 0x13, 0x21, 0xBC, 0xD1, 0xAB, 0xEE, 0x96, 0xB7, 0xF8, 0x4D, 0x39,
+ 0x8B, 0xB6, 0xDC, 0x49, 0x60, 0x3B, 0xAB, 0x7B, 0x4A, 0x38, 0x77, 0x7A,
+ 0x2F, 0x34, 0x26, 0xF6, 0xE7, 0x6D, 0x9A, 0x27, 0x4E, 0xF6, 0x69, 0x13,
+ 0xB2, 0x84, 0xEB, 0x23, 0xC3, 0x7A, 0x8C, 0x6B, 0xA2, 0xF6, 0x04, 0xDD,
+ 0x45, 0xF3, 0xC5, 0x76, 0x5C, 0x35, 0xF6, 0x2A, 0x3E, 0x30, 0x82, 0x04,
+ 0x02, 0x30, 0x82, 0x03, 0x6B, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10,
+ 0x08, 0x7A, 0x6D, 0x5C, 0x6F, 0x62, 0x93, 0x4F, 0xBA, 0xC4, 0xFD, 0x43,
+ 0xE1, 0x14, 0x18, 0x9D, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86,
+ 0xF7, 0x0D, 0x01, 0x01, 0x04, 0x05, 0x00, 0x30, 0x81, 0x9E, 0x31, 0x1F,
+ 0x30, 0x1D, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x16, 0x56, 0x65, 0x72,
+ 0x69, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x54, 0x72, 0x75, 0x73, 0x74, 0x20,
+ 0x4E, 0x65, 0x74, 0x77, 0x6F, 0x72, 0x6B, 0x31, 0x17, 0x30, 0x15, 0x06,
+ 0x03, 0x55, 0x04, 0x0B, 0x13, 0x0E, 0x56, 0x65, 0x72, 0x69, 0x53, 0x69,
+ 0x67, 0x6E, 0x2C, 0x20, 0x49, 0x6E, 0x63, 0x2E, 0x31, 0x2C, 0x30, 0x2A,
+ 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x23, 0x56, 0x65, 0x72, 0x69, 0x53,
+ 0x69, 0x67, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x53, 0x74, 0x61,
+ 0x6D, 0x70, 0x69, 0x6E, 0x67, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x31, 0x34, 0x30, 0x32, 0x06, 0x03,
+ 0x55, 0x04, 0x0B, 0x13, 0x2B, 0x4E, 0x4F, 0x20, 0x4C, 0x49, 0x41, 0x42,
+ 0x49, 0x4C, 0x49, 0x54, 0x59, 0x20, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54,
+ 0x45, 0x44, 0x2C, 0x20, 0x28, 0x63, 0x29, 0x39, 0x37, 0x20, 0x56, 0x65,
+ 0x72, 0x69, 0x53, 0x69, 0x67, 0x6E, 0x2C, 0x20, 0x49, 0x6E, 0x63, 0x2E,
+ 0x30, 0x1E, 0x17, 0x0D, 0x30, 0x31, 0x30, 0x32, 0x32, 0x38, 0x30, 0x30,
+ 0x30, 0x30, 0x30, 0x30, 0x5A, 0x17, 0x0D, 0x30, 0x34, 0x30, 0x31, 0x30,
+ 0x36, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5A, 0x30, 0x81, 0xA0, 0x31,
+ 0x17, 0x30, 0x15, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x0E, 0x56, 0x65,
+ 0x72, 0x69, 0x53, 0x69, 0x67, 0x6E, 0x2C, 0x20, 0x49, 0x6E, 0x63, 0x2E,
+ 0x31, 0x1F, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x16, 0x56,
+ 0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x54, 0x72, 0x75, 0x73,
+ 0x74, 0x20, 0x4E, 0x65, 0x74, 0x77, 0x6F, 0x72, 0x6B, 0x31, 0x3B, 0x30,
+ 0x39, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x32, 0x54, 0x65, 0x72, 0x6D,
+ 0x73, 0x20, 0x6F, 0x66, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x74, 0x20,
+ 0x68, 0x74, 0x74, 0x70, 0x73, 0x3A, 0x2F, 0x2F, 0x77, 0x77, 0x77, 0x2E,
+ 0x76, 0x65, 0x72, 0x69, 0x73, 0x69, 0x67, 0x6E, 0x2E, 0x63, 0x6F, 0x6D,
+ 0x2F, 0x72, 0x70, 0x61, 0x20, 0x28, 0x63, 0x29, 0x30, 0x31, 0x31, 0x27,
+ 0x30, 0x25, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x1E, 0x56, 0x65, 0x72,
+ 0x69, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x53,
+ 0x74, 0x61, 0x6D, 0x70, 0x69, 0x6E, 0x67, 0x20, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A,
+ 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82,
+ 0x01, 0x0F, 0x00, 0x30, 0x82, 0x01, 0x0A, 0x02, 0x82, 0x01, 0x01, 0x00,
+ 0xC0, 0x7A, 0x61, 0x87, 0xEB, 0xB2, 0xA7, 0x03, 0x63, 0x1B, 0x2B, 0x1A,
+ 0x61, 0xDE, 0x80, 0xB7, 0x15, 0x1D, 0xA0, 0x8B, 0x90, 0x3D, 0xBB, 0x27,
+ 0x92, 0x84, 0x14, 0x39, 0xEB, 0x85, 0xCE, 0x29, 0x92, 0x06, 0x66, 0x48,
+ 0xA4, 0x03, 0x4F, 0x8D, 0xE8, 0x4F, 0xA7, 0xF0, 0xAF, 0x5E, 0xD1, 0x2F,
+ 0x19, 0xC7, 0x91, 0xF1, 0xB5, 0x9E, 0x7B, 0x91, 0x21, 0xCE, 0xE9, 0xFF,
+ 0xE3, 0x4E, 0xF0, 0xFC, 0xAF, 0x95, 0x58, 0xB8, 0x63, 0x2D, 0xE6, 0x8E,
+ 0xF6, 0x29, 0x18, 0xCD, 0x70, 0x8E, 0x50, 0xC3, 0xED, 0x96, 0xBB, 0x40,
+ 0xDB, 0xBE, 0x25, 0xE8, 0x42, 0x55, 0xD6, 0xF6, 0x85, 0xF2, 0x06, 0xE7,
+ 0x8B, 0x99, 0x1C, 0x31, 0xF3, 0x03, 0x0F, 0xD4, 0x4C, 0x9C, 0x24, 0x2A,
+ 0xDC, 0x1B, 0x1B, 0x8F, 0x82, 0xF3, 0xB0, 0xEF, 0xA7, 0x4D, 0xE3, 0x14,
+ 0xA7, 0xE0, 0x8F, 0xD6, 0xC7, 0x68, 0xC2, 0x61, 0x58, 0xA9, 0x72, 0xD4,
+ 0xF8, 0x30, 0x48, 0x4F, 0xD9, 0x2F, 0x6F, 0x63, 0x20, 0xD9, 0x89, 0xCA,
+ 0x82, 0x7B, 0xC2, 0x4B, 0xBC, 0x28, 0xC5, 0x81, 0x68, 0xE7, 0xE6, 0x82,
+ 0x40, 0xAC, 0x46, 0x3A, 0xA0, 0xF9, 0x3F, 0x36, 0xCD, 0x4C, 0xBB, 0x54,
+ 0x42, 0x5A, 0x7A, 0x65, 0x7B, 0xFE, 0x84, 0xE4, 0xC7, 0x47, 0x54, 0xAC,
+ 0xB9, 0x3D, 0xEC, 0x80, 0xC7, 0x1A, 0xF7, 0xC4, 0x33, 0x81, 0x81, 0xC9,
+ 0x2A, 0x95, 0xFB, 0x7F, 0x5E, 0x3A, 0x87, 0x90, 0x14, 0xDB, 0xCC, 0x2E,
+ 0x75, 0xF2, 0xEF, 0x6B, 0xE6, 0x3D, 0xA9, 0x60, 0xBE, 0x42, 0x01, 0xAA,
+ 0x4F, 0xAA, 0x5B, 0xA8, 0x3F, 0x22, 0x31, 0x9F, 0x12, 0x15, 0xF9, 0x73,
+ 0xA1, 0x1E, 0x82, 0x8B, 0x04, 0x2B, 0xEA, 0x46, 0x02, 0x4C, 0x6D, 0x8F,
+ 0x1F, 0x50, 0x2E, 0x95, 0x4B, 0x2A, 0x78, 0x06, 0x84, 0x74, 0x3D, 0x91,
+ 0x8F, 0x2C, 0x47, 0x31, 0x02, 0x03, 0x01, 0x00, 0x01, 0xA3, 0x81, 0xB8,
+ 0x30, 0x81, 0xB5, 0x30, 0x40, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05,
+ 0x07, 0x01, 0x01, 0x04, 0x34, 0x30, 0x32, 0x30, 0x30, 0x06, 0x08, 0x2B,
+ 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x24, 0x68, 0x74, 0x74,
+ 0x70, 0x3A, 0x2F, 0x2F, 0x6F, 0x63, 0x73, 0x70, 0x2E, 0x76, 0x65, 0x72,
+ 0x69, 0x73, 0x69, 0x67, 0x6E, 0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x6F, 0x63,
+ 0x73, 0x70, 0x2F, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x09, 0x06,
+ 0x03, 0x55, 0x1D, 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x44, 0x06, 0x03,
+ 0x55, 0x1D, 0x20, 0x04, 0x3D, 0x30, 0x3B, 0x30, 0x39, 0x06, 0x0B, 0x60,
+ 0x86, 0x48, 0x01, 0x86, 0xF8, 0x45, 0x01, 0x07, 0x01, 0x01, 0x30, 0x2A,
+ 0x30, 0x28, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05, 0x07, 0x02, 0x01,
+ 0x16, 0x1C, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3A, 0x2F, 0x2F, 0x77, 0x77,
+ 0x77, 0x2E, 0x76, 0x65, 0x72, 0x69, 0x73, 0x69, 0x67, 0x6E, 0x2E, 0x63,
+ 0x6F, 0x6D, 0x2F, 0x72, 0x70, 0x61, 0x30, 0x13, 0x06, 0x03, 0x55, 0x1D,
+ 0x25, 0x04, 0x0C, 0x30, 0x0A, 0x06, 0x08, 0x2B, 0x06, 0x01, 0x05, 0x05,
+ 0x07, 0x03, 0x08, 0x30, 0x0B, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x04, 0x04,
+ 0x03, 0x02, 0x06, 0xC0, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86,
+ 0xF7, 0x0D, 0x01, 0x01, 0x04, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x2D,
+ 0xF3, 0x4F, 0x63, 0x60, 0x2C, 0x18, 0xDA, 0xF5, 0x24, 0x0F, 0x52, 0xB3,
+ 0x0C, 0xEB, 0xB3, 0xBC, 0x67, 0x85, 0xC2, 0x23, 0xED, 0x8F, 0x46, 0x0D,
+ 0xCF, 0x1A, 0x4D, 0xBE, 0xF3, 0x7C, 0x7A, 0x20, 0x30, 0x32, 0x18, 0x68,
+ 0x8B, 0x92, 0xBB, 0x32, 0x99, 0xF0, 0x93, 0xB8, 0x3B, 0x15, 0x06, 0x27,
+ 0x7B, 0x3E, 0x02, 0x06, 0x00, 0xA4, 0x21, 0x92, 0x84, 0x13, 0x0A, 0xC5,
+ 0x98, 0xE5, 0x40, 0x57, 0xC5, 0x05, 0x25, 0xE8, 0xAF, 0xAF, 0x11, 0x6A,
+ 0xA9, 0xE5, 0x3B, 0xCB, 0xE9, 0x23, 0xF6, 0x94, 0x29, 0x5D, 0x40, 0x55,
+ 0xF3, 0xA5, 0x53, 0x9D, 0xC8, 0x36, 0x3A, 0x39, 0x65, 0x08, 0x73, 0x73,
+ 0xA4, 0x32, 0xD2, 0xAF, 0xAC, 0xBF, 0xC7, 0x05, 0x3C, 0xFF, 0x45, 0xEC,
+ 0xC3, 0xE8, 0xDA, 0x24, 0xD1, 0xCE, 0x63, 0xAE, 0x09, 0xA7, 0xFB, 0xE2,
+ 0x1B, 0xE3, 0xFD, 0x41, 0x0A, 0x6A, 0x96, 0x31, 0x82, 0x04, 0x0C, 0x30,
+ 0x82, 0x04, 0x08, 0x02, 0x01, 0x01, 0x30, 0x81, 0xCC, 0x30, 0x81, 0xC4,
+ 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x5A,
+ 0x41, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0C,
+ 0x57, 0x65, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x43, 0x61, 0x70, 0x65,
+ 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x09, 0x43,
+ 0x61, 0x70, 0x65, 0x20, 0x54, 0x6F, 0x77, 0x6E, 0x31, 0x1D, 0x30, 0x1B,
+ 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x14, 0x54, 0x68, 0x61, 0x77, 0x74,
+ 0x65, 0x20, 0x43, 0x6F, 0x6E, 0x73, 0x75, 0x6C, 0x74, 0x69, 0x6E, 0x67,
+ 0x20, 0x63, 0x63, 0x31, 0x28, 0x30, 0x26, 0x06, 0x03, 0x55, 0x04, 0x0B,
+ 0x13, 0x1F, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
+ 0x69, 0x6F, 0x6E, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
+ 0x20, 0x44, 0x69, 0x76, 0x69, 0x73, 0x69, 0x6F, 0x6E, 0x31, 0x19, 0x30,
+ 0x17, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x10, 0x54, 0x68, 0x61, 0x77,
+ 0x74, 0x65, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x43, 0x41,
+ 0x31, 0x26, 0x30, 0x24, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D,
+ 0x01, 0x09, 0x01, 0x16, 0x17, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2D,
+ 0x63, 0x65, 0x72, 0x74, 0x73, 0x40, 0x74, 0x68, 0x61, 0x77, 0x74, 0x65,
+ 0x2E, 0x63, 0x6F, 0x6D, 0x02, 0x03, 0x09, 0xCE, 0x15, 0x30, 0x0C, 0x06,
+ 0x08, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, 0x05, 0x00, 0xA0,
+ 0x81, 0x84, 0x30, 0x19, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D,
+ 0x01, 0x09, 0x03, 0x31, 0x0C, 0x06, 0x0A, 0x2B, 0x06, 0x01, 0x04, 0x01,
+ 0x82, 0x37, 0x02, 0x01, 0x04, 0x30, 0x1C, 0x06, 0x0A, 0x2B, 0x06, 0x01,
+ 0x04, 0x01, 0x82, 0x37, 0x02, 0x01, 0x0B, 0x31, 0x0E, 0x30, 0x0C, 0x06,
+ 0x0A, 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x02, 0x01, 0x16, 0x30,
+ 0x1F, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x04,
+ 0x31, 0x12, 0x04, 0x10, 0x62, 0x0B, 0x26, 0x7E, 0x35, 0x1A, 0xB1, 0xE5,
+ 0x5E, 0xF4, 0x4F, 0x14, 0xD0, 0xC0, 0xD1, 0x90, 0x30, 0x28, 0x06, 0x0A,
+ 0x2B, 0x06, 0x01, 0x04, 0x01, 0x82, 0x37, 0x02, 0x01, 0x0C, 0x31, 0x1A,
+ 0x30, 0x18, 0xA1, 0x16, 0x80, 0x14, 0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F,
+ 0x2F, 0x77, 0x77, 0x77, 0x2E, 0x6D, 0x6F, 0x74, 0x75, 0x73, 0x2E, 0x63,
+ 0x6F, 0x6D, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D,
+ 0x01, 0x01, 0x01, 0x05, 0x00, 0x04, 0x40, 0x0D, 0xBA, 0xBB, 0xB0, 0x63,
+ 0x33, 0x6A, 0x03, 0x20, 0xA0, 0xD4, 0xC0, 0xBD, 0xDA, 0xAB, 0xE3, 0x73,
+ 0xCA, 0x92, 0xB6, 0xE5, 0x75, 0x73, 0x0C, 0xD2, 0x4F, 0xB1, 0x8D, 0x96,
+ 0x89, 0xD8, 0x01, 0x8B, 0x9C, 0x1E, 0x9D, 0x5A, 0xF1, 0xEE, 0x05, 0x9A,
+ 0x59, 0xB9, 0x5A, 0xC0, 0xEC, 0x1C, 0x2B, 0x17, 0x1B, 0x8B, 0x10, 0xC7,
+ 0xC1, 0xF6, 0xE2, 0xF9, 0x3E, 0xCC, 0xC9, 0x3A, 0x19, 0x17, 0x51, 0xA1,
+ 0x82, 0x02, 0x4C, 0x30, 0x82, 0x02, 0x48, 0x06, 0x09, 0x2A, 0x86, 0x48,
+ 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x06, 0x31, 0x82, 0x02, 0x39, 0x30, 0x82,
+ 0x02, 0x35, 0x02, 0x01, 0x01, 0x30, 0x81, 0xB3, 0x30, 0x81, 0x9E, 0x31,
+ 0x1F, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x16, 0x56, 0x65,
+ 0x72, 0x69, 0x53, 0x69, 0x67, 0x6E, 0x20, 0x54, 0x72, 0x75, 0x73, 0x74,
+ 0x20, 0x4E, 0x65, 0x74, 0x77, 0x6F, 0x72, 0x6B, 0x31, 0x17, 0x30, 0x15,
+ 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x0E, 0x56, 0x65, 0x72, 0x69, 0x53,
+ 0x69, 0x67, 0x6E, 0x2C, 0x20, 0x49, 0x6E, 0x63, 0x2E, 0x31, 0x2C, 0x30,
+ 0x2A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x23, 0x56, 0x65, 0x72, 0x69,
+ 0x53, 0x69, 0x67, 0x6E, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x53, 0x74,
+ 0x61, 0x6D, 0x70, 0x69, 0x6E, 0x67, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x31, 0x34, 0x30, 0x32, 0x06,
+ 0x03, 0x55, 0x04, 0x0B, 0x13, 0x2B, 0x4E, 0x4F, 0x20, 0x4C, 0x49, 0x41,
+ 0x42, 0x49, 0x4C, 0x49, 0x54, 0x59, 0x20, 0x41, 0x43, 0x43, 0x45, 0x50,
+ 0x54, 0x45, 0x44, 0x2C, 0x20, 0x28, 0x63, 0x29, 0x39, 0x37, 0x20, 0x56,
+ 0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6E, 0x2C, 0x20, 0x49, 0x6E, 0x63,
+ 0x2E, 0x02, 0x10, 0x08, 0x7A, 0x6D, 0x5C, 0x6F, 0x62, 0x93, 0x4F, 0xBA,
+ 0xC4, 0xFD, 0x43, 0xE1, 0x14, 0x18, 0x9D, 0x30, 0x0C, 0x06, 0x08, 0x2A,
+ 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05, 0x05, 0x00, 0xA0, 0x59, 0x30,
+ 0x18, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x03,
+ 0x31, 0x0B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07,
+ 0x01, 0x30, 0x1C, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01,
+ 0x09, 0x05, 0x31, 0x0F, 0x17, 0x0D, 0x30, 0x33, 0x31, 0x30, 0x30, 0x37,
+ 0x31, 0x35, 0x32, 0x34, 0x33, 0x30, 0x5A, 0x30, 0x1F, 0x06, 0x09, 0x2A,
+ 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x04, 0x31, 0x12, 0x04, 0x10,
+ 0x11, 0x7B, 0x03, 0x6B, 0xAB, 0xC2, 0x07, 0x41, 0x02, 0x76, 0x9F, 0x71,
+ 0xBE, 0xA3, 0xD1, 0x03, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86,
+ 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x04, 0x82, 0x01, 0x00, 0x58,
+ 0xD1, 0xF6, 0x51, 0xF0, 0x1C, 0xDB, 0x38, 0x15, 0x55, 0x6C, 0x09, 0x4A,
+ 0xDC, 0x14, 0x7E, 0x02, 0x7A, 0x6D, 0x8C, 0x2E, 0xB1, 0xA0, 0xDB, 0x5A,
+ 0x55, 0x4F, 0xFB, 0xD4, 0x4D, 0x73, 0xEB, 0xDF, 0xD5, 0xAC, 0x62, 0x80,
+ 0xE9, 0x4C, 0x58, 0x67, 0xD2, 0xAC, 0x6E, 0x5A, 0x71, 0x9E, 0x1F, 0xED,
+ 0xB0, 0x08, 0x74, 0xF7, 0xC1, 0x7B, 0xC1, 0x53, 0xD2, 0x7E, 0x41, 0x7C,
+ 0xF3, 0x35, 0xBF, 0x83, 0xF8, 0x30, 0xAC, 0x67, 0xC7, 0xA1, 0x34, 0xC4,
+ 0xB4, 0xD4, 0xB0, 0x6F, 0x36, 0x5A, 0xC3, 0xA9, 0x3E, 0x76, 0x1B, 0xB2,
+ 0x68, 0x99, 0x85, 0x48, 0xA5, 0x84, 0x79, 0xE2, 0x8F, 0x10, 0xE9, 0x06,
+ 0x20, 0xC4, 0x7A, 0x7F, 0x8A, 0x0F, 0x0A, 0x95, 0x0F, 0xD9, 0xE9, 0x02,
+ 0xA5, 0x6B, 0x58, 0x30, 0x75, 0x15, 0xEF, 0x31, 0xAB, 0x2A, 0x2E, 0xC1,
+ 0x1F, 0xB3, 0xCF, 0xD8, 0x2A, 0x60, 0xB3, 0x1E, 0x1F, 0x2E, 0x76, 0xC8,
+ 0x7A, 0x6B, 0x2D, 0xD6, 0x3B, 0xC8, 0xE2, 0x78, 0xB7, 0x83, 0x20, 0xA8,
+ 0x2C, 0x66, 0xFF, 0x30, 0xE4, 0x37, 0xEB, 0xBB, 0x03, 0x06, 0xAD, 0x31,
+ 0xFD, 0x18, 0x9E, 0x97, 0xD1, 0x5E, 0xB4, 0x4A, 0x5D, 0x03, 0xDA, 0x89,
+ 0xDB, 0xF1, 0x0B, 0xDA, 0x45, 0x14, 0x82, 0x01, 0xC0, 0x2E, 0x5B, 0x69,
+ 0xCF, 0xD4, 0xAB, 0xD4, 0xB2, 0x8E, 0x96, 0xBA, 0x3B, 0x58, 0x04, 0xE7,
+ 0x4C, 0xD9, 0x12, 0x91, 0x2B, 0x87, 0xFD, 0x0B, 0x63, 0xF1, 0x55, 0x12,
+ 0x3A, 0xCE, 0xF1, 0x78, 0x23, 0x4D, 0x61, 0x51, 0x90, 0x16, 0x12, 0x12,
+ 0xAA, 0xFF, 0xBE, 0x82, 0x0E, 0xC9, 0x81, 0x75, 0xBA, 0x20, 0x16, 0x18,
+ 0x12, 0xE2, 0xAC, 0x97, 0x88, 0xCB, 0xCA, 0x4C, 0x4E, 0x82, 0x09, 0x31,
+ 0xED, 0x42, 0xB3, 0xD8, 0xCF, 0x55, 0x10, 0x2A, 0xA3, 0x12, 0x5A, 0x3C,
+ 0x0A, 0xB2, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+
+ private string WriteFile ()
+ {
+ string filename = "helloworld_signed.exe";
+ try {
+ if (File.Exists (filename)) {
+ File.Delete (filename);
+ }
+ using (FileStream fs = File.OpenWrite (filename)) {
+ fs.Write (helloworld_signed, 0, helloworld_signed.Length);
+ filename = Path.GetFullPath (fs.Name);
+ fs.Close ();
+ }
+ }
+ catch {}
+ return filename;
+ }
+
+ [Test]
+ public void VerifySignedAssembly ()
+ {
+ string filename = WriteFile ();
+ AuthenticodeDeformatter ad = new AuthenticodeDeformatter (filename);
+ // note: it's a valid signed PE file - but it doesn't
+ // mean it's root is trusted on the current system
+ Assert.IsTrue (((ad.Reason == 0) || (ad.Reason == 6)), "Reason");
+ Assert.AreEqual ("35-A5-21-3B-FC-FE-FA-40-97-AA-BB-DE-3B-52-15-6F", BitConverter.ToString (ad.Hash), "Hash");
+ Assert.AreEqual (632011226700000000, ad.Timestamp.Ticks, "Timestamp");
+ Assert.AreEqual (4, ad.Certificates.Count, "#Certificates");
+ Assert.AreEqual ("C=ZA, S=Western Cape, L=Cape Town, O=Thawte Consulting cc, OU=Certification Services Division, CN=Thawte Server CA, E=server-certs@thawte.com", ad.SigningCertificate.IssuerName, "IssuerName");
+ Assert.AreEqual ("C=CA, S=Quebec, L=Quebec, O=Motus Technologies Inc., OU=Secure Application Development, CN=Motus Technologies Inc.", ad.SigningCertificate.SubjectName, "SubjectName");
+ }
+
+ [Test]
+ public void VerifyUnsignedAssembly ()
+ {
+ string filename = Assembly.GetExecutingAssembly ().Location;
+ AuthenticodeDeformatter ad = new AuthenticodeDeformatter (filename);
+ // no digital signature
+ Assert.AreEqual (1, ad.Reason, "Reason");
+ Assert.IsNull (ad.Hash, "Hash");
+ Assert.AreEqual (DateTime.MinValue, ad.Timestamp, "Timestamp");
+ Assert.IsNull (ad.Certificates, "Certificates");
+ Assert.IsNull (ad.SigningCertificate, "SigningCertificate");
+ }
+ }
+}
diff --git a/mcs/class/Mono.Security/Test/Mono.Security.Authenticode/ChangeLog b/mcs/class/Mono.Security/Test/Mono.Security.Authenticode/ChangeLog
index eee740f04a6..46672ff6427 100644
--- a/mcs/class/Mono.Security/Test/Mono.Security.Authenticode/ChangeLog
+++ b/mcs/class/Mono.Security/Test/Mono.Security.Authenticode/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * AuthenticodeDeformatterTest.cs: Merge new unit tests from HEAD.
+
2004-05-11 Sebastien Pouliot <sebastien@ximian.com>
* PrivateKeyTest.cs: Added new unit tests for better coverage.
diff --git a/mcs/class/System.Data/System.Data.Odbc/ChangeLog b/mcs/class/System.Data/System.Data.Odbc/ChangeLog
index 8994109ad2c..e633dabdd9d 100644
--- a/mcs/class/System.Data/System.Data.Odbc/ChangeLog
+++ b/mcs/class/System.Data/System.Data.Odbc/ChangeLog
@@ -1,3 +1,17 @@
+2004-08-31 Umadevi S (sumadevi@novell.com)
+ * OdbcDataReader.cs - Fixed Decimal parsing
+
+
+2004-08-30 Umadevi S (sumadevi@novell.com)
+ * OdbcType.cs - removed inheritance from short.
+
+2004-08-27 Sureshkumar T (tsureshkumar@novell.com)
+ * OdbcDataReader.cs - fixed bug #63539 - TINYINT ODBC datatype is converted into System.Byte
+
+2004-08-26 Sureshkumar T (tsureshkumar@novell.com)
+ * OdbcDataReader.cs - Date & DateTime GetValue fixed.
+ GetBytes ordinal parameter passing fixed for BINARY in GetValue.
+
2004-08-20 Sureshkumar T (tsureshkumar@novell.com)
* OdbcConnection.cs - correct handles are passed to OdbcError exception to trap the correct error
diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs
index c65d2bbf0fb..61b49d55481 100644
--- a/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs
+++ b/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs
@@ -473,13 +473,17 @@ namespace System.Data.Odbc
bufsize=50;
buffer=new byte[bufsize]; // According to sqlext.h, use SQL_CHAR for decimal
ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.Char, buffer, bufsize, ref outsize);
+ byte[] temp = new byte[outsize];
+ for (int i=0;i<outsize;i++)
+ temp[i]=buffer[i];
+
if (outsize!=-1)
- DataValue=Decimal.Parse(System.Text.Encoding.Default.GetString(buffer));
+ DataValue=Decimal.Parse(System.Text.Encoding.Default.GetString(temp));
break;
case OdbcType.TinyInt:
short short_data=0;
ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.TinyInt, ref short_data, 0, ref outsize);
- DataValue=short_data;
+ DataValue = System.Convert.ToByte (short_data);
break;
case OdbcType.SmallInt:
short sint_data=0;
@@ -517,8 +521,17 @@ namespace System.Data.Odbc
break;
case OdbcType.Timestamp:
case OdbcType.DateTime:
+ case OdbcType.Date:
+ case OdbcType.Time:
OdbcTimestamp ts_data=new OdbcTimestamp();
- ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.DateTime, ref ts_data, 0, ref outsize);
+ if (col.OdbcType == OdbcType.Timestamp)
+ ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.Timestamp, ref ts_data, 0, ref outsize);
+ else if (col.OdbcType == OdbcType.DateTime)
+ ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.DateTime, ref ts_data, 0, ref outsize);
+ else if (col.OdbcType == OdbcType.Date)
+ ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.Date, ref ts_data, 0, ref outsize);
+ else // FIXME: how to get TIME datatype ??
+ ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.DateTime, ref ts_data, 0, ref outsize);
if (outsize!=-1) // This means SQL_NULL_DATA
DataValue=new DateTime(ts_data.year,ts_data.month,ts_data.day,ts_data.hour,
ts_data.minute,ts_data.second,Convert.ToInt32(ts_data.fraction));
@@ -527,7 +540,7 @@ namespace System.Data.Odbc
case OdbcType.Image :
bufsize = col.MaxLength + 1;
buffer = new byte [bufsize];
- long read = GetBytes (ColIndex, 0, buffer, 0, bufsize);
+ long read = GetBytes (ordinal, 0, buffer, 0, bufsize);
ret = OdbcReturn.Success;
DataValue = buffer;
break;
diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcType.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcType.cs
index fed8035a7e6..6e7c3169bee 100644
--- a/mcs/class/System.Data/System.Data.Odbc/OdbcType.cs
+++ b/mcs/class/System.Data/System.Data.Odbc/OdbcType.cs
@@ -51,7 +51,7 @@ namespace System.Data.Odbc
//#define SQL_INTERVAL 10
// could map to SmallDateTime?
- public enum OdbcType : short
+ public enum OdbcType
{
BigInt=-5, // SQL_BIGINT
Binary=-2, // SQL_BINARY
diff --git a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
index 55a0ce00782..8cbc2916c38 100755
--- a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
+++ b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-02 Umadevi S <sumadevi@novell.com>
+ * SqlCommand.cs - ExecuteNonQuery to return -1 incase of executing a storedprocedure
+
+
2004-08-12 Sureshkumar T <tsureshkumar@novell.com>
* SqlDataReader.cs - In Close method, the remaining resultsets are drained
out, to read output parameters & to avoid stream overlap
diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs
index 366b381b54d..a5ada9fd053 100644
--- a/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs
+++ b/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs
@@ -310,16 +310,19 @@ namespace System.Data.SqlClient {
try {
Execute (CommandBehavior.Default, false);
- // .NET documentation says that except for INSERT, UPDATE and
- // DELETE where the return value is the number of rows affected
- // for the rest of the commands the return value is -1.
- if ((CommandText.ToUpper().IndexOf("UPDATE")!=-1) ||
- (CommandText.ToUpper().IndexOf("INSERT")!=-1) ||
- (CommandText.ToUpper().IndexOf("DELETE")!=-1))
- result = Connection.Tds.RecordsAffected;
- else
+ if (commandType == CommandType.StoredProcedure)
result = -1;
-
+ else {
+ // .NET documentation says that except for INSERT, UPDATE and
+ // DELETE where the return value is the number of rows affected
+ // for the rest of the commands the return value is -1.
+ if ((CommandText.ToUpper().IndexOf("UPDATE")!=-1) ||
+ (CommandText.ToUpper().IndexOf("INSERT")!=-1) ||
+ (CommandText.ToUpper().IndexOf("DELETE")!=-1))
+ result = Connection.Tds.RecordsAffected;
+ else
+ result = -1;
+ }
}
catch (TdsTimeoutException e) {
throw SqlException.FromTdsInternalException ((TdsInternalException) e);
diff --git a/mcs/class/System.Data/Test/ChangeLog b/mcs/class/System.Data/Test/ChangeLog
index f519b6dce99..65c8719353a 100644
--- a/mcs/class/System.Data/Test/ChangeLog
+++ b/mcs/class/System.Data/Test/ChangeLog
@@ -1,3 +1,6 @@
+2004-08-26 Sureshkumar T <TSureshkumar@novell.com>
+ * MySqlTestBed.cs - Added few more fields for DateTime testing
+
2004-08-13 Umadevi S <sumadevi@novell.com>
* Added standalone nunit testcases for datacontainer class.
* Currently will use MSSQL server
diff --git a/mcs/class/System.Data/Test/MySqlTestBed.cs b/mcs/class/System.Data/Test/MySqlTestBed.cs
index a923c0d326d..1f8fef70c89 100644
--- a/mcs/class/System.Data/Test/MySqlTestBed.cs
+++ b/mcs/class/System.Data/Test/MySqlTestBed.cs
@@ -95,23 +95,26 @@ namespace MonoTests.System.Data
"pk_tint TINYINT NOT NULL PRIMARY KEY," +
"col_char CHAR(20)," +
"col_int INT," +
- "col_blob TINYBLOB" +
+ "col_blob TINYBLOB," +
+ "col_datetime DATETIME," +
+ "col_date DATE," +
+ "col_time TIME" +
");";
ExecuteQuery (createQuery);
createQuery = "INSERT INTO test VALUES (1, 'mono test" +
- "#1', 255, 127123645917568585638457243856234985 );" ;
+ "#1', 255, 127123645917568585638457243856234985, '2004-08-22', '2004-08-22', '12:00:00' );" ;
ExecuteQuery (createQuery);
createQuery = "INSERT INTO test VALUES (2, 'mono test" +
- "#2', 256, NULL );" ;
+ "#2', 256, NULL, NULL, NULL, NULL );";
ExecuteQuery (createQuery);
createQuery = "INSERT INTO test VALUES (3, 'mono test" +
- "#3', 257 , 127123645917568585638457243856234985);" ;
+ "#3', 257 , 127123645917568585638457243856234985, '2004-08-22', '2004-08-22', '12:00:00');" ;
ExecuteQuery (createQuery);
createQuery = "INSERT INTO test VALUES (4, 'mono test" +
- "#4', 258 , 127123645917568585638457243856234985);" ;
+ "#4', 258 , 127123645917568585638457243856234985, '2004-08-22', '2004-08-22', '12:00:00');" ;
ExecuteQuery (createQuery);
createQuery = "INSERT INTO test VALUES (5, 'mono test" +
- "#5', 259, 127123645917568585638457243856234985 );" ;
+ "#5', 259, 127123645917568585638457243856234985, '2004-08-22', '2004-08-22', '12:00:00' );" ;
ExecuteQuery (createQuery);
}
diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog b/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog
index 0e26247cecd..7ecb34c9d29 100644
--- a/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog
+++ b/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog
@@ -1,3 +1,13 @@
+2004-08-31 Umadevi S <sumadevi@novell.com>
+ * OdbcDataReaderTest.cs - Added a test for Numeric Type
+
+2004-08-27 Sureshkumar T <tsureshkumar@novell.com>
+ * OdbcDataReaderTest.cs - Added a test for TinyInt
+
+2004-08-26 Sureshkumar T <tsureshkumar@novell.com>
+ * OdbcDataReaderTest.cs - Added a test for DateTime - GetDateTimeTest
+ * OdbcCommandTest.cs - Syntax Error Fix
+
2004-07-29 Umadevi S <sumadevi@novell.com>
* OdbcCommandTest.cs - Added testcase for bug 62046. ExecuteNonQuery
diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs
index 42702295065..f46cf29c6c7 100644
--- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs
+++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs
@@ -107,7 +107,7 @@ namespace MonoTests.System.Data.Odbc
dbcmd.CommandType = CommandType.Text;
dbcmd.CommandText = "delete from test where (col_int >257);";
ret = dbcmd.ExecuteNonQuery();
- Assertion.AssertEquals("ExecuteNonQuery not working", 2, ret);}
+ Assertion.AssertEquals("ExecuteNonQuery not working", 2, ret);
+ }
- }
}
diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataReaderTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataReaderTest.cs
index 0017b818681..b8ceeafbbbb 100644
--- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataReaderTest.cs
+++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataReaderTest.cs
@@ -231,5 +231,106 @@ namespace MonoTests.System.Data.Odbc
CloseConnection ();
}
}
+
+ [Test]
+ public void GetDateTimeTest ()
+ {
+ OdbcCommand cmd = conn.CreateCommand ();
+ string sql = "SELECT * FROM test";
+ cmd.CommandText = sql;
+ OdbcDataReader reader = cmd.ExecuteReader (CommandBehavior.Default);
+ try {
+ if (reader.Read ()) {
+ object ob = reader["col_datetime"];
+ Assertion.AssertEquals ("Type of datetime column is wrong!",
+ "System.DateTime", ob.GetType ().ToString () );
+ ob = reader["col_date"];
+ Assertion.AssertEquals ("Type of date column is wrong!",
+ "System.DateTime", ob.GetType ().ToString () );
+ // FIXME : Once TIME data type is fixed, enable this check
+ //ob = reader["col_time"];
+ //Assertion.AssertEquals ("Type of time column is wrong!",
+ //"System.DateTime", ob.GetType ().ToString () );
+
+ DateTime dt = reader.GetDateTime (4);
+ Assertion.AssertEquals ("DateValue (SQL_TIMESTAMP) is wrong", new DateTime (2004, 8, 22, 0, 0, 0), dt);
+ dt = reader.GetDateTime (5);
+ Assertion.AssertEquals ("DateValue (SQL_DATE) is wrong", new DateTime (2004, 8, 22, 0, 0, 0), dt);
+ // FIXME : Once TIME data type is fixed, enable this check
+ //dt = reader.GetDateTime (7);
+ //Assertion.AssertEquals ("DateValue is wrong", "2004-08-22", dt.ToString ());
+ }
+ } finally {
+ // clean up
+ if (reader != null && !reader.IsClosed )
+ reader.Close ();
+ reader = null;
+ CleanTestSetup ();
+ CloseConnection ();
+ }
+ }
+
+
+ /// <summary>
+ /// This test for the return type &amp; value for GetValue
+ /// in case of Odbc Data type TINYINT
+ /// </summary>
+ [Test]
+ public void TinyIntTest ()
+ {
+ OdbcCommand cmd = conn.CreateCommand ();
+ string sql = "SELECT * FROM test";
+ cmd.CommandText = sql;
+ OdbcDataReader reader = cmd.ExecuteReader (CommandBehavior.SequentialAccess);
+ try {
+ if (reader.Read ()) {
+ object ob = reader.GetValue (0);
+ Assertion.AssertEquals ("Type of tinyInt column is wrong!",
+ "System.Byte", ob.GetType ().ToString () );
+ Assertion.AssertEquals ("Value of tinyInt column is wrong!",
+ 1, System.Convert.ToInt16(ob) );
+ }
+ } finally {
+ // clean up
+ if (reader != null && !reader.IsClosed )
+ reader.Close ();
+ reader = null;
+ CleanTestSetup ();
+ CloseConnection ();
+ }
+ }
+
+ [Test]
+ public void NumericTest()
+ {
+ using(IDbConnection dbConnection = new OdbcConnection(connectionString))
+ {
+ dbConnection.Open();
+ IDbCommand dbCommand = dbConnection.CreateCommand();
+ //note this will fail if the table already exists, ie if the test has failed.
+ dbCommand.CommandText = "CREATE TABLE NumericTable (NumericField NUMERIC(10) NOT NULL)";
+ dbCommand.ExecuteNonQuery();
+ dbCommand.CommandText = "INSERT INTO NumericTable (NumericField) VALUES (125)";
+ dbCommand.ExecuteNonQuery();
+ dbCommand.CommandText = "SELECT * FROM NumericTable";
+ using(IDataReader reader = dbCommand.ExecuteReader())
+ {
+ while(reader.Read())
+ {
+ for(int index = 0; index < reader.FieldCount; index++)
+ {
+ Object dataValue = reader.GetValue(index);
+ Assert.AreEqual("System.Decimal",dataValue.GetType().ToString());
+ Assert.AreEqual("125", dataValue.ToString());
+ }
+ }
+ }
+ dbCommand.CommandText = "DROP TABLE NumericTable";
+ dbCommand.ExecuteNonQuery();
+ }
+ }
+
+
+
}
}
diff --git a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandTest.cs b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandTest.cs
new file mode 100644
index 00000000000..9d58e4c977a
--- /dev/null
+++ b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandTest.cs
@@ -0,0 +1,99 @@
+//
+// SqlCommandTest.cs - NUnit Test Cases for testing the
+// SqlCommand class
+// Author:
+// Umadevi S (sumadevi@novell.com)
+//
+// Copyright (c) 2004 Novell Inc., and the individuals listed
+// on the ChangeLog entries.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Data;
+using System.Data.Common;
+using System.Data.SqlClient;
+
+using NUnit.Framework;
+
+namespace MonoTests.System.Data.SqlClient
+{
+
+ [TestFixture]
+ public class SqlCommandTest : MSSqlTestClient {
+
+ [SetUp]
+ public void GetReady () {
+ OpenConnection ();
+ }
+
+ [TearDown]
+ public void Clean () {
+ CloseConnection ();
+ }
+
+ /**
+ This is required to be run only once, call this from the GetReady.
+ **/
+ private void setup(){
+ string createquery = "CREATE PROCEDURE sp_insert @TestPar1 varchar(50),@BirthDate datetime as insert into Employees(LastName,FirstName) VALUES('SSS','uuuu') ";
+ SqlCommand cmd = new SqlCommand();
+ cmd.Connection = conn;
+ cmd.CommandText = createquery;
+ int ret =cmd.ExecuteNonQuery();
+ }
+
+
+ [Test]
+ /**
+ The below test expects the stored procedure sp_insert in the database.
+ **/
+ public void ExecuteNonQueryTest () {
+ try {
+ SqlCommand cmd = new SqlCommand();
+ cmd.Connection = conn;
+ cmd.CommandText = "sp_insert";
+ cmd.CommandType = CommandType.StoredProcedure;
+ Object TestPar = System.DBNull.Value;
+ cmd.Parameters.Add("@TestPar1",SqlDbType.Int);
+ cmd.Parameters["@TestPar1"].Value = TestPar;
+ cmd.Parameters.Add("@BirthDate",DateTime.Now);
+ Assert.AreEqual(-1,cmd.ExecuteNonQuery());
+ }
+ catch (Exception e) {
+ Assert.Fail("A#01 Got an exception");
+ Console.WriteLine(e.Message);
+ Console.WriteLine(e.StackTrace);
+
+ }
+
+ finally { // try/catch is necessary to gracefully close connections
+
+ CloseConnection ();
+ }
+ }
+
+
+
+
+
+ }
+}
diff --git a/mcs/class/System.Drawing/System.Drawing/ChangeLog b/mcs/class/System.Drawing/System.Drawing/ChangeLog
index ee4e72e3e57..7b0bab27cdb 100644
--- a/mcs/class/System.Drawing/System.Drawing/ChangeLog
+++ b/mcs/class/System.Drawing/System.Drawing/ChangeLog
@@ -1,3 +1,14 @@
+2004-09-13 Ravindra <rkumar@novell.com>
+
+ * Graphics.cs: MSDN says that using image width and height gives
+ better performance, hence we are using image width and height to
+ avoid autoscaling in DrawImageUnscaled. DrawImageUnscaled method.
+
+2004-09-10 Ravindra <rkumar@novell.com>
+
+ * Font.cs: Fixed Height property and GetHeight method.
+ * Graphics.cs: Fixed DrawImageUnscaled method.
+
2004-07-02 Jordi Mas i Hernandez <jordi@ximian.com>
* gdipFunctions.cs: fixes bug 61050
diff --git a/mcs/class/System.Drawing/System.Drawing/Font.cs b/mcs/class/System.Drawing/System.Drawing/Font.cs
index 31044a5b306..ee3ffdfc6c9 100644
--- a/mcs/class/System.Drawing/System.Drawing/Font.cs
+++ b/mcs/class/System.Drawing/System.Drawing/Font.cs
@@ -395,12 +395,10 @@ namespace System.Drawing
}
}
- private int _height;
-
[Browsable (false)]
public int Height {
get {
- return _height;
+ return (int) Math.Ceiling (GetHeight ());
}
}
@@ -511,7 +509,7 @@ namespace System.Drawing
public float GetHeight ()
{
- return (float) _height;
+ return GetHeight (Graphics.systemDpiY);
}
[MonoTODO]
@@ -532,19 +530,68 @@ namespace System.Drawing
throw new NotImplementedException ();
}
- [MonoTODO]
public float GetHeight (Graphics graphics)
{
- if (Unit == GraphicsUnit.Pixel || Unit == GraphicsUnit.World)
- return GetHeight ();
+ float height = GetHeight (graphics.DpiY);
+
+ switch (graphics.PageUnit) {
+ case GraphicsUnit.Document:
+ height *= (300f / graphics.DpiY);
+ break;
+ case GraphicsUnit.Display:
+ height *= (75f / graphics.DpiY);
+ break;
+ case GraphicsUnit.Inch:
+ height /= graphics.DpiY;
+ break;
+ case GraphicsUnit.Millimeter:
+ height *= (25.4f / graphics.DpiY);
+ break;
+ case GraphicsUnit.Point:
+ height *= (72f / graphics.DpiY);
+ break;
+
+ case GraphicsUnit.Pixel:
+ case GraphicsUnit.World:
+ default:
+ break;
+ }
- throw new NotImplementedException ();
+ return height;
}
- [MonoTODO]
public float GetHeight (float dpi)
{
- return GetHeight ();
+ float height;
+ int emHeight = _fontFamily.GetEmHeight (_style);
+ int lineSpacing = _fontFamily.GetLineSpacing (_style);
+
+ height = lineSpacing * (_size / emHeight);
+
+ switch (_unit) {
+ case GraphicsUnit.Document:
+ height *= (dpi / 300f);
+ break;
+ case GraphicsUnit.Display:
+ height *= (dpi / 75f);
+ break;
+ case GraphicsUnit.Inch:
+ height *= dpi;
+ break;
+ case GraphicsUnit.Millimeter:
+ height *= (dpi / 25.4f);
+ break;
+ case GraphicsUnit.Point:
+ height *= (dpi / 72f);
+ break;
+
+ case GraphicsUnit.Pixel:
+ case GraphicsUnit.World:
+ default:
+ break;
+ }
+
+ return height;
}
public override String ToString ()
diff --git a/mcs/class/System.Drawing/System.Drawing/Graphics.cs b/mcs/class/System.Drawing/System.Drawing/Graphics.cs
index 54c750c03ff..a580eb2e19b 100755
--- a/mcs/class/System.Drawing/System.Drawing/Graphics.cs
+++ b/mcs/class/System.Drawing/System.Drawing/Graphics.cs
@@ -651,22 +651,27 @@ namespace System.Drawing
public void DrawImageUnscaled (Image image, Point point)
{
- DrawImage(image, point.X, point.Y);
+ DrawImageUnscaled (image, point.X, point.Y);
}
public void DrawImageUnscaled (Image image, Rectangle rect)
{
- DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height);
+ DrawImageUnscaled (image, rect.X, rect.Y, rect.Width, rect.Height);
}
public void DrawImageUnscaled (Image image, int x, int y)
{
- DrawImage(image, x, y);
+ DrawImage (image, x, y, image.Width, image.Height);
}
public void DrawImageUnscaled (Image image, int x, int y, int width, int height)
{
- DrawImage(image, x, y, width, height);
+ Image tmpImg = new Bitmap (width, height);
+ Graphics g = FromImage (tmpImg);
+ g.DrawImage (image, 0, 0, image.Width, image.Height);
+ this.DrawImage (tmpImg, x, y, width, height);
+ tmpImg.Dispose ();
+ g.Dispose ();
}
public void DrawLine (Pen pen, PointF pt1, PointF pt2)
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Discovery/ChangeLog b/mcs/class/System.Web.Services/System.Web.Services.Discovery/ChangeLog
index 0ef4271cdd8..9e52d2feea5 100755
--- a/mcs/class/System.Web.Services/System.Web.Services.Discovery/ChangeLog
+++ b/mcs/class/System.Web.Services/System.Web.Services.Discovery/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-24 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * ContractReference.cs, DiscoveryClientProtocol.cs: Set the url from which
+ documents are being read.
+
2004-06-13 Gert Driesen <drieseng@users.sourceforge.net>
* SchemaReference.cs: corrected namespace
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Discovery/ContractReference.cs b/mcs/class/System.Web.Services/System.Web.Services.Discovery/ContractReference.cs
index 54b2225e8c7..75fb86b5685 100755
--- a/mcs/class/System.Web.Services/System.Web.Services.Discovery/ContractReference.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Discovery/ContractReference.cs
@@ -147,7 +147,7 @@ namespace System.Web.Services.Discovery {
{
string contentType = null;
Stream stream = prot.Download (ref url, ref contentType);
- XmlTextReader reader = new XmlTextReader (stream);
+ XmlTextReader reader = new XmlTextReader (url, stream);
reader.MoveToContent ();
DiscoveryReference refe;
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Discovery/DiscoveryClientProtocol.cs b/mcs/class/System.Web.Services/System.Web.Services.Discovery/DiscoveryClientProtocol.cs
index e24e2f10c43..21fc58e63cb 100755
--- a/mcs/class/System.Web.Services/System.Web.Services.Discovery/DiscoveryClientProtocol.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Discovery/DiscoveryClientProtocol.cs
@@ -84,7 +84,7 @@ namespace System.Web.Services.Discovery {
public DiscoveryDocument Discover (string url)
{
Stream stream = Download (ref url);
- XmlTextReader reader = new XmlTextReader (stream);
+ XmlTextReader reader = new XmlTextReader (url, stream);
if (!DiscoveryDocument.CanRead (reader))
throw new InvalidOperationException ("The url '" + url + "' does not point to a valid discovery document");
@@ -131,7 +131,7 @@ namespace System.Web.Services.Discovery {
stream = Download (ref url);
}
- XmlTextReader reader = new XmlTextReader (stream);
+ XmlTextReader reader = new XmlTextReader (url, stream);
reader.MoveToContent ();
DiscoveryDocument doc;
DiscoveryReference refe = null;
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog b/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
index 3b3ed1be736..8b0776c0c38 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-25 Lluis Sanchez Gual <lluis@novell.com>
+
+ * HttpSoapWebServiceHandler.cs, WebServiceHandler.cs: Do not assign the
+ context to the service. It already gets it from HttpContext.Current.
+
2004-07-20 Lluis Sanchez Gual <lluis@ximian.com>
* HttpWebClientProtocol.cs: Add received cookies to cookieContainer when
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpSoapWebServiceHandler.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpSoapWebServiceHandler.cs
index eae97b4a743..6d03900b5b1 100755
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpSoapWebServiceHandler.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpSoapWebServiceHandler.cs
@@ -335,11 +335,6 @@ namespace System.Web.Services.Protocols
private SoapServerMessage Invoke (HttpContext ctx, SoapServerMessage requestMessage)
{
- WebService wsi = requestMessage.Server as WebService;
- if (wsi != null) {
- wsi.SetContext (ctx);
- }
-
SoapMethodStubInfo methodInfo = requestMessage.MethodStubInfo;
// Assign header values to web service members
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHandler.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHandler.cs
index a3b82b8eb1a..8727e6f2724 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHandler.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHandler.cs
@@ -78,13 +78,7 @@ namespace System.Web.Services.Protocols
protected object CreateServerInstance ()
{
- object ws = Activator.CreateInstance (ServiceType);
- WebService wsi = ws as WebService;
- if (wsi != null) {
- wsi.SetContext (_context);
- }
-
- return ws;
+ return Activator.CreateInstance (ServiceType);
}
}
}
diff --git a/mcs/class/System.Web.Services/System.Web.Services/ChangeLog b/mcs/class/System.Web.Services/System.Web.Services/ChangeLog
index 5bf15ba35e5..019a79b25a1 100644
--- a/mcs/class/System.Web.Services/System.Web.Services/ChangeLog
+++ b/mcs/class/System.Web.Services/System.Web.Services/ChangeLog
@@ -1,3 +1,9 @@
+2004-08-25 Lluis Sanchez Gual <lluis@novell.com>
+
+ * WebService.cs: Get the HttpContext from the HttpContext.Current, do not
+ wait to be set with SetContext. In this way the context is available
+ in the web service constructor.
+
2004-05-12 Lluis Sanchez Gual <lluis@ximian.com>
* WebService.cs: Take the session from the context.
diff --git a/mcs/class/System.Web.Services/System.Web.Services/WebService.cs b/mcs/class/System.Web.Services/System.Web.Services/WebService.cs
index e6d0db150d1..b6fc1313056 100644
--- a/mcs/class/System.Web.Services/System.Web.Services/WebService.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services/WebService.cs
@@ -46,17 +46,13 @@ namespace System.Web.Services {
public WebService ()
{
+ _context = HttpContext.Current;
}
#endregion // Constructors
#region Properties
- internal void SetContext (HttpContext context)
- {
- _context = context;
- }
-
[Browsable (false)]
[Description ("The ASP.NET application object for the current request.")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
diff --git a/mcs/class/System.Web.Services/Test/standalone/ChangeLog b/mcs/class/System.Web.Services/Test/standalone/ChangeLog
index 0622988e0fb..c05f9a58129 100644
--- a/mcs/class/System.Web.Services/Test/standalone/ChangeLog
+++ b/mcs/class/System.Web.Services/Test/standalone/ChangeLog
@@ -1,3 +1,7 @@
+2004-08-25 Lluis Sanchez Gual <lluis@novell.com>
+
+ * server/SessionCounter.asmx: Check that Context != null in the constructor.
+
2004-06-22 Lluis Sanchez Gual <lluis@ximian.com>
* proxies.net.xml.gz: Updated.
diff --git a/mcs/class/System.Web.Services/Test/standalone/server/SessionCounter.asmx b/mcs/class/System.Web.Services/Test/standalone/server/SessionCounter.asmx
index 640f1bdf044..50c8befc415 100644
--- a/mcs/class/System.Web.Services/Test/standalone/server/SessionCounter.asmx
+++ b/mcs/class/System.Web.Services/Test/standalone/server/SessionCounter.asmx
@@ -8,6 +8,12 @@
{
public class SessionCounter: System.Web.Services.WebService
{
+ public SessionCounter ()
+ {
+ if (Context == null)
+ throw new Exception ("Context not set in constructor");
+ }
+
[ WebMethod(EnableSession=true) ]
public void Reset()
{
diff --git a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
index 9e53465f583..a24439fc10b 100644
--- a/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/AspGenerator.cs
@@ -49,7 +49,7 @@ namespace System.Web.Compilation
this.Location = location;
}
}
-
+
class BuilderLocationStack : Stack
{
public override void Push (object o)
@@ -138,6 +138,7 @@ namespace System.Web.Compilation
bool inScript, javascript;
ILocation location;
bool isApplication;
+ StringBuilder tagInnerText = new StringBuilder ();
static Hashtable emptyHash = new Hashtable ();
public AspGenerator (TemplateParser tparser)
@@ -367,7 +368,11 @@ namespace System.Web.Compilation
if (tparser.DefaultDirectiveName == "application" && t.Trim () != "")
throw new ParseException (location, "Content not valid for application file.");
- stack.Builder.AppendLiteralString (t);
+ ControlBuilder current = stack.Builder;
+ current.AppendLiteralString (t);
+ if (current.NeedsTagInnerText ()) {
+ tagInnerText.Append (t);
+ }
}
bool ProcessTag (string tagid, TagAttributes atts, TagType tagtype)
@@ -493,6 +498,16 @@ namespace System.Web.Compilation
// if (current is TemplateBuilder)
// pop from the id list
+ if (current.NeedsTagInnerText ()) {
+ try {
+ current.SetTagInnerText (tagInnerText.ToString ());
+ } catch (Exception e) {
+ throw new ParseException (current.location, e.Message, e);
+ }
+
+ tagInnerText.Length = 0;
+ }
+
current.CloseControl ();
stack.Pop ();
stack.Builder.AppendSubBuilder (current);
diff --git a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
index c5f1c410923..07578009be5 100644
--- a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs
@@ -284,7 +284,7 @@ namespace System.Web.Compilation
public virtual Type GetCompiledType ()
{
- Type type = CachingCompiler.GetTypeFromCache (parser.InputFile, parser.ClassName);
+ Type type = CachingCompiler.GetTypeFromCache (parser.InputFile);
if (type != null)
return type;
diff --git a/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs
index bda584c306b..0e6f7d12bbf 100644
--- a/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs
@@ -32,6 +32,7 @@ using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Specialized;
+using System.IO;
using System.Reflection;
using System.Web.UI;
using System.Web.Caching;
@@ -43,21 +44,20 @@ namespace System.Web.Compilation
{
static object compilationLock = new object ();
const string cachePrefix = "@@Assembly";
+ const string cacheTypePrefix = "@@@Type";
- public static Type GetTypeFromCache (string filename, string typename)
+ public static void InsertType (Type type, string filename)
{
- string key = CachingCompiler.cachePrefix + filename;
- CompilerResults results = (CompilerResults) HttpRuntime.Cache [key];
- if (results == null)
- return null;
-
- Assembly a = results.CompiledAssembly;
- if (a == null)
- return null;
+ string [] cacheKeys = new string [] { cachePrefix + filename };
+ CacheDependency dep = new CacheDependency (null, cacheKeys);
+ HttpRuntime.Cache.Insert (cacheTypePrefix + filename, type, dep);
+ }
- return a.GetType (typename, false);
+ public static Type GetTypeFromCache (string filename)
+ {
+ return (Type) HttpRuntime.Cache [cacheTypePrefix + filename];
}
-
+
public static CompilerResults Compile (BaseCompiler compiler)
{
Cache cache = HttpRuntime.Cache;
@@ -139,12 +139,39 @@ namespace System.Web.Compilation
ICodeCompiler compiler = provider.CreateCompiler ();
CompilerParameters options = GetOptions (assemblies);
results = compiler.CompileAssemblyFromFile (options, file);
- string [] deps = (string []) assemblies.ToArray (typeof (string));
+ ArrayList realdeps = new ArrayList (assemblies.Count);
+ for (int i = assemblies.Count - 1; i >= 0; i--) {
+ string current = (string) assemblies [i];
+ if (Path.IsPathRooted (current))
+ realdeps.Add (current);
+ }
+
+ string [] deps = (string []) realdeps.ToArray (typeof (string));
cache.Insert (cachePrefix + key, results, new CacheDependency (deps));
}
return results;
}
+
+ public static Type CompileAndGetType (string typename, string language, string key,
+ string file, ArrayList assemblies)
+ {
+ CompilerResults result = CachingCompiler.Compile (language, key, file, assemblies);
+ if (result.NativeCompilerReturnValue != 0) {
+ StreamReader reader = new StreamReader (file);
+ throw new CompilationException (file, result.Errors, reader.ReadToEnd ());
+ }
+
+ Assembly assembly = result.CompiledAssembly;
+ if (assembly == null) {
+ StreamReader reader = new StreamReader (file);
+ throw new CompilationException (file, result.Errors, reader.ReadToEnd ());
+ }
+
+ Type type = assembly.GetType (typename, true);
+ InsertType (type, file);
+ return type;
+ }
}
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/ChangeLog b/mcs/class/System.Web/System.Web.Compilation/ChangeLog
index 80ce8459331..80c8ae1ffbf 100644
--- a/mcs/class/System.Web/System.Web.Compilation/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Compilation/ChangeLog
@@ -1,3 +1,27 @@
+2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * WebServiceCompiler.cs: fix buglet in my last commit.
+
+2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * BaseCompiler.cs:
+ * CachingCompiler.cs:
+ * WebServiceCompiler.cs: correctly cache Type instead of the assembly
+ for ashx/asmx. Otherwise we need to open the file and check for the
+ class name in there. Thanks to Ben for pointing this out.
+
+2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * CachingCompiler.cs: don't try to watch for changes in system
+ assemblies. Fixes bug #64871.
+
+2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * AspGenerator.cs: handle builders that need to process inner text
+ with tags.
+
+ * Location.cs: added setters for the properties.
+
2004-07-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* AspGenerator.cs: the path for file was treated as virtual, but it's
diff --git a/mcs/class/System.Web/System.Web.Compilation/IImplicitResourceProvider.cs b/mcs/class/System.Web/System.Web.Compilation/IImplicitResourceProvider.cs
deleted file mode 100644
index 3e2c38ff5db..00000000000
--- a/mcs/class/System.Web/System.Web.Compilation/IImplicitResourceProvider.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// System.Web.Compilation.IImplicitResourceProvider.cs
-//
-// Authors:
-// Duncan Mak (duncan@ximian.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-
-#if NET_2_0
-
-using System.Collections;
-using System.Globalization;
-
-namespace System.Web.Compilation
-{
- public interface IImplicitResourceProvider
- {
- object GetObject (ImplicitResourceKey key, CultureInfo culture);
- ICollection GetResources (string keyPrefix);
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.Compilation/IResourceReader.cs b/mcs/class/System.Web/System.Web.Compilation/IResourceReader.cs
deleted file mode 100644
index 4cdb8b14784..00000000000
--- a/mcs/class/System.Web/System.Web.Compilation/IResourceReader.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// System.Web.Compilation.IResourceProvider.cs
-//
-// Authors:
-// Duncan Mak (duncan@ximian.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-
-using System.Resources;
-
-#if NET_2_0
-namespace System.Web.Compilation
-{
- public interface IResourceProvider
- {
- IResourceReader ResourceReader { get; }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.Compilation/ImplicitResourceKey.cs b/mcs/class/System.Web/System.Web.Compilation/ImplicitResourceKey.cs
deleted file mode 100644
index ac2bab3c256..00000000000
--- a/mcs/class/System.Web/System.Web.Compilation/ImplicitResourceKey.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// System.Web.Compilation.IImplicitResourceProvider.cs
-//
-// Authors:
-// Duncan Mak (duncan@ximian.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-
-#if NET_2_0
-namespace System.Web.Compilation
-{
- public class ImplicitResourceKey
- {
- public ImplicitResourceKey ()
- {
- }
-
- public string Filter;
- public string KeyPrefix;
- public string Property;
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.Compilation/Location.cs b/mcs/class/System.Web/System.Web.Compilation/Location.cs
index e4a0cb775a1..4a57b8055ac 100644
--- a/mcs/class/System.Web/System.Web.Compilation/Location.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/Location.cs
@@ -65,22 +65,27 @@ namespace System.Web.Compilation
public int BeginLine {
get { return beginLine; }
+ set { beginLine = value; }
}
public int EndLine {
get { return endLine; }
+ set { endLine = value; }
}
public int BeginColumn {
get { return beginColumn; }
+ set { beginColumn = value; }
}
public int EndColumn {
get { return endColumn; }
+ set { endColumn = value; }
}
public string PlainText {
get { return plainText; }
+ set { plainText = value; }
}
}
}
diff --git a/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs
index f6884bf428b..4df2b6b9a94 100644
--- a/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs
+++ b/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs
@@ -59,12 +59,15 @@ namespace System.Web.Compilation
public override Type GetCompiledType ()
{
- Type type = CachingCompiler.GetTypeFromCache (parser.PhysicalPath, parser.ClassName);
+ Type type = CachingCompiler.GetTypeFromCache (parser.PhysicalPath);
if (type != null)
return type;
- if (parser.Program.Trim () == "")
- return parser.GetTypeFromBin (parser.ClassName);
+ if (parser.Program.Trim () == "") {
+ type = parser.GetTypeFromBin (parser.ClassName);
+ CachingCompiler.InsertType (type, parser.PhysicalPath);
+ return type;
+ }
string lang = parser.Language;
CompilationConfiguration config;
@@ -106,7 +109,9 @@ namespace System.Web.Compilation
"No assembly returned after compilation!?");
results.TempFiles.Delete ();
- return results.CompiledAssembly.GetType (parser.ClassName, true);
+ type = results.CompiledAssembly.GetType (parser.ClassName, true);
+ CachingCompiler.InsertType (type, parser.PhysicalPath);
+ return type;
}
void CheckCompilerErrors (CompilerResults results)
diff --git a/mcs/class/System.Web/System.Web.Mail/ChangeLog b/mcs/class/System.Web/System.Web.Mail/ChangeLog
index 4ac2bcc035e..ff65aaa23c4 100644
--- a/mcs/class/System.Web/System.Web.Mail/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Mail/ChangeLog
@@ -1,3 +1,10 @@
+2004-08-30 Sanjay Gupta <gsanjay@novell.com>
+
+ * MailMessage.cs:
+ * MailMessageWrapper.cs:
+ * SmtpClient.cs: Fields property of MailMessage from .Net 1.1 was not
+ handled completely.
+
2004-08-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* SmtpClient.cs: multipart mails default body format is now the same as
diff --git a/mcs/class/System.Web/System.Web.Mail/MailMessage.cs b/mcs/class/System.Web/System.Web.Mail/MailMessage.cs
index 6531a6d6156..fea1d167846 100644
--- a/mcs/class/System.Web/System.Web.Mail/MailMessage.cs
+++ b/mcs/class/System.Web/System.Web.Mail/MailMessage.cs
@@ -51,7 +51,6 @@ namespace System.Web.Mail
private string to;
private string urlContentBase;
private string urlContentLocation;
- private Hashtable fields;
// Constructor
public MailMessage ()
@@ -59,7 +58,9 @@ namespace System.Web.Mail
attachments = new ArrayList (8);
headers = new ListDictionary ();
bodyEncoding = Encoding.Default;
+#if NET_1_1
fields = new Hashtable ();
+#endif
}
// Properties
@@ -127,6 +128,8 @@ namespace System.Web.Mail
}
#if NET_1_1
+ private Hashtable fields;
+
public IDictionary Fields {
get {
return (IDictionary) fields;
diff --git a/mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs b/mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs
index 17bd581675b..270892aab93 100644
--- a/mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs
+++ b/mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs
@@ -227,6 +227,19 @@ namespace System.Web.Mail {
public string UrlContentLocation {
get { return message.UrlContentLocation; }
}
+
+#if NET_1_1
+ public MailHeader Fields {
+ get {
+ MailHeader bodyHeaders = new MailHeader();
+ // Add Fields to MailHeader Object
+ foreach( string key in message.Fields.Keys )
+ bodyHeaders.Data[ key ] = (string)this.message.Fields[ key ];
+ return bodyHeaders;
+ }
+ }
+#endif
+
}
}
diff --git a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs
index 109f1cf60a8..d77652c1384 100644
--- a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs
+++ b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs
@@ -153,6 +153,12 @@ namespace System.Web.Mail {
MailHeader partHeader = new MailHeader();
partHeader.ContentType = bodyContentType;
+
+#if NET_1_1
+ // Add all the custom headers to body part as specified in
+ //Fields property of MailMessageWrapper
+ partHeader.Data.Add(msg.Fields.Data);
+#endif
smtp.WriteHeader( partHeader );
diff --git a/mcs/class/System.Web/System.Web.Security/ChangeLog b/mcs/class/System.Web/System.Web.Security/ChangeLog
index 18d1dade663..17865abd5bc 100644
--- a/mcs/class/System.Web/System.Web.Security/ChangeLog
+++ b/mcs/class/System.Web/System.Web.Security/ChangeLog
@@ -1,3 +1,7 @@
+2004-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * FormsAuthentication.cs: patch by Jim Pease to fix the date on renewal.
+
2004-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* FormsAuthenticationModule.cs: don't renew expired cookies. Only renew
diff --git a/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs b/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs
index bee8998e76a..451cb0dc260 100644
--- a/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs
+++ b/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs
@@ -311,7 +311,7 @@ namespace System.Web.Security
return tOld;
FormsAuthenticationTicket tNew = tOld.Clone ();
- tNew.SetDates (now, now - toExpiration + toIssue);
+ tNew.SetDates (now, now + (tOld.Expiration - tOld.IssueDate));
return tNew;
}
diff --git a/mcs/class/System.Web/System.Web.SessionState/ChangeLog b/mcs/class/System.Web/System.Web.SessionState/ChangeLog
index 3e70b628dc9..b8e60f21cdd 100644
--- a/mcs/class/System.Web/System.Web.SessionState/ChangeLog
+++ b/mcs/class/System.Web/System.Web.SessionState/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpSessionState.cs: don't share static session objects declared in
+ the application file across the application, but on a per-session
+ basis. Fixes bug #65446.
+
2004-07-07 Juraj Skripsky <juraj@hotfeet.ch>
* SessionStateModule.cs: set path in session cookie to application
diff --git a/mcs/class/System.Web/System.Web.SessionState/HttpSessionState.cs b/mcs/class/System.Web/System.Web.SessionState/HttpSessionState.cs
index 0e92660cbc1..03fcacbb118 100644
--- a/mcs/class/System.Web/System.Web.SessionState/HttpSessionState.cs
+++ b/mcs/class/System.Web/System.Web.SessionState/HttpSessionState.cs
@@ -59,7 +59,7 @@ public sealed class HttpSessionState : ICollection, IEnumerable
{
_id = id;
_dict = dict;
- _staticObjects = staticObjects;
+ _staticObjects = staticObjects.Clone ();
_timeout = timeout;
_newSession = newSession;
_isCookieless = isCookieless;
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
index dace1da7b57..874a1774bce 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
@@ -1,3 +1,18 @@
+2004-09-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * RadioButton.cs: fix GroupName when the control is inside a
+ NamingContainer different from Page. Closes bug #65586.
+
+2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Xml.cs: fixed get_DocumentContent (it was returning "" always!) and
+ don't call MapPathSecure on the content itself.
+
+ * XmlBuilder.cs: handle XML documents written inside asp:xml. The
+ document is checked at parse time and will be checked again at run time.
+
+ Fixes bug #63828.
+
2004-08-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Xml.cs: use MapPath in DocumentSource and documentContent. Fixes
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs b/mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs
index 27bfa2c99a3..becb19787bc 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/RadioButton.cs
@@ -99,19 +99,23 @@ namespace System.Web.UI.WebControls
writer.RenderBeginTag (System.Web.UI.HtmlTextWriterTag.Input);
writer.RenderEndTag ();
}
-
- private string UniqueGroupNamePrivate
- {
- get {
- string retVal = GroupName;
- int unique = UniqueID.LastIndexOf (':');
- if (unique >= 0)
- retVal += UniqueID.Substring (unique + 1);
-
- return retVal;
- }
- }
-
+
+ private string UniqueGroupNamePrivate
+ {
+ get {
+ string retVal;
+ string uid = UniqueID;
+ int unique = uid.LastIndexOf (':');
+ if (unique == -1) {
+ retVal = GroupName;
+ } else {
+ retVal = uid.Substring (0, unique + 1) + GroupName;
+ }
+
+ return retVal;
+ }
+ }
+
private string ValueAttributePrivate
{
get {
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs
index ff9aacac78b..e2bca533f8f 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Xml.cs
@@ -116,7 +116,7 @@ namespace System.Web.UI.WebControls
[WebSysDescription ("The XML content that is transformed for the XML Webcontrol.")]
public string DocumentContent {
get {
- return String.Empty;
+ return documentContent;
}
set {
document = null;
@@ -192,7 +192,7 @@ namespace System.Web.UI.WebControls
private void LoadXpathDoc ()
{
if (documentContent != null && documentContent.Length > 0) {
- xpathDoc = new XPathDocument (new StringReader (MapPathSecure (documentContent)));
+ xpathDoc = new XPathDocument (new StringReader (documentContent));
return;
}
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs b/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs
index 4aaa88a7580..445e87143d2 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs
@@ -2,8 +2,10 @@
// System.Web.UI.WebControls.XmlBuilder.cs
//
// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
+// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
+// Gonzalo Paniagua Javier (gonzalo@novell.com)
//
+// Copyright (c) 2004 Novell, Inc. (http://www.novell.com)
//
//
@@ -29,14 +31,16 @@
using System;
using System.Collections;
+using System.Web.Compilation;
using System.Web.UI;
+using System.Xml;
namespace System.Web.UI.WebControls
{
- internal class XmlBuilder : ControlBuilder
+ class XmlBuilder : ControlBuilder
{
public override void AppendLiteralString (string s)
- {
+ {
}
public override Type GetChildControlType (string tagName, IDictionary attribs)
@@ -49,10 +53,26 @@ namespace System.Web.UI.WebControls
return true;
}
- [MonoTODO ("find out what this does and implement")]
public override void SetTagInnerText (string text)
{
- throw new NotImplementedException ();
+ string trimmed = text.Trim ();
+ if (trimmed == "")
+ return;
+
+ XmlDocument doc = new XmlDocument ();
+ try {
+ doc.LoadXml (text);
+ } catch (XmlException xmle) {
+ Location newloc = new Location (location);
+ if (xmle.LineNumber >= 0)
+ newloc.BeginLine += xmle.LineNumber - 1;
+
+ location = newloc;
+ throw;
+ }
+
+ base.AppendLiteralString (trimmed);
}
}
}
+
diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog
index dd08b76969d..ee8644d5f3c 100644
--- a/mcs/class/System.Web/System.Web.UI/ChangeLog
+++ b/mcs/class/System.Web/System.Web.UI/ChangeLog
@@ -1,3 +1,24 @@
+2004-09-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * TemplateParser.cs: ensure bin directory exists before trying to access
+ it. Fixes bug #65446 (not closed yet due to dependencies).
+
+2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * SimpleWebHandlerParser.cs: correctly cache Type instead of the
+ assembly for ashx/asmx. Otherwise we need to open the file and check
+ for the class name in there. Thanks to Ben for pointing this out.
+
+2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * TemplateParser.cs: removed creation of StringWriter. It's not used.
+ * Control.cs: don't create the EventHandlerList until requested.
+
+2004-09-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * LiteralControl.cs: stylized. This control has EnableViewState disabled
+ by default and doesn't get an automatic ID. When text is null -> "".
+
2004-07-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* TemplateControl.cs: don't include private methods of base classes when
diff --git a/mcs/class/System.Web/System.Web.UI/Control.cs b/mcs/class/System.Web/System.Web.UI/Control.cs
index 97ec7f757fc..b2d3ada71f2 100644
--- a/mcs/class/System.Web/System.Web.UI/Control.cs
+++ b/mcs/class/System.Web/System.Web.UI/Control.cs
@@ -70,7 +70,7 @@ namespace System.Web.UI
private bool _childControlsCreated;
private StateBag _viewState;
private bool _trackViewState;
- private EventHandlerList _events = new EventHandlerList();
+ private EventHandlerList _events;
private RenderMethod _renderMethodDelegate;
private bool autoID = true;
private bool creatingControls;
diff --git a/mcs/class/System.Web/System.Web.UI/LiteralControl.cs b/mcs/class/System.Web/System.Web.UI/LiteralControl.cs
index 9d469ee5f10..93002f71467 100644
--- a/mcs/class/System.Web/System.Web.UI/LiteralControl.cs
+++ b/mcs/class/System.Web/System.Web.UI/LiteralControl.cs
@@ -1,11 +1,13 @@
-//
-// System.Web.UI.LiteralControl.cs
-//
-// Author:
-// Bob Smith <bob@thestuff.net>
-//
-// (C) Bob Smith
-//
+//
+// System.Web.UI.LiteralControl.cs
+//
+// Author:
+// Bob Smith <bob@thestuff.net>
+// Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//
+// (C) Bob Smith
+// Copyright (c) 2002-2004 Novell, Inc. (http://www.novell.com)
+//
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -27,41 +29,43 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
-using System;
-using System.ComponentModel;
-using System.Web;
-
-namespace System.Web.UI
-{
- [ToolboxItem(false)]
- public class LiteralControl : Control
- {
- private string _text = String.Empty;
- public LiteralControl() {}
- public LiteralControl(string text)
- {
- _text = text;
- }
- public virtual string Text
- {
- get
- {
- return _text;
- }
- set
- {
- _text = value;
- }
- }
- protected override void Render(HtmlTextWriter writer)
- {
- writer.Write(_text);
- }
-
- protected override ControlCollection CreateControlCollection ()
- {
- return new EmptyControlCollection (this);
- }
- }
-}
+
+using System;
+using System.ComponentModel;
+using System.Web;
+
+namespace System.Web.UI
+{
+ [ToolboxItem(false)]
+ public class LiteralControl : Control
+ {
+ string _text;
+
+ public LiteralControl () : this (null) {}
+
+ public LiteralControl (string text)
+ {
+ EnableViewState = false;
+ PreventAutoID ();
+ _text = (text == null) ? "" : text; // Text property is not called for this.
+ }
+
+ public virtual string Text {
+ get { return _text; }
+ set {
+ _text = (value == null) ? "" : value;
+ }
+ }
+
+ protected override void Render (HtmlTextWriter writer)
+ {
+ writer.Write (_text);
+ }
+
+ protected override ControlCollection CreateControlCollection ()
+ {
+ return new EmptyControlCollection (this);
+ }
+ }
+}
+
diff --git a/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs b/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
index 4c200a93568..d075d404a5c 100644
--- a/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs
@@ -64,6 +64,10 @@ namespace System.Web.UI
protected SimpleWebHandlerParser (HttpContext context, string virtualPath, string physicalPath)
{
+ cachedType = CachingCompiler.GetTypeFromCache (physicalPath);
+ if (cachedType != null)
+ return; // We don't need anything else.
+
this.context = context;
this.vPath = virtualPath;
this.physPath = physicalPath;
@@ -104,8 +108,7 @@ namespace System.Web.UI
ParseDirective (trimmed);
directiveFound = true;
if (gotDefault) {
- cachedType = CachingCompiler.GetTypeFromCache (physPath,
- className);
+ cachedType = CachingCompiler.GetTypeFromCache (physPath);
if (cachedType != null)
break;
}
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateParser.cs b/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
index ebceb6394fe..6402b7f84f8 100755
--- a/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
+++ b/mcs/class/System.Web/System.Web.UI/TemplateParser.cs
@@ -276,6 +276,9 @@ namespace System.Web.UI
return null;
// Load from bin
+ if (!Directory.Exists (PrivateBinPath))
+ return null;
+
string [] binDlls = Directory.GetFiles (PrivateBinPath, "*.dll");
foreach (string s in binDlls) {
Assembly binA = Assembly.LoadFrom (s);
@@ -435,7 +438,6 @@ namespace System.Web.UI
CompilerResults result = CachingCompiler.Compile (language, realPath, realPath, assemblies);
if (result.NativeCompilerReturnValue != 0) {
- StringWriter writer = new StringWriter();
StreamReader reader = new StreamReader (realPath);
throw new CompilationException (realPath, result.Errors, reader.ReadToEnd ());
}
diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog
index c7b5b3463cd..4d69b6dbbce 100644
--- a/mcs/class/System.Web/System.Web/ChangeLog
+++ b/mcs/class/System.Web/System.Web/ChangeLog
@@ -1,3 +1,53 @@
+2004-09-12 Ben Maurer <bmaurer@ximian.com>
+
+ * HttpContext.cs: use CallContext. It is a little bit faster.
+
+2004-09-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpStaticObjectsCollection.cs: don't share static session objects
+ declared in the application file across the application, but on a
+ per-session basis. Fixes bug #65446.
+
+2004-09-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpServerUtility.cs: in Transfer(path), don't keep form data if
+ the transfer is done from inside a page that received a postback.
+ Fixes bug #65613.
+
+2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpValueCollection.cs: fixed signature of ToString (). Closes bug
+ #65392.
+
+2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpApplication.cs: only add/remove to/from the timeout
+ manager when we're in a interruptible step.
+
+2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * TraceContext.cs: when IsEnabled has not been set, return the value
+ from the TraceManager. Fixes bug #63469.
+
+2004-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpRuntime.cs: initialize the response writer when finishing a
+ request because it cannot be queued. Under heavy load we made new
+ requests be processed before the ones that might be queued. This is
+ no longer the case.
+
+ * QueueManager.cs: instead of queueing/dequeuing separately, we now
+ have a single method that does everything needed to decide which one
+ will be the next request processed.
+
+2004-08-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpRuntime.cs: removed initializations to null in .cctor. Prevent
+ other requests from avoiding the lock if they are received before the
+ configuration system is inited. Ensure that the queue manager is not
+ null before using it (it can be null while the first request is being
+ processed).
+
2004-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* HttpServerUtility.cs: ensure we have a full virtual path for the
diff --git a/mcs/class/System.Web/System.Web/HttpApplication.cs b/mcs/class/System.Web/System.Web/HttpApplication.cs
index 09288727b8f..37599a8e1f0 100644
--- a/mcs/class/System.Web/System.Web/HttpApplication.cs
+++ b/mcs/class/System.Web/System.Web/HttpApplication.cs
@@ -639,6 +639,7 @@ namespace System.Web
{
bool ready_sync = false;
IStateHandler handler;
+ bool timeoutPossible = false;
lock (_app) {
_app.OnStateExecuteEnter ();
@@ -662,6 +663,10 @@ namespace System.Web
handler = _handlers [_currentStateIdx];
_countSteps++;
+ timeoutPossible = handler.PossibleToTimeout;
+ if (timeoutPossible)
+ HttpRuntime.TimeoutManager.Add (_app.Context);
+
lasterror = ExecuteState (handler, ref ready_sync);
if (ready_sync)
_countSyncSteps++;
@@ -670,6 +675,9 @@ namespace System.Web
if (null != lasterror)
_app.HandleError (lasterror);
} finally {
+ if (timeoutPossible)
+ HttpRuntime.TimeoutManager.Remove (_app.Context);
+
_app.OnStateExecuteLeave ();
}
}
@@ -893,14 +901,12 @@ namespace System.Web
SaveThreadCulture ();
_savedContext = HttpContext.Context;
HttpContext.Context = _Context;
- HttpRuntime.TimeoutManager.Add (_Context);
SetPrincipal (Context.User);
}
internal void OnStateExecuteLeave ()
{
RestoreThreadCulture ();
- HttpRuntime.TimeoutManager.Remove (_Context);
HttpContext.Context = _savedContext;
RestorePrincipal ();
}
diff --git a/mcs/class/System.Web/System.Web/HttpContext.cs b/mcs/class/System.Web/System.Web/HttpContext.cs
index 8ffb184383e..27ca76ff8a5 100644
--- a/mcs/class/System.Web/System.Web/HttpContext.cs
+++ b/mcs/class/System.Web/System.Web/HttpContext.cs
@@ -38,6 +38,7 @@ using System.Web.Configuration;
using System.Web.Util;
using System.Web.SessionState;
using System.Threading;
+using System.Runtime.Remoting.Messaging;
namespace System.Web
{
@@ -96,15 +97,14 @@ namespace System.Web
}
}
- [MonoTODO("Context - Use System.Remoting.Messaging.CallContext instead of Thread storage")]
internal static HttpContext Context
{
get {
- return (HttpContext) Thread.GetData (Thread.GetNamedDataSlot ("Context"));
+ return (HttpContext) CallContext.GetData ("Context");
}
set {
- Thread.SetData (Thread.GetNamedDataSlot ("Context"), value);
+ CallContext.SetData ("Context", value);
}
}
diff --git a/mcs/class/System.Web/System.Web/HttpRuntime.cs b/mcs/class/System.Web/System.Web/HttpRuntime.cs
index f48797c3815..9ebbf381c93 100644
--- a/mcs/class/System.Web/System.Web/HttpRuntime.cs
+++ b/mcs/class/System.Web/System.Web/HttpRuntime.cs
@@ -76,12 +76,6 @@ namespace System.Web {
static HttpRuntime ()
{
- appPathDiscoveryStackWalk = null;
- ctrlPrincipalStackWalk = null;
- sensitiveInfoStackWalk = null;
- unmgdCodeStackWalk = null;
- unrestrictedStackWalk = null;
-
_runtime = new HttpRuntime ();
_runtime.Init();
}
@@ -185,6 +179,8 @@ namespace System.Web {
context.Response.FinalFlush ();
}
+ /*
+ * This is not being used. OnFirstRequestEnd is empty.
if (!_firstRequestExecuted) {
lock (this) {
if (!_firstRequestExecuted) {
@@ -193,6 +189,7 @@ namespace System.Web {
}
}
}
+ */
Interlocked.Decrement(ref _activeRequests);
@@ -237,6 +234,7 @@ namespace System.Web {
HttpContext context = new HttpContext (wr);
HttpException exception = new HttpException (503, "Service unavailable");
Interlocked.Increment (ref _runtime._activeRequests);
+ context.Response.InitializeWriter ();
_runtime.FinishRequest (context, exception);
}
@@ -279,10 +277,10 @@ namespace System.Web {
if (!_firstRequestStarted) {
lock (this) {
if (!_firstRequestStarted) {
- _firstRequestStarted = true;
_firstRequestStartTime = DateTime.Now;
OnFirstRequestStart(context);
- }
+ _firstRequestStarted = true;
+ }
}
}
@@ -317,37 +315,32 @@ namespace System.Web {
void TryExecuteQueuedRequests ()
{
// Wait for pending jobs to start
- if (Interlocked.CompareExchange (ref pendingCallbacks, 3, 3) == 3) {
+ if (Interlocked.CompareExchange (ref pendingCallbacks, 3, 3) == 3)
return;
- }
- if (queueManager == null)
+ HttpWorkerRequest wr = queueManager.GetNextRequest (null);
+ if (wr == null)
return;
- if (!queueManager.CanExecuteRequest (false)) {
- return;
- }
-
- HttpWorkerRequest wr = queueManager.Dequeue ();
- if (wr == null) {
- return;
- }
-
Interlocked.Increment (ref pendingCallbacks);
ThreadPool.QueueUserWorkItem (doRequestCallback, wr);
TryExecuteQueuedRequests ();
}
- public static void ProcessRequest (HttpWorkerRequest Request)
+ public static void ProcessRequest (HttpWorkerRequest request)
{
- if (Request == null)
- throw new ArgumentNullException ("Request");
-
- if (!_runtime._firstRequestExecuted || _runtime.queueManager.CanExecuteRequest (false)) {
- _runtime.InternalExecuteRequest (Request);
- } else {
- _runtime.queueManager.Queue (Request);
+ if (request == null)
+ throw new ArgumentNullException ("request");
+
+ QueueManager mgr = _runtime.queueManager;
+ if (_runtime._firstRequestStarted && mgr != null) {
+ request = mgr.GetNextRequest (request);
+ // We're busy, return immediately
+ if (request == null)
+ return;
}
+
+ _runtime.InternalExecuteRequest (request);
}
#if NET_1_1
@@ -507,7 +500,7 @@ namespace System.Web {
[MonoTODO ("GetResourceStringFromResourceManager (string)")]
private string GetResourceStringFromResourceManager (string key) {
- return "String returned by HttpRuntime.GetResourceStringFromResourceManager";
+ return key;
}
#region Security Internal Methods (not impl)
diff --git a/mcs/class/System.Web/System.Web/HttpServerUtility.cs b/mcs/class/System.Web/System.Web/HttpServerUtility.cs
index 29022db8253..0abb629c828 100644
--- a/mcs/class/System.Web/System.Web/HttpServerUtility.cs
+++ b/mcs/class/System.Web/System.Web/HttpServerUtility.cs
@@ -46,6 +46,7 @@ using System.Collections.Specialized;
using System.IO;
using System.Text;
using System.Web.Hosting;
+using System.Web.UI;
using System.Web.Util;
namespace System.Web
@@ -303,7 +304,15 @@ namespace System.Web
/// <param name="path">The URL path of the new page on the server to execute. </param>
public void Transfer (string path)
{
- Transfer (path, true);
+ // If it's a page and a postback, don't pass form data
+ // See bug #65613.
+ bool preserveForm = true;
+ if (_Context.Handler is Page) {
+ Page page = (Page) _Context.Handler;
+ preserveForm = !page.IsPostBack;
+ }
+
+ Transfer (path, preserveForm);
}
/// <summary>
diff --git a/mcs/class/System.Web/System.Web/HttpStaticObjectsCollection.cs b/mcs/class/System.Web/System.Web/HttpStaticObjectsCollection.cs
index 46d7c129396..873da72de7c 100644
--- a/mcs/class/System.Web/System.Web/HttpStaticObjectsCollection.cs
+++ b/mcs/class/System.Web/System.Web/HttpStaticObjectsCollection.cs
@@ -37,6 +37,11 @@ namespace System.Web {
this.type = type;
}
+ public StaticItem (StaticItem item)
+ {
+ this.type = item.type;
+ }
+
public object Instance {
get {
lock (this) {
@@ -101,6 +106,18 @@ namespace System.Web {
get { return this; }
}
+ internal HttpStaticObjectsCollection Clone ()
+ {
+ HttpStaticObjectsCollection coll = new HttpStaticObjectsCollection ();
+ coll._Objects = new Hashtable ();
+ foreach (string key in _Objects.Keys) {
+ StaticItem item = new StaticItem ((StaticItem) _Objects [key]);
+ coll._Objects [key] = item;
+ }
+
+ return coll;
+ }
+
internal void Add (ObjectTagBuilder tag)
{
_Objects.Add (tag.ObjectID, new StaticItem (tag.Type));
diff --git a/mcs/class/System.Web/System.Web/HttpValueCollection.cs b/mcs/class/System.Web/System.Web/HttpValueCollection.cs
index 946b8542d46..e8ba4e3a0db 100644
--- a/mcs/class/System.Web/System.Web/HttpValueCollection.cs
+++ b/mcs/class/System.Web/System.Web/HttpValueCollection.cs
@@ -211,7 +211,7 @@ namespace System.Web
return result.ToString ();
}
- virtual new public string ToString ()
+ public override string ToString ()
{
return ToString (false);
}
diff --git a/mcs/class/System.Web/System.Web/QueueManager.cs b/mcs/class/System.Web/System.Web/QueueManager.cs
index a3f8f621d90..29ec8a91cc4 100644
--- a/mcs/class/System.Web/System.Web/QueueManager.cs
+++ b/mcs/class/System.Web/System.Web/QueueManager.cs
@@ -4,7 +4,7 @@
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
-// (C) 2003 Novell, Inc (http://www.novell.com)
+// (C) 2003,2004 Novell, Inc (http://www.novell.com)
//
//
@@ -53,35 +53,57 @@ namespace System.Web
queue = new Queue (queueLimit);
}
- // TODO: handle local connections
- public bool CanExecuteRequest (bool local)
+ // TODO: handle local connections, just check for 127.0.0.1
+ bool CanExecuteRequest ()
{
if (disposing)
return false;
int threads, cports;
ThreadPool.GetAvailableThreads (out threads, out cports);
- return (threads > minFree) || (local && threads > minLocalFree);
+ return (threads > minFree); // || (local && threads > minLocalFree);
}
-
- public void Queue (HttpWorkerRequest wr)
+
+ public HttpWorkerRequest GetNextRequest (HttpWorkerRequest req)
{
+ if (!CanExecuteRequest ()) {
+ if (req != null) {
+ lock (queue) {
+ Queue (req);
+ }
+ }
+
+ return null;
+ }
+
+ HttpWorkerRequest result;
lock (queue) {
- if (queue.Count < queueLimit) {
- queue.Enqueue (wr);
- return;
+ result = Dequeue ();
+ if (result != null) {
+ if (req != null)
+ Queue (req);
+ } else {
+ result = req;
}
}
+ return result;
+ }
+
+ void Queue (HttpWorkerRequest wr)
+ {
+ if (queue.Count < queueLimit) {
+ queue.Enqueue (wr);
+ return;
+ }
+
HttpRuntime.FinishUnavailable (wr);
}
- public HttpWorkerRequest Dequeue ()
+ HttpWorkerRequest Dequeue ()
{
- lock (queue) {
- if (queue.Count > 0)
- return (HttpWorkerRequest) queue.Dequeue ();
- }
+ if (queue.Count > 0)
+ return (HttpWorkerRequest) queue.Dequeue ();
return null;
}
@@ -93,7 +115,7 @@ namespace System.Web
disposing = true;
HttpWorkerRequest wr;
- while ((wr = Dequeue ()) != null)
+ while ((wr = GetNextRequest (null)) != null)
HttpRuntime.FinishUnavailable (wr);
queue = null;
diff --git a/mcs/class/System.Web/System.Web/TraceContext.cs b/mcs/class/System.Web/System.Web/TraceContext.cs
index f939add498b..f4ad22af99d 100644
--- a/mcs/class/System.Web/System.Web/TraceContext.cs
+++ b/mcs/class/System.Web/System.Web/TraceContext.cs
@@ -42,7 +42,7 @@ namespace System.Web {
private TraceMode _Mode;
private TraceData data;
private bool data_saved;
- private bool _haveTrace = false;
+ private bool _haveTrace;
public TraceContext(HttpContext Context) {
_Context = Context;
@@ -58,6 +58,8 @@ namespace System.Web {
public bool IsEnabled {
get {
+ if (!_haveTrace)
+ return HttpRuntime.TraceManager.Enabled;
return _Enabled;
}
@@ -104,7 +106,7 @@ namespace System.Web {
}
private void Write(string category, string msg, Exception error, bool Warning) {
- if (!_Enabled)
+ if (!IsEnabled)
return;
if (data == null)
data = new TraceData ();
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog
index ece4b875d31..f8ba6ca28e1 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog
+++ b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog
@@ -1,3 +1,8 @@
+
+Thu Sep 9 07:09:11 PDT 2004 Paolo Molaro <lupus@ximian.com>
+
+ * ScriptCompilerInfo.cs: avoid using a .cctor and fix precomp.
+
2004-06-18 Atsushi Enomoto <atsushi@ximian.com>
* Debug.cs, HtmlEmitter.cs, MSXslScriptManager.cs,
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs b/mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs
index 0a5d72ed4cb..87438fa2bb0 100755
--- a/mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs
@@ -216,12 +216,6 @@ end namespace
{
static Type providerType;
- static JScriptCompilerInfo ()
- {
- Assembly jsasm = Assembly.LoadWithPartialName ("Microsoft.JScript", null);
- providerType = jsasm.GetType ("Microsoft.JScript.JScriptCodeProvider");
- }
-
public JScriptCompilerInfo ()
{
this.CompilerCommand = "mjs";
@@ -231,9 +225,17 @@ end namespace
this.DefaultCompilerOptions = "/t:library /r:Microsoft.VisualBasic.dll";
}
- public override CodeDomProvider CodeDomProvider {
- get { return (CodeDomProvider) Activator.CreateInstance (providerType); }
- }
+ public override CodeDomProvider CodeDomProvider {
+ get {
+ // no need for locking
+ if (providerType == null) {
+ Assembly jsasm = Assembly.LoadWithPartialName ("Microsoft.JScript", null);
+ if (jsasm != null)
+ providerType = jsasm.GetType ("Microsoft.JScript.JScriptCodeProvider");
+ }
+ return (CodeDomProvider) Activator.CreateInstance (providerType);
+ }
+ }
public override string Extension {
get { return ".js"; }
diff --git a/mcs/class/System.XML/System.Xml.Schema/BuiltInDatatype.cs b/mcs/class/System.XML/System.Xml.Schema/BuiltInDatatype.cs
index 8402f2d8004..4587f204179 100644
--- a/mcs/class/System.XML/System.Xml.Schema/BuiltInDatatype.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/BuiltInDatatype.cs
@@ -1370,15 +1370,61 @@ namespace Mono.Xml.Schema
public override object ParseValue (string s,
XmlNameTable nameTable, XmlNamespaceManager nsmgr)
{
- return ParseValueType (s, nameTable, nsmgr);
+ return new XmlSchemaUri (Normalize (s));
}
internal override ValueType ParseValueType (string s, XmlNameTable nameTable, XmlNamespaceManager nsmgr)
{
- return new UriValueType (Normalize (s));
+ return new UriValueType ((XmlSchemaUri) ParseValue (s, nameTable, nsmgr));
}
}
-
+
+ internal class XmlSchemaUri : Uri
+ {
+ public string value;
+
+ // LAMESPEC: In this way, some strings that contain ':' might
+ // result in exception (MS.NET looks implemented as such).
+ public XmlSchemaUri (string src)
+ : this (src, src.IndexOf (':') > 0)
+ {
+ }
+
+ private XmlSchemaUri (string src, bool formal)
+ : base (formal ? src : "anyuri:" + src, !formal)
+ {
+ value = src;
+ }
+
+ public static bool operator == (XmlSchemaUri v1, XmlSchemaUri v2)
+ {
+ return v1.value == v2.value;
+ }
+
+ public static bool operator != (XmlSchemaUri v1, XmlSchemaUri v2)
+ {
+ return v1.value != v2.value;
+ }
+
+ public override bool Equals (object obj)
+ {
+ if (obj is XmlSchemaUri)
+ return (XmlSchemaUri) obj == this;
+ else
+ return false;
+ }
+
+ public override int GetHashCode ()
+ {
+ return value.GetHashCode ();
+ }
+
+ public override string ToString ()
+ {
+ return value;
+ }
+ }
+
// xs:duration
internal class XsdDuration : XsdAnySimpleType
{
diff --git a/mcs/class/System.XML/System.Xml.Schema/ChangeLog b/mcs/class/System.XML/System.Xml.Schema/ChangeLog
index 14dd692e892..e3dc9a5679f 100755
--- a/mcs/class/System.XML/System.Xml.Schema/ChangeLog
+++ b/mcs/class/System.XML/System.Xml.Schema/ChangeLog
@@ -1,3 +1,14 @@
+2004-09-16 Atsushi Enomoto <atsushi@ximian.com>
+
+ * BuiltInDatatype.cs, SchemaDataValueType.cs :
+ ParseValue() for xs:AnyURI should return System.Uri. MS.NET returns
+ XmlSchemaUri, but it is derived from System.Uri, while ours was not.
+
+2004-09-03 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlSchema.cs : When schema inclusion results in a recursion, just
+ skip recursed schema.
+
2004-06-18 Atsushi Enomoto <atsushi@ximian.com>
* CustomSerializer.cs, XmlSchemaException.cs,
diff --git a/mcs/class/System.XML/System.Xml.Schema/SchemaDataValueType.cs b/mcs/class/System.XML/System.Xml.Schema/SchemaDataValueType.cs
index c2b9305fcad..ff4031f2806 100755
--- a/mcs/class/System.XML/System.Xml.Schema/SchemaDataValueType.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/SchemaDataValueType.cs
@@ -19,6 +19,8 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using Mono.Xml.Schema;
+
namespace System.Xml.Schema
{
internal struct QNameValueType
@@ -97,14 +99,14 @@ namespace System.Xml.Schema
internal struct UriValueType
{
- string value;
+ XmlSchemaUri value;
- public UriValueType (string value)
+ public UriValueType (XmlSchemaUri value)
{
this.value = value;
}
- public string Value {
+ public XmlSchemaUri Value {
get { return value; }
}
@@ -133,7 +135,7 @@ namespace System.Xml.Schema
public override string ToString ()
{
- return value;
+ return value.ToString ();
}
}
diff --git a/mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs
index 59e28520089..6e37d9f3be6 100755
--- a/mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs
+++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs
@@ -369,7 +369,10 @@ namespace System.Xml.Schema
if (resolver != null) {
url = GetResolvedUri (resolver, ext.SchemaLocation);
if (schemaLocationStack.Contains (url)) {
- error(handler, "Nested inclusion was found: " + url);
+ // Just skip nested inclusion.
+ // The spec is "carefully written"
+ // not to handle it as an error.
+ // error (handler, "Nested inclusion was found: " + url);
// must skip this inclusion
continue;
}
diff --git a/mcs/class/System.XML/System.Xml.Serialization/ChangeLog b/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
index e542d6a843d..ded7e921c04 100755
--- a/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
+++ b/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
+
+ * XmlSerializer.cs: When the XmlReader is created by XmlSerializer, use
+ Normalization==true by default.
+
2004-07-15 Lluis Sanchez Gual <lluis@novell.com>
* TypeTranslator.cs, XmlCustomFormatter.cs: Added support for base64. This
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs
index d5efa65c1d3..aa57189fb34 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs
@@ -251,12 +251,14 @@ namespace System.Xml.Serialization
public object Deserialize (Stream stream)
{
XmlTextReader xmlReader = new XmlTextReader(stream);
+ xmlReader.Normalization = true;
return Deserialize(xmlReader);
}
public object Deserialize (TextReader textReader)
{
XmlTextReader xmlReader = new XmlTextReader(textReader);
+ xmlReader.Normalization = true;
return Deserialize(xmlReader);
}
diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog
index c5ea3b2d6f7..6da24f7f434 100644
--- a/mcs/class/System.XML/System.Xml/ChangeLog
+++ b/mcs/class/System.XML/System.Xml/ChangeLog
@@ -1,3 +1,26 @@
+2004-09-06 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlWriter.cs : on reader.NodeType is None, WriteNode() still tries
+ to read more (and might result in an error).
+
+2004-09-03 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlTextReader.cs : When Normalization is true, CRLF and CR should
+ be converted to single LF. This should fix part of bug #62076.
+
+2004-08-27 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlAttribute.cs : some property getters threw NullReferenceException
+ when the attribute is not added to an element.
+ * XmlNode.cs : When a node is not appended to another node, BaseURI
+ is empty. Bug #64120 is fixed.
+
+2004-08-26 Atsushi Enomoto <atsushi@ximian.com>
+
+ * XmlTextWriter.cs : In CheckState(), don't create indentation string
+ at every time. WriteIndent() now handles the indentation without
+ recomputation.
+
2004-08-21 Atsushi Enomoto <atsushi@ximian.com>
* XmlElement.cs : set_InnerText was removing children incompletely.
diff --git a/mcs/class/System.XML/System.Xml/XmlAttribute.cs b/mcs/class/System.XML/System.Xml/XmlAttribute.cs
index f5bfcc958a0..d02dee88e5c 100644
--- a/mcs/class/System.XML/System.Xml/XmlAttribute.cs
+++ b/mcs/class/System.XML/System.Xml/XmlAttribute.cs
@@ -104,9 +104,7 @@ namespace System.Xml
#region Properties
public override string BaseURI {
- get {
- return OwnerElement.BaseURI;
- }
+ get { return OwnerElement != null ? OwnerElement.BaseURI : String.Empty; }
}
public override string InnerText {
@@ -175,9 +173,7 @@ namespace System.Xml
}
public virtual XmlElement OwnerElement {
- get {
- return ownerElement;
- }
+ get { return ownerElement; }
}
public override XmlNode ParentNode {
@@ -248,11 +244,11 @@ namespace System.Xml
}
internal override string XmlLang {
- get { return OwnerElement.XmlLang; }
+ get { return OwnerElement != null ? OwnerElement.XmlLang : String.Empty; }
}
internal override XmlSpace XmlSpace {
- get { return OwnerElement.XmlSpace; }
+ get { return OwnerElement != null ? OwnerElement.XmlSpace : XmlSpace.None; }
}
#endregion
@@ -298,6 +294,9 @@ namespace System.Xml
internal DTDAttributeDefinition GetAttributeDefinition ()
{
+ if (OwnerElement == null)
+ return null;
+
// If it is default, then directly create new attribute.
DTDAttListDeclaration attList = OwnerDocument.DocumentType != null ? OwnerDocument.DocumentType.DTD.AttListDecls [OwnerElement.Name] : null;
return attList != null ? attList [Name] : null;
diff --git a/mcs/class/System.XML/System.Xml/XmlNode.cs b/mcs/class/System.XML/System.Xml/XmlNode.cs
index 7eaa7285c8e..ef1ec861a31 100644
--- a/mcs/class/System.XML/System.Xml/XmlNode.cs
+++ b/mcs/class/System.XML/System.Xml/XmlNode.cs
@@ -71,7 +71,7 @@ namespace System.Xml
get {
// Isn't it conformant to W3C XML Base Recommendation?
// As far as I tested, there are not...
- return (ParentNode != null) ? ParentNode.BaseURI : OwnerDocument.BaseURI;
+ return (ParentNode != null) ? ParentNode.BaseURI : String.Empty;
}
}
diff --git a/mcs/class/System.XML/System.Xml/XmlTextReader.cs b/mcs/class/System.XML/System.Xml/XmlTextReader.cs
index 8c21e3d02f8..221541167bf 100644
--- a/mcs/class/System.XML/System.Xml/XmlTextReader.cs
+++ b/mcs/class/System.XML/System.Xml/XmlTextReader.cs
@@ -1548,8 +1548,14 @@ namespace System.Xml
ch = ReadReference (false);
if (returnEntityReference) // Returns -1 if char validation should not be done
break;
- }
- else {
+ } else if (normalization && ch == '\r') {
+ ReadChar ();
+ ch = ReadChar ();
+ if (ch != '\n')
+ // append '\n' instead of '\r'.
+ AppendValueChar ('\n');
+ // and in case of "\r\n", discard '\r'.
+ } else {
if (XmlChar.IsInvalid (ch))
throw new XmlException (this, "Not allowed character was found.");
ch = ReadChar ();
@@ -2142,8 +2148,18 @@ namespace System.Xml
skip = true;
}
}
- if (normalization && XmlChar.IsInvalid (ch))
- throw new XmlException (this, "Invalid character was found.");
+ if (normalization) {
+ if (ch == '\r') {
+ ch = PeekChar ();
+ if (ch != '\n')
+ // append '\n' instead of '\r'.
+ AppendValueChar ('\n');
+ // otherwise, discard '\r'.
+ continue;
+ }
+ else if (XmlChar.IsInvalid (ch))
+ throw new XmlException (this, "Invalid character was found.");
+ }
AppendValueChar (ch);
}
diff --git a/mcs/class/System.XML/System.Xml/XmlTextWriter.cs b/mcs/class/System.XML/System.Xml/XmlTextWriter.cs
index af19e18dc6b..8e10329bf68 100644
--- a/mcs/class/System.XML/System.Xml/XmlTextWriter.cs
+++ b/mcs/class/System.XML/System.Xml/XmlTextWriter.cs
@@ -277,13 +277,9 @@ openElements [openElementCount - 1]).IndentingOverriden;
}
if ((documentStarted == true) && (formatting == Formatting.Indented) && (!IndentingOverriden)) {
indentFormatting = w.NewLine;
- if (indentLevel > 0) {
- for (int i = 0; i < indentLevel; i++)
- indentFormatting += indentChars;
- }
}
else
- indentFormatting = "";
+ indentFormatting = null;
documentStarted = true;
}
@@ -341,9 +337,7 @@ openElements [openElementCount - 1]).IndentingOverriden;
private void UpdateIndentChars ()
{
- indentChars = "";
- for (int i = 0; i < indentation; i++)
- indentChars += indentChar;
+ indentChars = new string (indentChar, indentation);
}
public override void WriteBase64 (byte[] buffer, int index, int count)
@@ -535,6 +529,15 @@ openElements [openElementCount - 1]).IndentingOverriden;
WriteEndElementInternal (false);
}
+ private void WriteIndent ()
+ {
+ if (indentFormatting == null)
+ return;
+ w.Write (w.NewLine);
+ for (int i = 0; i < indentLevel; i++)
+ w.Write (indentChars);
+ }
+
private void WriteEndElementInternal (bool fullEndElement)
{
if (openElementCount == 0)
@@ -553,7 +556,7 @@ openElements [openElementCount - 1]).IndentingOverriden;
if (fullEndElement) {
w.Write ('>');
if (!ParentIndentingOverriden)
- w.Write (indentFormatting);
+ WriteIndent ();
w.Write ("</");
XmlTextWriterOpenElement el = (XmlTextWriterOpenElement) openElements [openElementCount - 1];
if (el.Prefix != String.Empty) {
@@ -568,7 +571,7 @@ openElements [openElementCount - 1]).IndentingOverriden;
openElementCount--;
openStartElement = false;
} else {
- w.Write (indentFormatting);
+ WriteIndent ();
w.Write ("</");
XmlTextWriterOpenElement el = (XmlTextWriterOpenElement) openElements [openElementCount - 1];
openElementCount--;
@@ -626,7 +629,7 @@ openElements [openElementCount - 1]).IndentingOverriden;
CheckState ();
CloseStartElement ();
- w.Write (indentFormatting);
+ WriteIndent ();
w.Write ("<?");
w.Write (name);
w.Write (' ');
@@ -834,7 +837,7 @@ openElements [openElementCount - 1]).IndentingOverriden;
if (prefix == null)
prefix = String.Empty;
- w.Write (indentFormatting);
+ WriteIndent ();
w.Write ('<');
if (prefix != String.Empty) {
w.Write (prefix);
diff --git a/mcs/class/System.XML/System.Xml/XmlWriter.cs b/mcs/class/System.XML/System.Xml/XmlWriter.cs
index 4f69abaf378..7e4fb8d6b28 100644
--- a/mcs/class/System.XML/System.Xml/XmlWriter.cs
+++ b/mcs/class/System.XML/System.Xml/XmlWriter.cs
@@ -273,7 +273,7 @@ namespace System.Xml
case XmlNodeType.EndEntity:
break;
case XmlNodeType.None:
- return; // Do nothing, nor reporting errors.
+ break; // Do nothing, nor reporting errors.
default:
throw new XmlException ("Unexpected node " + reader.Name + " of type " + reader.NodeType);
}
diff --git a/mcs/class/System/System.Diagnostics/ChangeLog b/mcs/class/System/System.Diagnostics/ChangeLog
index 392c500d5fc..7496fda092e 100644
--- a/mcs/class/System/System.Diagnostics/ChangeLog
+++ b/mcs/class/System/System.Diagnostics/ChangeLog
@@ -1,3 +1,17 @@
+2004-09-07 Dick Porter <dick@ximian.com>
+
+ * Process.cs: Throw documented exceptions when getting stdin,
+ stdout or stderr and they haven't been redirected. Check that
+ CreatePipe didn't fail, throw exceptions if it did. Close
+ redirected streams when the process is disposed, rather than rely
+ on the GC disposing them later. Makes timeline much happier,
+ because it could run out of file descriptors between GC
+ collections.
+
+2004-09-06 Dick Porter <dick@ximian.com>
+
+ * Process.cs: Make Dispose() actually dispose things.
+
2004-06-24 Atsushi Enomoto <atsushi@ximian.com>
* Process.cs : quick fix for UseShellExecute=false on windows. See
diff --git a/mcs/class/System/System.Diagnostics/Process.cs b/mcs/class/System/System.Diagnostics/Process.cs
index 66e22f14b75..e46ab5b0730 100755
--- a/mcs/class/System/System.Diagnostics/Process.cs
+++ b/mcs/class/System/System.Diagnostics/Process.cs
@@ -50,6 +50,11 @@ namespace System.Diagnostics {
private struct ProcInfo
{
public IntPtr process_handle;
+ /* If thread_handle is ever needed for
+ * something, take out the CloseHandle() in
+ * the Start_internal icall in
+ * mono/metadata/process.c
+ */
public IntPtr thread_handle;
public int pid; // Contains -GetLastError () on failure.
public int tid;
@@ -455,6 +460,10 @@ namespace System.Diagnostics {
[MonitoringDescription ("The standard error stream of this process.")]
public StreamReader StandardError {
get {
+ if (error_stream == null) {
+ throw new InvalidOperationException("Standard error has not been redirected");
+ }
+
return(error_stream);
}
}
@@ -465,6 +474,10 @@ namespace System.Diagnostics {
[MonitoringDescription ("The standard input stream of this process.")]
public StreamWriter StandardInput {
get {
+ if (input_stream == null) {
+ throw new InvalidOperationException("Standard input has not been redirected");
+ }
+
return(input_stream);
}
}
@@ -475,6 +488,10 @@ namespace System.Diagnostics {
[MonitoringDescription ("The standard output stream of this process.")]
public StreamReader StandardOutput {
get {
+ if (output_stream == null) {
+ throw new InvalidOperationException("Standard output has not been redirected");
+ }
+
return(output_stream);
}
}
@@ -734,6 +751,9 @@ namespace System.Diagnostics {
if(startInfo.RedirectStandardInput==true) {
ret=MonoIO.CreatePipe(out stdin_rd,
out stdin_wr);
+ if (ret == false) {
+ throw new IOException("Error creating standard input pipe");
+ }
} else {
stdin_rd=MonoIO.ConsoleInput;
/* This is required to stop the
@@ -746,6 +766,9 @@ namespace System.Diagnostics {
if(startInfo.RedirectStandardOutput==true) {
ret=MonoIO.CreatePipe(out stdout_rd,
out stdout_wr);
+ if (ret == false) {
+ throw new IOException("Error creating standard output pipe");
+ }
} else {
stdout_rd=(IntPtr)0;
stdout_wr=MonoIO.ConsoleOutput;
@@ -754,6 +777,9 @@ namespace System.Diagnostics {
if(startInfo.RedirectStandardError==true) {
ret=MonoIO.CreatePipe(out stderr_rd,
out stderr_wr);
+ if (ret == false) {
+ throw new IOException("Error creating standard error pipe");
+ }
} else {
stderr_rd=(IntPtr)0;
stderr_wr=MonoIO.ConsoleError;
@@ -901,7 +927,7 @@ namespace System.Diagnostics {
protected override void Dispose(bool disposing) {
// Check to see if Dispose has already been called.
- if(this.disposed) {
+ if(this.disposed == false) {
this.disposed=true;
// If this is a call to Dispose,
// dispose all managed resources.
@@ -917,6 +943,21 @@ namespace System.Diagnostics {
Process_free_internal(process_handle);
process_handle=IntPtr.Zero;
}
+
+ if (input_stream != null) {
+ input_stream.Close();
+ input_stream = null;
+ }
+
+ if (output_stream != null) {
+ output_stream.Close();
+ output_stream = null;
+ }
+
+ if (error_stream != null) {
+ error_stream.Close();
+ error_stream = null;
+ }
}
}
base.Dispose (disposing);
diff --git a/mcs/class/System/System.IO/ChangeLog b/mcs/class/System/System.IO/ChangeLog
index 085d366180a..9096cb03094 100755
--- a/mcs/class/System/System.IO/ChangeLog
+++ b/mcs/class/System/System.IO/ChangeLog
@@ -1,3 +1,13 @@
+2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * FAMWatcher.cs: s/fam/libfam.so.0/ so that g_module finds it even
+ when the development package is not installed.
+
+2004-08-06 Geoff Norton <gnorton@customerdna.com>
+
+ * FileSystemWatcher.cs: Use the new KeventWatcher if its supported
+ * KeventWatcher.cs: Added to cvs
+
2004-06-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* DefaultWatcher.cs: fixed subdirectories notifications and don't
diff --git a/mcs/class/System/System.IO/FAMWatcher.cs b/mcs/class/System/System.IO/FAMWatcher.cs
index 21e9bfeaff6..146411b8e91 100644
--- a/mcs/class/System/System.IO/FAMWatcher.cs
+++ b/mcs/class/System/System.IO/FAMWatcher.cs
@@ -320,24 +320,24 @@ namespace System.IO {
}
}
- [DllImport ("fam")]
+ [DllImport ("libfam.so.0")]
extern static int FAMOpen (out FAMConnection fc);
- [DllImport ("fam")]
+ [DllImport ("libfam.so.0")]
extern static int FAMClose (ref FAMConnection fc);
- [DllImport ("fam")]
+ [DllImport ("libfam.so.0")]
extern static int FAMMonitorDirectory (ref FAMConnection fc, string filename,
out FAMRequest fr, IntPtr user_data);
- [DllImport ("fam")]
+ [DllImport ("libfam.so.0")]
extern static int FAMCancelMonitor (ref FAMConnection fc, ref FAMRequest fr);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern static int InternalFAMNextEvent (ref FAMConnection fc, out string filename,
out int code, out int reqnum);
- [DllImport ("fam")]
+ [DllImport ("libfam.so.0")]
extern static int FAMPending (ref FAMConnection fc);
}
}
diff --git a/mcs/class/System/System.IO/KeventWatcher.cs b/mcs/class/System/System.IO/KeventWatcher.cs
new file mode 100644
index 00000000000..56eab5a1eef
--- /dev/null
+++ b/mcs/class/System/System.IO/KeventWatcher.cs
@@ -0,0 +1,351 @@
+//
+// System.IO.KeventWatcher.cs: interface with osx kevent
+//
+// Authors:
+// Geoff Norton (gnorton@customerdna.com)
+//
+// (c) 2004 Geoff Norton
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading;
+
+namespace System.IO {
+
+ struct kevent {
+ public int ident;
+ public short filter;
+ public ushort flags;
+ public uint fflags;
+ public int data;
+ public string udata;
+ }
+
+ struct timespec {
+ public int tv_sec;
+ public int tv_usec;
+ }
+
+ class KeventFileData {
+ public FileSystemInfo fsi;
+ public DateTime LastAccessTime;
+ public DateTime LastWriteTime;
+
+ public KeventFileData(FileSystemInfo fsi, DateTime LastAccessTime, DateTime LastWriteTime) {
+ this.fsi = fsi;
+ this.LastAccessTime = LastAccessTime;
+ this.LastWriteTime = LastWriteTime;
+ }
+ }
+
+ class KeventData {
+ public FileSystemWatcher FSW;
+ public string Directory;
+ public string FileMask;
+ public bool IncludeSubdirs;
+ public bool Enabled;
+ public Hashtable DirEntries;
+ public kevent ev;
+ }
+
+ class KeventWatcher : IFileWatcher
+ {
+ static bool failed;
+ static KeventWatcher instance;
+ static Hashtable watches;
+ static Hashtable requests;
+ static Thread thread;
+ static int conn;
+ static bool stop;
+
+ private KeventWatcher ()
+ {
+ }
+
+ public static bool GetInstance (out IFileWatcher watcher)
+ {
+ lock (typeof (KeventWatcher)) {
+ if (failed == true) {
+ watcher = null;
+ return false;
+ }
+
+ if (instance != null) {
+ watcher = instance;
+ return true;
+ }
+
+ watches = Hashtable.Synchronized (new Hashtable ());
+ requests = Hashtable.Synchronized (new Hashtable ());
+ conn = kqueue();
+ if (conn == -1) {
+ failed = true;
+ watcher = null;
+ return false;
+ }
+
+ instance = new KeventWatcher ();
+ watcher = instance;
+ return true;
+ }
+ }
+
+ public void StartDispatching (FileSystemWatcher fsw)
+ {
+ KeventData data;
+ lock (this) {
+ if (thread == null) {
+ thread = new Thread (new ThreadStart (Monitor));
+ thread.IsBackground = true;
+ thread.Start ();
+ }
+
+ data = (KeventData) watches [fsw];
+ }
+
+ if (data == null) {
+ data = new KeventData ();
+ data.FSW = fsw;
+ data.Directory = fsw.FullPath;
+ data.FileMask = fsw.MangledFilter;
+ data.IncludeSubdirs = fsw.IncludeSubdirectories;
+
+ data.Enabled = true;
+ lock (this) {
+ StartMonitoringDirectory (data);
+ watches [fsw] = data;
+ stop = false;
+ }
+ }
+ }
+
+ static void StartMonitoringDirectory (KeventData data)
+ {
+ DirectoryInfo dir = new DirectoryInfo (data.Directory);
+ if(data.DirEntries == null) {
+ data.DirEntries = new Hashtable();
+ foreach (FileSystemInfo fsi in dir.GetFileSystemInfos() )
+ data.DirEntries.Add(fsi.FullName, new KeventFileData(fsi, fsi.LastAccessTime, fsi.LastWriteTime));
+ }
+
+ int fd = open(data.Directory, 0, 0);
+ kevent ev = new kevent();
+ timespec nullts = new timespec();
+ nullts.tv_sec = 0;
+ nullts.tv_usec = 0;
+ if (fd > 0) {
+ ev.ident = fd;
+ ev.filter = -4;
+ ev.flags = 1 | 4 | 20;
+ ev.fflags = 20 | 2 | 1 | 8;
+ ev.data = 0;
+ ev.udata = data.Directory;
+ kevent outev = new kevent();
+ outev.udata = "";
+ kevent (conn, ref ev, 1, ref outev, 0, ref nullts);
+ data.ev = ev;
+ requests [fd] = data;
+ }
+
+ if (!data.IncludeSubdirs)
+ return;
+
+ }
+
+ public void StopDispatching (FileSystemWatcher fsw)
+ {
+ KeventData data;
+ lock (this) {
+ data = (KeventData) watches [fsw];
+ if (data == null)
+ return;
+
+ StopMonitoringDirectory (data);
+ watches.Remove (fsw);
+ if (watches.Count == 0)
+ stop = true;
+
+ if (!data.IncludeSubdirs)
+ return;
+
+ }
+ }
+
+ static void StopMonitoringDirectory (KeventData data)
+ {
+ close(data.ev.ident);
+ }
+
+ void Monitor ()
+ {
+
+ while (!stop) {
+ kevent ev = new kevent();
+ ev.udata = "";
+ kevent nullev = new kevent();
+ nullev.udata = "";
+ timespec ts = new timespec();
+ ts.tv_sec = 0;
+ ts.tv_usec = 0;
+ int haveEvents;
+ lock (this) {
+ haveEvents = kevent (conn, ref nullev, 0, ref ev, 1, ref ts);
+ }
+
+ if (haveEvents > 0) {
+ // Restart monitoring
+ KeventData data = (KeventData) requests [ev.ident];
+ StartMonitoringDirectory(data);
+ ProcessEvent (ev);
+ } else {
+ System.Threading.Thread.Sleep (500);
+ }
+ }
+
+ lock (this) {
+ thread = null;
+ stop = false;
+ }
+ }
+
+ void ProcessEvent (kevent ev)
+ {
+ lock (this) {
+ KeventData data = (KeventData) requests [ev.ident];
+ if (!data.Enabled)
+ return;
+
+ FileSystemWatcher fsw;
+ string filename = "";
+
+ fsw = data.FSW;
+ FileAction fa = 0;
+ DirectoryInfo dir = new DirectoryInfo (data.Directory);
+ FileSystemInfo changedFsi = null;
+
+ try {
+ foreach (FileSystemInfo fsi in dir.GetFileSystemInfos() )
+ if (data.DirEntries.ContainsKey (fsi.FullName) && (fsi is FileInfo)) {
+ KeventFileData entry = (KeventFileData) data.DirEntries [fsi.FullName];
+ if ( (entry.LastWriteTime != fsi.LastWriteTime) || (entry.LastAccessTime != fsi.LastAccessTime) ) {
+ filename = fsi.FullName;
+ fa = FileAction.Modified;
+ data.DirEntries [fsi.FullName] = new KeventFileData(fsi, fsi.LastAccessTime, fsi.LastWriteTime);
+ if (fsw.IncludeSubdirectories && fsi is DirectoryInfo) {
+ data.Directory = filename;
+ requests [ev.ident] = data;
+ ProcessEvent(ev);
+ }
+ PostEvent(filename, fsw, fa, changedFsi);
+ }
+ }
+ } catch (Exception) {
+ // The file system infos were changed while we processed them
+ }
+ // Deleted
+ try {
+ bool deleteMatched = true;
+ while(deleteMatched) {
+ foreach (KeventFileData entry in data.DirEntries.Values) {
+ if (!File.Exists (entry.fsi.FullName) && !Directory.Exists (entry.fsi.FullName)) {
+ filename = entry.fsi.FullName;
+ fa = FileAction.Removed;
+ data.DirEntries.Remove (entry.fsi.FullName);
+ PostEvent(filename, fsw, fa, changedFsi);
+ break;
+ }
+ }
+ deleteMatched = false;
+ }
+ } catch (Exception) {
+ // The file system infos were changed while we processed them
+ }
+ // Added
+ try {
+ foreach (FileSystemInfo fsi in dir.GetFileSystemInfos())
+ if (!data.DirEntries.ContainsKey (fsi.FullName)) {
+ changedFsi = fsi;
+ filename = fsi.FullName;
+ fa = FileAction.Added;
+ data.DirEntries [fsi.FullName] = new KeventFileData(fsi, fsi.LastAccessTime, fsi.LastWriteTime);
+ PostEvent(filename, fsw, fa, changedFsi);
+ }
+ } catch (Exception) {
+ // The file system infos were changed while we processed them
+ }
+
+
+ }
+ }
+
+ private void PostEvent (string filename, FileSystemWatcher fsw, FileAction fa, FileSystemInfo changedFsi) {
+ RenamedEventArgs renamed = null;
+ if (fa == 0)
+ return;
+
+ if (fsw.IncludeSubdirectories && fa == FileAction.Added) {
+ if (changedFsi is DirectoryInfo) {
+ KeventData newdirdata = new KeventData ();
+ newdirdata.FSW = fsw;
+ newdirdata.Directory = changedFsi.FullName;
+ newdirdata.FileMask = fsw.MangledFilter;
+ newdirdata.IncludeSubdirs = fsw.IncludeSubdirectories;
+
+ newdirdata.Enabled = true;
+ lock (this) {
+ StartMonitoringDirectory (newdirdata);
+ }
+ }
+ }
+
+ if (!fsw.Pattern.IsMatch(filename))
+ return;
+
+ lock (fsw) {
+ fsw.DispatchEvents (fa, filename, ref renamed);
+ if (fsw.Waiting) {
+ fsw.Waiting = false;
+ System.Threading.Monitor.PulseAll (fsw);
+ }
+ }
+ }
+
+ [DllImport ("libc")]
+ extern static int open(string path, int flags, int mode_t);
+
+ [DllImport ("libc")]
+ extern static int close(int fd);
+
+ [DllImport ("libc")]
+ extern static int kqueue();
+
+ [DllImport ("libc")]
+ extern static int kevent(int kqueue, ref kevent ev, int nchanges, ref kevent evtlist, int nevents, ref timespec ts);
+ }
+}
+
diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog
index 92fa9343ef4..43d11edae2c 100644
--- a/mcs/class/System/System.Net/ChangeLog
+++ b/mcs/class/System/System.Net/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpWebResponse.cs: remove unused SplitValue method.
+
2004-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Cookie.cs: don't fail when using default constructor. Fixes bug
diff --git a/mcs/class/System/System.Net/HttpWebResponse.cs b/mcs/class/System/System.Net/HttpWebResponse.cs
index 9fcdce33fe3..459749e7c14 100644
--- a/mcs/class/System/System.Net/HttpWebResponse.cs
+++ b/mcs/class/System/System.Net/HttpWebResponse.cs
@@ -329,20 +329,6 @@ namespace System.Net
}
}
- static string [] SplitValue (string input)
- {
- string [] result = new string [2];
- int eq = input.IndexOf ('=');
- if (eq == -1) {
- result [0] = "invalid";
- } else {
- result [0] = input.Substring (0, eq).Trim ().ToUpper ();
- result [1] = input.Substring (eq + 1);
- }
-
- return result;
- }
-
void SetCookie (string header)
{
string [] name_values = header.Trim ().Split (';');
diff --git a/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs b/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs
index 9e5923667b5..c2d609ecec2 100755
--- a/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs
+++ b/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs
@@ -5,10 +5,6 @@
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// (C) 2004 Novell (http://www.novell.com)
-//
-
-//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -60,63 +56,167 @@ namespace Mono.Security.Authenticode {
public const string spcIndirectDataContext = "1.3.6.1.4.1.311.2.1.4";
- internal byte[] rawData;
+ private byte[] fileblock;
+ private FileStream fs;
+ private int blockNo;
+ private int blockLength;
+ private int peOffset;
+ private int dirSecurityOffset;
+ private int dirSecuritySize;
public AuthenticodeBase ()
{
+ fileblock = new byte [4096];
}
- protected byte[] HashFile (string fileName, string hashName)
+ internal void Open (string filename)
{
- FileStream fs = new FileStream (fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
- byte[] file = new byte [fs.Length];
- fs.Read (file, 0, file.Length);
- fs.Close ();
+ if (fs != null)
+ Close ();
+ fs = new FileStream (filename, FileMode.Open, FileAccess.Read, FileShare.Read);
+ }
- // MZ - DOS header
- if (BitConverterLE.ToUInt16 (file, 0) != 0x5A4D)
- return null;
+ internal void Close ()
+ {
+ if (fs != null) {
+ fs.Close ();
+ fs = null;
+ blockNo = 0;
+ }
+ }
- // find offset of PE header
- int peOffset = BitConverterLE.ToInt32 (file, 60);
- if (peOffset > file.Length)
- return null;
+ internal bool ReadFirstBlock ()
+ {
+ if (fs == null)
+ return false;
+
+ fs.Position = 0;
+ // read first block - it will include (100% sure)
+ // the MZ header and (99.9% sure) the PE header
+ blockLength = fs.Read (fileblock, 0, fileblock.Length);
+ blockNo = 1;
+ if (blockLength < 64)
+ return false; // invalid PE file
+
+ // 1. Validate the MZ header informations
+ // 1.1. Check for magic MZ at start of header
+ if (BitConverterLE.ToUInt16 (fileblock, 0) != 0x5A4D)
+ return false;
+
+ // 1.2. Find the offset of the PE header
+ peOffset = BitConverterLE.ToInt32 (fileblock, 60);
+ if (peOffset > fileblock.Length) {
+ // just in case (0.1%) this can actually happen
+ string msg = String.Format (Locale.GetText (
+ "Header size too big (> {0} bytes)."),
+ fileblock.Length);
+ throw new NotSupportedException (msg);
+ }
+ if (peOffset > fs.Length)
+ return false;
- // PE - NT header
- if (BitConverterLE.ToUInt16 (file, peOffset) != 0x4550)
- return null;
+ // 2. Read between DOS header and first part of PE header
+ // 2.1. Check for magic PE at start of header
+ if (BitConverterLE.ToUInt16 (fileblock, peOffset) != 0x4550)
+ return false;
- // IMAGE_DIRECTORY_ENTRY_SECURITY
- int dirSecurityOffset = BitConverterLE.ToInt32 (file, peOffset + 152);
- int dirSecuritySize = BitConverterLE.ToInt32 (file, peOffset + 156);
+ // 2.2. Locate IMAGE_DIRECTORY_ENTRY_SECURITY (offset and size)
+ dirSecurityOffset = BitConverterLE.ToInt32 (fileblock, peOffset + 152);
+ dirSecuritySize = BitConverterLE.ToInt32 (fileblock, peOffset + 156);
+
+ return true;
+ }
+
+ internal byte[] GetSecurityEntry ()
+ {
+ if (blockNo < 1)
+ ReadFirstBlock ();
if (dirSecuritySize > 8) {
- rawData = new byte [dirSecuritySize - 8];
- Buffer.BlockCopy (file, dirSecurityOffset + 8, rawData, 0, rawData.Length);
-/* DEBUG
- FileStream debug = new FileStream (fileName + ".sig", FileMode.Create, FileAccess.Write);
- debug.Write (rawData, 0, rawData.Length);
- debug.Close ();*/
+ // remove header from size (not ASN.1 based)
+ byte[] secEntry = new byte [dirSecuritySize - 8];
+ // position after header and read entry
+ fs.Position = dirSecurityOffset + 8;
+ fs.Read (secEntry, 0, secEntry.Length);
+ return secEntry;
+ }
+ return null;
+ }
+
+ // returns null if the file isn't signed
+ internal byte[] GetHash (HashAlgorithm hash)
+ {
+ if (blockNo < 1)
+ ReadFirstBlock ();
+ fs.Position = blockLength;
+
+ // hash the rest of the file
+ long n = fs.Length - blockLength;
+ // minus any authenticode signature (with 8 bytes header)
+ if (dirSecurityOffset > 0) {
+ // it is also possible that the signature block
+ // starts within the block in memory (small EXE)
+ if (dirSecurityOffset < blockLength) {
+ blockLength = dirSecurityOffset;
+ n = 0;
+ }
+ else
+ n -= (dirSecuritySize);
}
- else
- rawData = null;
- HashAlgorithm hash = HashAlgorithm.Create (hashName);
- // 0 to 215 (216) then skip 4 (checksum)
+ // Authenticode(r) gymnastics
+ // Hash from (generally) 0 to 215 (216 bytes)
int pe = peOffset + 88;
- hash.TransformBlock (file, 0, pe, file, 0);
+ hash.TransformBlock (fileblock, 0, pe, fileblock, 0);
+ // then skip 4 for checksum
pe += 4;
- // 220 to 279 (60) then skip 8 (IMAGE_DIRECTORY_ENTRY_SECURITY)
- hash.TransformBlock (file, pe, 60, file, pe);
+ // Continue hashing from (generally) 220 to 279 (60 bytes)
+ hash.TransformBlock (fileblock, pe, 60, fileblock, pe);
+ // then skip 8 bytes for IMAGE_DIRECTORY_ENTRY_SECURITY
pe += 68;
- // 288 to end of file
- int n = file.Length - pe;
- // minus any authenticode signature (with 8 bytes header)
- if (dirSecurityOffset != 0)
- n -= (dirSecuritySize);
- hash.TransformFinalBlock (file, pe, n);
+ // everything is present so start the hashing
+ if (n == 0) {
+ // hash the (only) block
+ hash.TransformFinalBlock (fileblock, pe, blockLength - pe);
+ }
+ else {
+ // hash the last part of the first (already in memory) block
+ hash.TransformBlock (fileblock, pe, blockLength - pe, fileblock, 0);
+
+ // hash by blocks of 4096 bytes
+ long blocks = (n >> 12);
+ int remainder = (int)(n - (blocks << 12));
+ if (remainder == 0) {
+ blocks--;
+ remainder = 4096;
+ }
+ // blocks
+ while (blocks-- > 0) {
+ fs.Read (fileblock, 0, fileblock.Length);
+ hash.TransformBlock (fileblock, 0, fileblock.Length, fileblock, 0);
+ }
+ // remainder
+ if (fs.Read (fileblock, 0, remainder) != remainder)
+ return null;
+ hash.TransformFinalBlock (fileblock, 0, remainder);
+ }
return hash.Hash;
}
+
+ // for compatibility only
+ protected byte[] HashFile (string fileName, string hashName)
+ {
+ try {
+ Open (fileName);
+ HashAlgorithm hash = HashAlgorithm.Create (hashName);
+ byte[] result = GetHash (hash);
+ Close ();
+ return result;
+ }
+ catch {
+ return null;
+ }
+ }
}
}
diff --git a/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeDeformatter.cs b/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeDeformatter.cs
index 803781954f7..ea0bd30e242 100755
--- a/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeDeformatter.cs
+++ b/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeDeformatter.cs
@@ -2,12 +2,9 @@
// AuthenticodeDeformatter.cs: Authenticode signature validator
//
// Author:
-// Sebastien Pouliot (spouliot@motus.com)
+// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-//
-
-//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -57,6 +54,9 @@ namespace Mono.Security.Authenticode {
private DateTime timestamp;
private X509Certificate signingCertificate;
private int reason;
+ private bool trustedRoot;
+ private bool trustedTimestampRoot;
+ private byte[] entry;
private X509Chain signerChain;
private X509Chain timestampChain;
@@ -70,17 +70,20 @@ namespace Mono.Security.Authenticode {
public AuthenticodeDeformatter (string fileName) : this ()
{
- if (!CheckSignature (fileName)) {
- // invalid or no signature
- if (signedHash != null)
- throw new COMException ("Invalid signature");
- // no exception is thrown when there's no signature in the PE file
- }
+ FileName = fileName;
}
public string FileName {
get { return filename; }
- set { CheckSignature (value); }
+ set {
+ Reset ();
+ try {
+ CheckSignature (value);
+ }
+ catch {
+ reason = 1;
+ }
+ }
}
public byte[] Hash {
@@ -101,7 +104,7 @@ namespace Mono.Security.Authenticode {
public bool IsTrusted ()
{
- if (rawData == null) {
+ if (entry == null) {
reason = 1;
return false;
}
@@ -111,13 +114,13 @@ namespace Mono.Security.Authenticode {
return false;
}
- if (signerChain.Root == null) {
+ if ((signerChain.Root == null) || !trustedRoot) {
reason = 6;
return false;
}
if (timestamp != DateTime.MinValue) {
- if (timestampChain.Root == null) {
+ if ((timestampChain.Root == null) || !trustedTimestampRoot) {
reason = 6;
return false;
}
@@ -139,7 +142,11 @@ namespace Mono.Security.Authenticode {
}
public byte[] Signature {
- get { return (byte[]) rawData.Clone (); }
+ get {
+ if (entry == null)
+ return null;
+ return (byte[]) entry.Clone ();
+ }
}
public DateTime Timestamp {
@@ -157,43 +164,58 @@ namespace Mono.Security.Authenticode {
private bool CheckSignature (string fileName)
{
filename = fileName;
-
- // by default we try with MD5
- string hashName = "MD5";
- // compare the signature's hash with the hash of the file
- hash = HashFile (filename, hashName);
-
- // is a signature present ?
- if (rawData == null)
+ base.Open (filename);
+ entry = base.GetSecurityEntry ();
+ if (entry == null) {
+ // no signature is present
+ reason = 1;
+ base.Close ();
return false;
+ }
- PKCS7.ContentInfo ci = new PKCS7.ContentInfo (rawData);
- if (ci.ContentType != PKCS7.Oid.signedData)
+ PKCS7.ContentInfo ci = new PKCS7.ContentInfo (entry);
+ if (ci.ContentType != PKCS7.Oid.signedData) {
+ base.Close ();
return false;
+ }
PKCS7.SignedData sd = new PKCS7.SignedData (ci.Content);
- if (sd.ContentInfo.ContentType != spcIndirectDataContext)
+ if (sd.ContentInfo.ContentType != spcIndirectDataContext) {
+ base.Close ();
return false;
+ }
coll = sd.Certificates;
ASN1 spc = sd.ContentInfo.Content;
signedHash = spc [0][1][1];
- if (signedHash.Length == 20) {
- // seems to be SHA-1, restart hashing
- hashName = "SHA1";
- hash = HashFile (filename, hashName);
+
+ HashAlgorithm ha = null;
+ switch (signedHash.Length) {
+ case 16:
+ ha = HashAlgorithm.Create ("MD5");
+ hash = GetHash (ha);
+ break;
+ case 20:
+ ha = HashAlgorithm.Create ("SHA1");
+ hash = GetHash (ha);
+ break;
+ default:
+ reason = 5;
+ base.Close ();
+ return false;
}
+ base.Close ();
if (!signedHash.CompareValue (hash))
return false;
// messageDigest is a hash of spcIndirectDataContext (which includes the file hash)
byte[] spcIDC = spc [0].Value;
- HashAlgorithm ha = HashAlgorithm.Create (hashName);
+ ha.Initialize (); // re-using hash instance
byte[] messageDigest = ha.ComputeHash (spcIDC);
- return VerifySignature (sd, messageDigest, hashName);
+ return VerifySignature (sd, messageDigest, ha);
}
private bool CompareIssuerSerial (string issuer, byte[] serial, X509Certificate x509)
@@ -213,7 +235,7 @@ namespace Mono.Security.Authenticode {
}
//private bool VerifySignature (ASN1 cs, byte[] calculatedMessageDigest, string hashName)
- private bool VerifySignature (PKCS7.SignedData sd, byte[] calculatedMessageDigest, string hashName)
+ private bool VerifySignature (PKCS7.SignedData sd, byte[] calculatedMessageDigest, HashAlgorithm ha)
{
string contentType = null;
ASN1 messageDigest = null;
@@ -242,7 +264,7 @@ namespace Mono.Security.Authenticode {
case "1.3.6.1.4.1.311.2.1.12":
// spcSpOpusInfo (Microsoft code signing)
try {
- spcSpOpusInfo = System.Text.Encoding.UTF8.GetString (attr[1][0][1][0].Value);
+ spcSpOpusInfo = System.Text.Encoding.UTF8.GetString (attr[1][0][0][0].Value);
}
catch (NullReferenceException) {
spcSpOpusInfo = null;
@@ -262,13 +284,13 @@ namespace Mono.Security.Authenticode {
return false;
// verify signature
- string hashOID = CryptoConfig.MapNameToOID (hashName);
+ string hashOID = CryptoConfig.MapNameToOID (ha.ToString ());
// change to SET OF (not [0]) as per PKCS #7 1.5
ASN1 aa = new ASN1 (0x31);
foreach (ASN1 a in sd.SignerInfo.AuthenticatedAttributes)
aa.Add (a);
- HashAlgorithm ha = HashAlgorithm.Create (hashName);
+ ha.Initialize ();
byte[] p7hash = ha.ComputeHash (aa.GetBytes ());
byte[] signature = sd.SignerInfo.Signature;
@@ -282,10 +304,9 @@ namespace Mono.Security.Authenticode {
RSACryptoServiceProvider rsa = (RSACryptoServiceProvider) x509.RSA;
if (rsa.VerifyHash (p7hash, hashOID, signature)) {
signerChain.LoadCertificates (coll);
- if (signerChain.Build (x509))
- signingCertificate = x509;
- else
- return false;
+ trustedRoot = signerChain.Build (x509);
+ signingCertificate = x509;
+ break;
}
}
}
@@ -301,17 +322,18 @@ namespace Mono.Security.Authenticode {
// countersignature (1 2 840 113549 1 9 6)
// SET {
PKCS7.SignerInfo cs = new PKCS7.SignerInfo (attr [1]);
- return VerifyCounterSignature (cs, signature, hashName);
+ trustedTimestampRoot = VerifyCounterSignature (cs, signature);
+ break;
default:
// we don't support other unauthenticated attributes
break;
}
}
- return true;
+ return (trustedRoot && trustedTimestampRoot);
}
- private bool VerifyCounterSignature (PKCS7.SignerInfo cs, byte[] signature, string hashName)
+ private bool VerifyCounterSignature (PKCS7.SignerInfo cs, byte[] signature)
{
// SEQUENCE {
// INTEGER 1
@@ -358,6 +380,7 @@ namespace Mono.Security.Authenticode {
if (messageDigest == null)
return false;
// TODO: must be read from the ASN.1 structure
+ string hashName = null;
switch (messageDigest.Length) {
case 16:
hashName = "MD5";
@@ -398,5 +421,20 @@ namespace Mono.Security.Authenticode {
// no certificate can verify this signature!
return false;
}
+
+ private void Reset ()
+ {
+ filename = null;
+ entry = null;
+ hash = null;
+ signedHash = null;
+ signingCertificate = null;
+ reason = -1;
+ trustedRoot = false;
+ trustedTimestampRoot = false;
+ signerChain.Reset ();
+ timestampChain.Reset ();
+ timestamp = DateTime.MinValue;
+ }
}
}
diff --git a/mcs/class/corlib/Mono.Security.Authenticode/ChangeLog b/mcs/class/corlib/Mono.Security.Authenticode/ChangeLog
index 7f9398815f2..da0e586a096 100755
--- a/mcs/class/corlib/Mono.Security.Authenticode/ChangeLog
+++ b/mcs/class/corlib/Mono.Security.Authenticode/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * AuthenticodeBase.cs: Merge optimizations from HEAD.
+ * AuthenticodeDeformatter.cs: Merge optimizations from HEAD.
+
2004-04-28 Sebastien Pouliot <sebastien@ximian.com>
* AuthenticodeBase.cs: In sync with Mono.Security.dll version.
diff --git a/mcs/class/corlib/Mono.Security.X509/ChangeLog b/mcs/class/corlib/Mono.Security.X509/ChangeLog
index 5cfdfbd7a78..add41ab01a7 100644
--- a/mcs/class/corlib/Mono.Security.X509/ChangeLog
+++ b/mcs/class/corlib/Mono.Security.X509/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * X509Chain.cs: Merge bug fixes from HEAD.
+
2004-05-27 Sebastien Pouliot <sebastien@ximian.com>
* X509Certificate.cs: Rethrow original exception when parsing X.509
diff --git a/mcs/class/corlib/Mono.Security.X509/X509Chain.cs b/mcs/class/corlib/Mono.Security.X509/X509Chain.cs
index 0ff5d875ac5..f8035e6c661 100755
--- a/mcs/class/corlib/Mono.Security.X509/X509Chain.cs
+++ b/mcs/class/corlib/Mono.Security.X509/X509Chain.cs
@@ -9,10 +9,6 @@
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// (C) 2004 Novell (http://www.novell.com)
-//
-
-//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
@@ -136,7 +132,7 @@ namespace Mono.Security.X509 {
tmp = FindCertificateParent (x);
if (x != null) {
_chain.Add (x);
- tmp = x; // last valid
+ x = tmp; // last valid
}
}
// find a trusted root
@@ -193,7 +189,8 @@ namespace Mono.Security.X509 {
_status = X509ChainStatusFlags.NoError;
roots = null; // this force a reload
certs.Clear ();
- _chain.Clear ();
+ if (_chain != null)
+ _chain.Clear ();
}
// private stuff
diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog
index 75d3b48b95b..4412e03bfe9 100644
--- a/mcs/class/corlib/System.IO/ChangeLog
+++ b/mcs/class/corlib/System.IO/ChangeLog
@@ -1,3 +1,11 @@
+2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Stream.cs: Close() does not call Flush(). Fixes bug #65340.
+
+2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * StreamWriter.cs: avoid String.ToCharArray for perf.
+
2004-08-18 Dick Porter <dick@ximian.com>
* StreamWriter.cs: Flush the buffer if AutoFlush is set to true.
diff --git a/mcs/class/corlib/System.IO/Stream.cs b/mcs/class/corlib/System.IO/Stream.cs
index 04884fb5e3d..6623da319a1 100755
--- a/mcs/class/corlib/System.IO/Stream.cs
+++ b/mcs/class/corlib/System.IO/Stream.cs
@@ -77,7 +77,6 @@ namespace System.IO
public virtual void Close ()
{
- Flush ();
}
void IDisposable.Dispose ()
diff --git a/mcs/class/corlib/System.IO/StreamWriter.cs b/mcs/class/corlib/System.IO/StreamWriter.cs
index 96ac1380984..1799d74e6e6 100644
--- a/mcs/class/corlib/System.IO/StreamWriter.cs
+++ b/mcs/class/corlib/System.IO/StreamWriter.cs
@@ -249,6 +249,28 @@ namespace System.IO {
index += todo;
decode_pos += todo;
}
+ }
+
+ void LowLevelWrite (string s)
+ {
+ int count = s.Length;
+ int index = 0;
+ while (count > 0) {
+ int todo = decode_buf.Length - decode_pos;
+ if (todo == 0) {
+ Decode ();
+ todo = decode_buf.Length;
+ }
+ if (todo > count)
+ todo = count;
+
+ for (int i = 0; i < todo; i ++)
+ decode_buf [i + decode_pos] = s [i + index];
+
+ count -= todo;
+ index += todo;
+ decode_pos += todo;
+ }
}
public override void Write (char value)
@@ -282,7 +304,8 @@ namespace System.IO {
throw new ObjectDisposedException("StreamWriter");
if (value != null)
- LowLevelWrite (value.ToCharArray (), 0, value.Length);
+ LowLevelWrite (value);
+
if (iflush)
Flush ();
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/ChangeLog b/mcs/class/corlib/System.Reflection.Emit/ChangeLog
index 0f117fa51cf..862d7d19c06 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ChangeLog
+++ b/mcs/class/corlib/System.Reflection.Emit/ChangeLog
@@ -1,3 +1,14 @@
+2004-09-17 Zoltan Varga <vargaz@freemail.hu>
+
+ * CustomAttributeBuilder.cs: Applied patch from Marcus Urban (mathpup@mylinuxisp.com). Add support for defining custom marshallers by calling SetCustomAttribute.
+
+2004-09-09 Zoltan Varga <vargaz@freemail.hu>
+
+ * TypeBuilder.cs: Set the table_idx of the global type to 1.
+
+ * ModuleBuilder.cs: Save the main module of the assembly even if it is
+ transient.
+
2004-08-13 Sebastien Pouliot <sebastien@ximian.com>
* AssemblyBuilder.cs: (Partly) Fix delay-signing issue (#56621) when
diff --git a/mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.cs
index e85e67022bc..daadb065ed3 100755
--- a/mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.cs
@@ -198,6 +198,8 @@ namespace System.Reflection.Emit {
int sizeConst = 0;
int value;
int utype; /* the (stupid) ctor takes a short or an enum ... */
+ Type marshalTypeRef = null;
+ string marshalCookie = String.Empty;
utype = (int)data [2];
utype |= ((int)data [3]) << 8;
@@ -231,7 +233,21 @@ namespace System.Reflection.Emit {
value |= ((int)data [pos++]) << 24;
sizeConst = value;
break;
+ case "MarshalTypeRef":
+ case "MarshalType":
+ len = decode_len (data, pos, out pos);
+ marshalTypeRef = Type.GetType (string_from_bytes (data, pos, len));
+ pos += len;
+ break;
+ case "MarshalCookie":
+ len = decode_len (data, pos, out pos);
+ marshalCookie = string_from_bytes (data, pos, len);
+ pos += len;
+ break;
default:
+ len = decode_len(data, pos, out pos);
+ string v = string_from_bytes (data, pos, len);
+ pos += len;
break;
}
}
@@ -245,6 +261,8 @@ namespace System.Reflection.Emit {
return UnmanagedMarshal.DefineByValArray (sizeConst);
case UnmanagedType.ByValTStr:
return UnmanagedMarshal.DefineByValTStr (sizeConst);
+ case UnmanagedType.CustomMarshaler:
+ return UnmanagedMarshal.DefineCustom ( marshalTypeRef, marshalCookie, marshalTypeRef.ToString (), Guid.Empty);
default:
return UnmanagedMarshal.DefineUnmanagedMarshal ((UnmanagedType)utype);
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
index a7d4888d6d7..eb958b22b7f 100644
--- a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs
@@ -624,9 +624,8 @@ namespace System.Reflection.Emit {
internal void Save ()
{
- if (transient)
+ if (transient && !is_main)
return;
-
if ((global_type != null) && (global_type_created == null))
global_type_created = global_type.CreateType ();
diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
index c0059b54286..edcf429d9cc 100644
--- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
@@ -97,6 +97,7 @@ namespace System.Reflection.Emit {
this.attrs = attr;
this.class_size = 0;
fullname = this.tname = "<Module>";
+ this.table_idx = 1;
this.nspace = "";
pmodule = mb;
setup_internal_class (this);
@@ -987,7 +988,7 @@ namespace System.Reflection.Emit {
public override Type[] GetNestedTypes (BindingFlags bindingAttr) {
bool match;
ArrayList result = new ArrayList ();
-
+
if (subtypes == null)
return Type.EmptyTypes;
foreach (TypeBuilder t in subtypes) {
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog b/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
index 3eab4fba987..b74738d5faf 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-10 Raja R Harinath <rharinath@novell.com>
+
+ Fix bootstrap with mcs 1.1.x.
+ * UnmanagedType.cs (UnmanagedType.__mono_bootstrap_NativeTypeMax):
+ Mark as non-compliant to CLS.
+
2004-06-22 Raja R Harinath <rharinath@novell.com>
Fix bootstrap with mcs 0.31.
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/UnmanagedType.cs b/mcs/class/corlib/System.Runtime.InteropServices/UnmanagedType.cs
index 6502e1f90f6..1b5f3363c24 100755
--- a/mcs/class/corlib/System.Runtime.InteropServices/UnmanagedType.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices/UnmanagedType.cs
@@ -188,6 +188,7 @@ namespace System.Runtime.InteropServices {
#if BOOTSTRAP_WITH_OLDLIB
/// <summary>
/// </summary>
+ [CLSCompliant(false)]
__mono_bootstrap_NativeTypeMax = 80,
#endif
} // UnmanagedType
diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/ChangeLog b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/ChangeLog
index b5a036af423..86be09eef0a 100644
--- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/ChangeLog
+++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * X509Certificate.cs: Merge changes from HEAD.
+
2003-12-15 Sebastien Pouliot <spouliot@videotron.ca>
* X509Certificate.cs: Removed old (commented) Authenticode stuff.
diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
index af5722f601d..5d3f9dd8177 100644
--- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
+++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs
@@ -116,15 +116,26 @@ namespace System.Security.Cryptography.X509Certificates {
[MonoTODO ("Incomplete - minimal validation in this version")]
public static X509Certificate CreateFromSignedFile (string filename)
{
- AuthenticodeDeformatter a = new AuthenticodeDeformatter (filename);
- if (a.SigningCertificate != null) {
- return new X509Certificate (a.SigningCertificate.RawData);
- }
- else {
+ try {
+ AuthenticodeDeformatter a = new AuthenticodeDeformatter (filename);
+ if (a.SigningCertificate != null) {
+ if (a.Reason != 0) {
+ string msg = String.Format (Locale.GetText (
+ "Invalid digital signature on {0}, reason #{1}."),
+ filename, a.Reason);
+ throw new COMException (msg);
+ }
+ return new X509Certificate (a.SigningCertificate.RawData);
+ }
+
// if no signature is present return an empty certificate
byte[] cert = null; // must not confuse compiler about null ;)
return new X509Certificate (cert);
}
+ catch (Exception e) {
+ string msg = String.Format (Locale.GetText ("Couldn't extract digital signature from {0}."), filename);
+ throw new COMException (msg, e);
+ }
}
// constructors
@@ -410,4 +421,4 @@ namespace System.Security.Cryptography.X509Certificates {
}
#endif
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/corlib/System.Threading/ChangeLog b/mcs/class/corlib/System.Threading/ChangeLog
index d6236617956..d441965fb9b 100644
--- a/mcs/class/corlib/System.Threading/ChangeLog
+++ b/mcs/class/corlib/System.Threading/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Timer.cs: don't invoke the callback twice when the timer changes.
+ Fixes bug #66116.
+
2004-08-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Timer.cs: don't invoke the callback if the period changes before the
diff --git a/mcs/class/corlib/System.Threading/Timer.cs b/mcs/class/corlib/System.Threading/Timer.cs
index 1675a5a4be7..1bba6fa581e 100755
--- a/mcs/class/corlib/System.Threading/Timer.cs
+++ b/mcs/class/corlib/System.Threading/Timer.cs
@@ -128,6 +128,9 @@ namespace System.Threading
wait.Reset ();
signaled = wait.WaitOne (period, false);
+ if (aborted)
+ break;
+
if (!signaled) {
callback (state);
} else if (!WaitForDueTime ()) {
diff --git a/mcs/class/corlib/System/Activator.cs b/mcs/class/corlib/System/Activator.cs
index 4727251d9e6..6cb4c24b262 100644
--- a/mcs/class/corlib/System/Activator.cs
+++ b/mcs/class/corlib/System/Activator.cs
@@ -168,9 +168,10 @@ namespace System
length = args.Length;
Type [] atypes = new Type [length];
- for (int i = 0; i < length; ++i) {
- atypes [i] = args [i].GetType ();
- }
+ for (int i = 0; i < length; ++i)
+ if (args [i] != null)
+ atypes [i] = args [i].GetType ();
+
ConstructorInfo ctor = type.GetConstructor (atypes);
if (ctor == null) {
if (type.IsValueType && atypes.Length == 0)
@@ -213,9 +214,10 @@ namespace System
length = args.Length;
Type[] atypes = new Type [length];
- for (int i = 0; i < length; ++i) {
- atypes [i] = args [i].GetType ();
- }
+ for (int i = 0; i < length; ++i)
+ if (args [i] != null)
+ atypes [i] = args [i].GetType ();
+
ConstructorInfo ctor = type.GetConstructor (bindingAttr, binder, atypes, null);
if (ctor == null) {
// Not sure about this
diff --git a/mcs/class/corlib/System/ChangeLog b/mcs/class/corlib/System/ChangeLog
index df338e3db5a..f9e07458385 100644
--- a/mcs/class/corlib/System/ChangeLog
+++ b/mcs/class/corlib/System/ChangeLog
@@ -1,3 +1,13 @@
+2004-08-29 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * Activator.cs (CreateInstance): If an argument is null,
+ do not call GetType () on it. #63852
+
+2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Environment.cs: (ExpandEnvironmentVariables) don't nullify the case
+ insensitive environment variables hashtable once we create it.
+
2004-08-19 Atsushi Enomoto <atsushi@ximian.com>
* DateTime.cs : When hour format is "hh", MS.NET (maybe incorrectly)
diff --git a/mcs/class/corlib/System/Environment.cs b/mcs/class/corlib/System/Environment.cs
index bf213ff4cb7..c21030f8b35 100644
--- a/mcs/class/corlib/System/Environment.cs
+++ b/mcs/class/corlib/System/Environment.cs
@@ -290,8 +290,8 @@ namespace System
PlatformID platform = Platform;
StringBuilder result = new StringBuilder ();
result.Append (name, 0, off1);
+ Hashtable tbl = null;
do {
- Hashtable tbl = null;
string var = name.Substring (off1 + 1, off2 - off1 - 1);
string value = GetEnvironmentVariable (var);
if (value == null && (int) platform != 128) {
diff --git a/mcs/class/corlib/System/Random.cs b/mcs/class/corlib/System/Random.cs
index 3bc3e23498b..e730865d76e 100644
--- a/mcs/class/corlib/System/Random.cs
+++ b/mcs/class/corlib/System/Random.cs
@@ -74,7 +74,7 @@ namespace System
}
}
inext = 0;
- inextp = 21;
+ inextp = 31;
}
protected virtual double Sample ()
diff --git a/mcs/ilasm/AssemblyInfo.cs b/mcs/ilasm/AssemblyInfo.cs
index 5f70fdc7d78..614d59d75c6 100644
--- a/mcs/ilasm/AssemblyInfo.cs
+++ b/mcs/ilasm/AssemblyInfo.cs
@@ -1,7 +1,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("1.0.1")]
+[assembly: AssemblyVersion("1.0.2")]
[assembly: AssemblyTitle ("Mono ILasm Compiler")]
[assembly: AssemblyDescription ("Mono ILasm Compiler")]
[assembly: AssemblyCopyright ("Sergey Chaban and Jackson Harper")]
diff --git a/mcs/mcs/AssemblyInfo.cs b/mcs/mcs/AssemblyInfo.cs
index 44f053c64a1..d54cda38d27 100644
--- a/mcs/mcs/AssemblyInfo.cs
+++ b/mcs/mcs/AssemblyInfo.cs
@@ -1,7 +1,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("1.0.1")]
+[assembly: AssemblyVersion("1.0.2")]
[assembly: AssemblyTitle ("Mono C# Compiler")]
[assembly: AssemblyDescription ("Mono C# Compiler")]
[assembly: AssemblyCopyright ("2001, 2002, 2003 Ximian, Inc.")]
diff --git a/mcs/mcs/ChangeLog b/mcs/mcs/ChangeLog
index 9993e6340bb..8ad70431da9 100755
--- a/mcs/mcs/ChangeLog
+++ b/mcs/mcs/ChangeLog
@@ -1,3 +1,42 @@
+2004-09-15 Raja R Harinath <rharinath@novell.com>
+
+ * cs-parser.jay (fixed_statement): Introduce a scope for the
+ declaration in a 'fixed' statement.
+
+2004-09-10 Raja R Harinath <rharinath@novell.com>
+
+ Fix test-290.cs.
+ * cs-parser.jay (delegate_declaration): Record a delegate
+ declaration as a type declaration.
+
+2004-09-07 Miguel de Icaza <miguel@ximian.com>
+
+ * expression.cs: Return false if we fail to resolve the inner
+ expression.
+
+2004-09-06 Miguel de Icaza <miguel@ximian.com>
+
+ * expression.cs: Report errors with unsafe pointers, fixes #64896
+
+
+2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * expression.cs: Pointer arith always needs to do a conv.i
+ if the operand is a long. fix 65320
+
+2004-08-29 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * PointerArithmetic (Resolve): make sure we are not doing
+ pointer arith on void*. Also, make sure we are resolved
+ by not setting eclass until resolve.
+
+ All callers: Make sure that PointerArithmetic gets resolved.
+
+2004-08-29 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * ArrayCreation (LookupType): If the type does not resolve
+ to an array, give an error.
+
2004-08-04 Miguel de Icaza <miguel@ximian.com>
* cfold.cs: Synchronize the folding with the code in expression.cs
diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay
index deebef3ae69..f594bea5d72 100755
--- a/mcs/mcs/cs-parser.jay
+++ b/mcs/mcs/cs-parser.jay
@@ -1929,11 +1929,12 @@ delegate_declaration
SEMICOLON
{
Location l = lexer.Location;
+ string name = MakeName ((string) $5);
Delegate del = new Delegate (current_namespace, current_container, (Expression) $4,
- (int) $2, MakeName ((string) $5), (Parameters) $7,
- (Attributes) $1, l);
+ (int) $2, name, (Parameters) $7, (Attributes) $1, l);
CheckDef (current_container.AddDelegate (del), del.Name, l);
+ RootContext.Tree.RecordDecl (name, del);
}
| opt_attributes
opt_modifiers
@@ -1944,12 +1945,14 @@ delegate_declaration
SEMICOLON
{
Location l = lexer.Location;
+ string name = MakeName ((string) $5);
Delegate del = new Delegate (
current_namespace, current_container,
- TypeManager.system_void_expr, (int) $2, MakeName ((string) $5),
+ TypeManager.system_void_expr, (int) $2, name,
(Parameters) $7, (Attributes) $1, l);
CheckDef (current_container.AddDelegate (del), del.Name, l);
+ RootContext.Tree.RecordDecl (name, del);
}
;
@@ -3818,12 +3821,14 @@ fixed_statement
type fixed_pointer_declarators
CLOSE_PARENS
{
- Block assign_block = new Block (current_block, Block.Flags.Implicit);
ArrayList list = (ArrayList) $4;
Expression type = (Expression) $3;
Location l = lexer.Location;
int top = list.Count;
+ Block assign_block = new Block (current_block);
+ current_block = assign_block;
+
for (int i = 0; i < top; i++){
Pair p = (Pair) list [i];
LocalInfo v;
@@ -3835,17 +3840,25 @@ fixed_statement
p.First = v;
list [i] = p;
}
- current_block.AddStatement (assign_block);
- current_block = assign_block;
- oob_stack.Push (assign_block);
+
oob_stack.Push (l);
}
embedded_statement
{
Location l = (Location) oob_stack.Pop ();
- oob_stack.Pop ();
- $$ = new Fixed ((Expression) $3, (ArrayList) $4, (Statement) $7, l);
+ Fixed f = new Fixed ((Expression) $3, (ArrayList) $4, (Statement) $7, l);
+
+ if (RootContext.WarningLevel >= 3){
+ if ($7 == EmptyStatement.Value)
+ Report.Warning (642, lexer.Location, "Possible mistaken empty statement");
+ }
+
+ current_block.AddStatement (f);
+ while (current_block.Implicit)
+ current_block = current_block.Parent;
+ $$ = current_block;
+ current_block = current_block.Parent;
}
;
diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs
index 2249effda78..88919609049 100755
--- a/mcs/mcs/expression.cs
+++ b/mcs/mcs/expression.cs
@@ -2537,16 +2537,16 @@ namespace Mono.CSharp {
if (r == l)
return new PointerArithmetic (
false, left, right, TypeManager.int64_type,
- loc);
+ loc).Resolve (ec);
} else {
Expression t = Make32or64 (ec, right);
if (t != null)
- return new PointerArithmetic (oper == Operator.Addition, left, t, l, loc);
+ return new PointerArithmetic (oper == Operator.Addition, left, t, l, loc).Resolve (ec);
}
} else if (r.IsPointer && oper == Operator.Addition){
Expression t = Make32or64 (ec, left);
if (t != null)
- return new PointerArithmetic (true, right, t, r, loc);
+ return new PointerArithmetic (true, right, t, r, loc).Resolve (ec);
}
}
@@ -3410,7 +3410,6 @@ namespace Mono.CSharp {
public PointerArithmetic (bool is_addition, Expression l, Expression r, Type t, Location loc)
{
type = t;
- eclass = ExprClass.Variable;
this.loc = loc;
left = l;
right = r;
@@ -3419,9 +3418,13 @@ namespace Mono.CSharp {
public override Expression DoResolve (EmitContext ec)
{
- //
- // We are born fully resolved
- //
+ eclass = ExprClass.Variable;
+
+ if (left.Type == TypeManager.void_ptr_type) {
+ Error (242, "The operation in question is undefined on void pointers");
+ return null;
+ }
+
return this;
}
@@ -3466,8 +3469,11 @@ namespace Mono.CSharp {
else if (rtype == TypeManager.uint64_type)
ig.Emit (OpCodes.Conv_U8);
ig.Emit (OpCodes.Mul);
- ig.Emit (OpCodes.Conv_I);
}
+
+ if (rtype == TypeManager.int64_type || rtype == TypeManager.uint64_type)
+ ig.Emit (OpCodes.Conv_I);
+
if (is_add)
ig.Emit (OpCodes.Add);
else
@@ -5835,7 +5841,7 @@ namespace Mono.CSharp {
Expression tmp = (Expression) o;
tmp = tmp.Resolve (ec);
if (tmp == null)
- continue;
+ return false;
// Console.WriteLine ("I got: " + tmp);
// Handle initialization from vars, fields etc.
@@ -6009,10 +6015,12 @@ namespace Mono.CSharp {
if (type == null)
return false;
-
- underlying_type = type;
- if (underlying_type.IsArray)
- underlying_type = TypeManager.GetElementType (underlying_type);
+
+ if (!type.IsArray) {
+ Error (622, "Can only use array initializer expressions to assign to array types. Try using a new expression instead.");
+ return false;
+ }
+ underlying_type = TypeManager.GetElementType (type);
dimensions = type.GetArrayRank ();
return true;
@@ -6716,6 +6724,10 @@ namespace Mono.CSharp {
return null;
}
+ if (typearg.IsPointer && !ec.InUnsafe){
+ UnsafeError (loc);
+ return null;
+ }
CheckObsoleteAttribute (typearg);
type = TypeManager.type_type;
@@ -7350,7 +7362,7 @@ namespace Mono.CSharp {
return true;
}
- Expression MakePointerAccess ()
+ Expression MakePointerAccess (EmitContext ec)
{
Type t = Expr.Type;
@@ -7364,8 +7376,10 @@ namespace Mono.CSharp {
}
Expression p;
- p = new PointerArithmetic (true, Expr, ((Argument)Arguments [0]).Expr, t, loc);
- return new Indirection (p, loc);
+ p = new PointerArithmetic (true, Expr, ((Argument)Arguments [0]).Expr, t, loc).Resolve (ec);
+ if (p == null)
+ return null;
+ return new Indirection (p, loc).Resolve (ec);
}
public override Expression DoResolve (EmitContext ec)
@@ -7389,7 +7403,7 @@ namespace Mono.CSharp {
if (t.IsArray)
return (new ArrayAccess (this, loc)).Resolve (ec);
else if (t.IsPointer)
- return MakePointerAccess ();
+ return MakePointerAccess (ec);
else
return (new IndexerAccess (this, loc)).Resolve (ec);
}
@@ -7403,7 +7417,7 @@ namespace Mono.CSharp {
if (t.IsArray)
return (new ArrayAccess (this, loc)).ResolveLValue (ec, right_side);
else if (t.IsPointer)
- return MakePointerAccess ();
+ return MakePointerAccess (ec);
else
return (new IndexerAccess (this, loc)).ResolveLValue (ec, right_side);
}
diff --git a/mcs/tests/ChangeLog b/mcs/tests/ChangeLog
index 580786710ba..196e11c13db 100755
--- a/mcs/tests/ChangeLog
+++ b/mcs/tests/ChangeLog
@@ -1,3 +1,17 @@
+2004-09-15 Raja R Harinath <rharinath@novell.com>
+
+ * test-280.cs: Backport fix from HEAD.
+ * test-292.cs: New test for #64330.
+
+2004-09-10 Raja R Harinath <rharinath@novell.com>
+
+ * test-290.cs: New test.
+ * Makefile (TEST_SOURCES): Add test-290.cs.
+
+2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
+
+ * unsafe-10.cs: new test
+
2004-08-03 Ben Maurer <bmaurer@ximian.com>
* test-283.cs: for 62275.
diff --git a/mcs/tests/Makefile b/mcs/tests/Makefile
index a15a0c4b41b..79fe1a6aed4 100644
--- a/mcs/tests/Makefile
+++ b/mcs/tests/Makefile
@@ -44,7 +44,8 @@ TEST_SOURCES = \
test-251 test-252 test-253 test-254 test-255 test-256 test-257 test-258 test-259 test-260 \
test-261 test-262 test-263 test-264 test-265 test-266 test-267 test-268 test-269 test-270 \
test-271 test-272 test-273 test-274 test-275 test-276 test-277 test-280 \
- test-283 test-284 \
+ test-283 test-284 test-290 \
+ test-292 \
cls-test-0 cls-test-1 cls-test-2 cls-test-3 cls-test-5 cls-test-6 cls-test-7 cls-test-10 \
cls-test-11 cls-test-14 cls-test-15 cls-test-16
@@ -55,7 +56,7 @@ TEST2_SOURCES = \
2test-1 2test-2 2test-3 2test-4 2test-5 2test-6
UNSAFE_SOURCES = \
- unsafe-1 unsafe-2 unsafe-3 test-58 test-171 unsafe-5 unsafe-6 unsafe-7 unsafe-8 unsafe-9
+ unsafe-1 unsafe-2 unsafe-3 test-58 test-171 unsafe-5 unsafe-6 unsafe-7 unsafe-8 unsafe-9 unsafe-10
WINDOWS_SOURCES = \
test-50 test-67
diff --git a/mcs/tests/test-280.cs b/mcs/tests/test-280.cs
index 8713c078ae2..aff2fbb5994 100644
--- a/mcs/tests/test-280.cs
+++ b/mcs/tests/test-280.cs
@@ -16,8 +16,8 @@ namespace AppFramework.Util
}
return false;
}
- }
- static void Main () {}
+ static void Main () {}
+ }
}
diff --git a/mcs/tests/test-290.cs b/mcs/tests/test-290.cs
new file mode 100644
index 00000000000..905fc6a706f
--- /dev/null
+++ b/mcs/tests/test-290.cs
@@ -0,0 +1,14 @@
+// Distilled from report in http://lists.ximian.com/archives/public/mono-devel-list/2004-September/007777.html
+
+using System;
+
+class EntryPoint {
+ delegate void EventHandler (object sender);
+ static event EventHandler FooEvent;
+ static void bar_f (object sender) {}
+ static void Main () {
+ if (FooEvent != null)
+ FooEvent (null);
+ object bar = new EventHandler (bar_f);
+ }
+}
diff --git a/mcs/tests/test-292.cs b/mcs/tests/test-292.cs
new file mode 100644
index 00000000000..c67fec01e29
--- /dev/null
+++ b/mcs/tests/test-292.cs
@@ -0,0 +1,11 @@
+// Compiler options: -unsafe
+// Test for bug #64330: A 'fixed' statement should introduce a scope
+
+unsafe class X {
+ static int x = 0;
+ static void Main () {
+ fixed (void* p = &x) {}
+ fixed (void* p = &x) {}
+ }
+}
+
diff --git a/mcs/tools/mono-rpm-helpers/ChangeLog b/mcs/tools/mono-rpm-helpers/ChangeLog
index 77791244dc0..62229ef09ac 100644
--- a/mcs/tools/mono-rpm-helpers/ChangeLog
+++ b/mcs/tools/mono-rpm-helpers/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-02 Duncan Mak <duncan@ximian.com>
+
+ * mono-find-provides/mono-find-provides.cs (PrintProvides): Fix
+ the handling of 2.0 mscorlib.
+
2004-08-10 Duncan Mak <duncan@ximian.com>
* mono-find-requires/mono-find-requires.cs (PrintRequires): Since
diff --git a/mcs/tools/mono-rpm-helpers/mono-find-provides/mono-find-provides.cs b/mcs/tools/mono-rpm-helpers/mono-find-provides/mono-find-provides.cs
index 4e650425b75..64c29701d60 100644
--- a/mcs/tools/mono-rpm-helpers/mono-find-provides/mono-find-provides.cs
+++ b/mcs/tools/mono-rpm-helpers/mono-find-provides/mono-find-provides.cs
@@ -35,7 +35,7 @@ class FindProvides {
AssemblyName an = a.GetName ();
// hack to work around the issue with a 2.0 corlib
- if (s.EndsWith ("2.0/mscorlib.dll"))
+ if (s.Trim ().EndsWith ("2.0/mscorlib.dll"))
Console.WriteLine ("mono({0}) = {1}", "mscorlib", "2.0.3600.0");
else
Console.WriteLine ("mono({0}) = {1}", an.Name, an.Version);
diff --git a/mcs/tools/security/ChangeLog b/mcs/tools/security/ChangeLog
index 95500607f1b..1b42f284e25 100644
--- a/mcs/tools/security/ChangeLog
+++ b/mcs/tools/security/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-07 Sebastien Pouliot <sebastien@ximian.com>
+
+ * certmgr.cs: Merge enhancements from HEAD. Now allows users to
+ manipulate the machine's cert store (not just the user's store).
+
2004-08-02 Sebastien Pouliot <sebastien@ximian.com>
* AssemblyInfo.cs: Update version number for Mono 1.0.1.
diff --git a/mcs/tools/security/certmgr.cs b/mcs/tools/security/certmgr.cs
index af59cc720c4..53bb97d28f5 100755
--- a/mcs/tools/security/certmgr.cs
+++ b/mcs/tools/security/certmgr.cs
@@ -4,7 +4,7 @@
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
-// (C) 2004 Novell (http://www.novell.com)
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
using System;
@@ -51,6 +51,7 @@ namespace Mono.Tools {
Console.WriteLine ("\t-crl\tadd/del/put certificate revocation lists");
Console.WriteLine ("\t-ctl\tadd/del/put certificate trust lists [unsupported]");
Console.WriteLine ("other options");
+ Console.WriteLine ("\t-m\tuse the machine certificate store (default to user)");
Console.WriteLine ("\t-v\tverbose mode (display status for every steps)");
Console.WriteLine ("\t-?\th[elp]\tDisplay this help message");
}
@@ -246,7 +247,8 @@ namespace Mono.Tools {
static void Delete (ObjectType type, X509Store store, string file, bool verbose)
{
- switch (type) {
+ throw new NotImplementedException ("Delete not yet supported");
+/* switch (type) {
case ObjectType.Certificate:
break;
case ObjectType.CRL:
@@ -254,12 +256,13 @@ namespace Mono.Tools {
break;
default:
throw new NotSupportedException (type.ToString ());
- }
+ }*/
}
static void Put (ObjectType type, X509Store store, string file, bool verbose)
{
- switch (type) {
+ throw new NotImplementedException ("Put not yet supported");
+/* switch (type) {
case ObjectType.Certificate:
break;
case ObjectType.CRL:
@@ -267,7 +270,7 @@ namespace Mono.Tools {
break;
default:
throw new NotSupportedException (type.ToString ());
- }
+ }*/
}
[STAThread]
@@ -295,9 +298,12 @@ namespace Mono.Tools {
bool verbose = (GetCommand (args [n]) == "V");
if (verbose)
n++;
+ bool machine = (GetCommand (args [n]) == "M");
+ if (machine)
+ n++;
string storeName = args [n++];
- X509Store store = GetStoreFromName (storeName, false);
+ X509Store store = GetStoreFromName (storeName, machine);
if (store == null) {
Console.WriteLine ("Invalid Store: {0}", storeName);
Console.WriteLine ("Valid stores are: {0}, {1}, {2}, {3} and {4}",
@@ -312,18 +318,24 @@ namespace Mono.Tools {
string file = args [n];
// now action!
- switch (action) {
+ try {
+ switch (action) {
case Action.Add:
Add (type, store, file, verbose);
break;
case Action.Delete:
- throw new NotImplementedException ("Delete not yet supported");
- //Delete (type, store, file, verbose);
+ Delete (type, store, file, verbose);
break;
case Action.Put:
- throw new NotImplementedException ("Put not yet supported");
- //Put (type, store, file, verbose);
+ Put (type, store, file, verbose);
break;
+ default:
+ throw new NotSupportedException (action.ToString ());
+ }
+ }
+ catch (UnauthorizedAccessException) {
+ Console.WriteLine ("Access to the {0} '{1}' certificate store has been denied.",
+ (machine ? "machine" : "user"), storeName);
}
}
}
diff --git a/mono/dis/get.c b/mono/dis/get.c
index 22dea4fa32a..43845cd6c19 100644
--- a/mono/dis/get.c
+++ b/mono/dis/get.c
@@ -197,7 +197,6 @@ get_typespec (MonoImage *m, guint32 idx)
if (s)
g_string_append (res, s);
}
- g_string_append (res, "*");
break;
case MONO_TYPE_FNPTR:
diff --git a/mono/interpreter/ChangeLog b/mono/interpreter/ChangeLog
index 088f0756976..2c2d176ef2f 100644
--- a/mono/interpreter/ChangeLog
+++ b/mono/interpreter/ChangeLog
@@ -1,9 +1,3 @@
-2004-07-05 Zoltan Varga <vargaz@freemail.hu>
-
- * mintops.h: Applied patch from Marcin Krzyzanowski (krzak@pld-linux.org). Add support for unaligned access on little endian machines.
-
- * interp.c:Applied patch from Marcin Krzyzanowski (krzak@pld-linux.org). Fix crash seen on amd64.
-
2004-06-24 David Waite <mass@akuma.org>
* interp.c: change to C90-style comments from C99/C++-style
diff --git a/mono/interpreter/interp.c b/mono/interpreter/interp.c
index 3f7ad24660d..872fad14aae 100644
--- a/mono/interpreter/interp.c
+++ b/mono/interpreter/interp.c
@@ -1164,7 +1164,7 @@ handle_enum:
}
}
- if (method->klass->valuetype && obj)
+ if (method->klass->valuetype)
/* Unbox the instance, since valuetype methods expect an interior pointer. */
obj = mono_object_unbox (obj);
diff --git a/mono/interpreter/mintops.h b/mono/interpreter/mintops.h
index e787526e2fe..ab559de7ac6 100644
--- a/mono/interpreter/mintops.h
+++ b/mono/interpreter/mintops.h
@@ -1,8 +1,6 @@
#ifndef __INTERPRETER_MINTOPS_H
#define __INTERPRETER_MINTOPS_H
-#include <glib.h>
-
typedef enum
{
MintOpNoArgs,
@@ -31,19 +29,11 @@ enum {
#undef OPDEF
#if NO_UNALIGNED_ACCESS
-# if G_BYTE_ORDER == G_LITTLE_ENDIAN
-#define READ32(x) (((guint16 *)(x)) [0] | ((guint16 *)(x)) [1] << 16)
-#define READ64(x) ((guint64)((guint16 *)(x)) [0] | \
- (guint64)((guint16 *)(x)) [1] << 16 | \
- (guint64)((guint16 *)(x)) [2] << 32 | \
- (guint64)((guint16 *)(x)) [3] << 48)
-# else
#define READ32(x) (((guint16 *)(x)) [0] << 16 | ((guint16 *)(x)) [1])
#define READ64(x) ((guint64)((guint16 *)(x)) [0] << 48 | \
(guint64)((guint16 *)(x)) [1] << 32 | \
(guint64)((guint16 *)(x)) [2] << 16 | \
(guint64)((guint16 *)(x)) [3])
-# endif
#else /* unaligned access OK */
#define READ32(x) (*(guint32 *)(x))
#define READ64(x) (*(guint64 *)(x))
diff --git a/mono/io-layer/ChangeLog b/mono/io-layer/ChangeLog
index fec9ca9fbe0..5b19c8ceadf 100644
--- a/mono/io-layer/ChangeLog
+++ b/mono/io-layer/ChangeLog
@@ -1,37 +1,3 @@
-2004-07-22 Dick Porter <dick@ximian.com>
-
- * timed-thread.c:
- * threads.c: Move the destruction of the internal thread data to
- after the thread has been joined. Fixes bug 61418.
-
-2004-07-14 Dick Porter <dick@ximian.com>
-
- * wait.c (test_and_own): When not waiting for all handles to
- become signalled, only own and return the lowest. All the
- documentation suggests that the old way was correct, but
- experimentation shows it actually works like this. Patch by
- Sébastien Robitaille
- (sebastien.robitaille@croesus.com), fixes bug 61511.
-
-2004-07-08 Dick Porter <dick@ximian.com>
-
- * io.c (file_seek): If there is a high 32bit offset part, make
- sure the low part isn't sign-extended. Set error codes when
- returning failure. Fixes bug 61131.
-
-2004-07-06 Dick Porter <dick@ximian.com>
-
- * io.c (file_setfiletime): Check for underflow when converting to
- time_t values. Set error codes when returning failure. Fixes bug
- 60970.
-
-2004-07-05 Dick Porter <dick@ximian.com>
-
- * mutexes.c (mutex_ops_init): Make the named mutex mutex sharable.
-
- * daemon.c (unref_handle): Only destroy a handle if all processes
- have released it, not just the current one. Fixes bug 60887.
-
2004-06-24 Dick Porter <dick@ximian.com>
* mutexes.c: Indicate when a named mutex was reused
diff --git a/mono/io-layer/daemon.c b/mono/io-layer/daemon.c
index 62aa75ce1f3..746fba49d17 100644
--- a/mono/io-layer/daemon.c
+++ b/mono/io-layer/daemon.c
@@ -340,14 +340,16 @@ static gboolean unref_handle (ChannelData *channel_data, guint32 handle)
channel_data->open_handles[handle]);
#endif
- if (_wapi_shared_data[segment]->handles[idx].ref == 0) {
+ if(channel_data->open_handles[handle]==0) {
+ /* This client has released the handle */
+ destroy=TRUE;
+ }
+
+ if(_wapi_shared_data[segment]->handles[idx].ref==0) {
gboolean was_file;
dev_t device = 0;
ino_t inode = 0;
- /* This client has released the handle */
- destroy=TRUE;
-
if (channel_data->open_handles[handle]!=0) {
g_warning (G_GNUC_PRETTY_FUNCTION ": per-process open_handles mismatch, set to %d, should be 0",
channel_data->open_handles[handle]);
diff --git a/mono/io-layer/io.c b/mono/io-layer/io.c
index cdc616743fa..e0436186ee0 100644
--- a/mono/io-layer/io.c
+++ b/mono/io-layer/io.c
@@ -617,7 +617,6 @@ static guint32 file_seek(gpointer handle, gint32 movedistance,
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
- SetLastError (ERROR_INVALID_HANDLE);
return(INVALID_SET_FILE_POINTER);
}
@@ -628,7 +627,6 @@ static guint32 file_seek(gpointer handle, gint32 movedistance,
g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_READ or GENERIC_WRITE access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
#endif
- SetLastError (ERROR_ACCESS_DENIED);
return(INVALID_SET_FILE_POINTER);
}
@@ -648,7 +646,6 @@ static guint32 file_seek(gpointer handle, gint32 movedistance,
method);
#endif
- SetLastError (ERROR_INVALID_PARAMETER);
return(INVALID_SET_FILE_POINTER);
}
@@ -661,7 +658,7 @@ static guint32 file_seek(gpointer handle, gint32 movedistance,
movedistance);
#endif
} else {
- offset=((gint64) *highmovedistance << 32) | (unsigned long)movedistance;
+ offset=((gint64) *highmovedistance << 32) | movedistance;
#ifdef DEBUG
g_message(G_GNUC_PRETTY_FUNCTION ": setting offset to %lld 0x%llx (high %d 0x%x, low %d 0x%x)", offset, offset, *highmovedistance, *highmovedistance, movedistance, movedistance);
@@ -691,7 +688,6 @@ static guint32 file_seek(gpointer handle, gint32 movedistance,
handle, file_private_handle->fd, strerror(errno));
#endif
- _wapi_set_last_error_from_errno ();
return(INVALID_SET_FILE_POINTER);
}
@@ -990,7 +986,6 @@ static gboolean file_setfiletime(gpointer handle,
if(ok==FALSE) {
g_warning (G_GNUC_PRETTY_FUNCTION
": error looking up file handle %p", handle);
- SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -1000,7 +995,6 @@ static gboolean file_setfiletime(gpointer handle,
g_message(G_GNUC_PRETTY_FUNCTION ": handle %p fd %d doesn't have GENERIC_WRITE access: %u", handle, file_private_handle->fd, file_handle->fileaccess);
#endif
- SetLastError (ERROR_ACCESS_DENIED);
return(FALSE);
}
@@ -1011,7 +1005,6 @@ static gboolean file_setfiletime(gpointer handle,
file_private_handle->fd);
#endif
- SetLastError (ERROR_INVALID_HANDLE);
return(FALSE);
}
@@ -1026,25 +1019,12 @@ static gboolean file_setfiletime(gpointer handle,
file_private_handle->fd, strerror(errno));
#endif
- SetLastError (ERROR_INVALID_PARAMETER);
return(FALSE);
}
if(last_access!=NULL) {
access_ticks=((guint64)last_access->dwHighDateTime << 32) +
last_access->dwLowDateTime;
- /* This is (time_t)0. We can actually go to INT_MIN,
- * but this will do for now.
- */
- if (access_ticks < 116444736000000000ULL) {
-#ifdef DEBUG
- g_message (G_GNUC_PRETTY_FUNCTION
- ": attempt to set access time too early");
-#endif
- SetLastError (ERROR_INVALID_PARAMETER);
- return(FALSE);
- }
-
utbuf.actime=(access_ticks - 116444736000000000ULL) / 10000000;
} else {
utbuf.actime=statbuf.st_atime;
@@ -1053,18 +1033,6 @@ static gboolean file_setfiletime(gpointer handle,
if(last_write!=NULL) {
write_ticks=((guint64)last_write->dwHighDateTime << 32) +
last_write->dwLowDateTime;
- /* This is (time_t)0. We can actually go to INT_MIN,
- * but this will do for now.
- */
- if (write_ticks < 116444736000000000ULL) {
-#ifdef DEBUG
- g_message (G_GNUC_PRETTY_FUNCTION
- ": attempt to set write time too early");
-#endif
- SetLastError (ERROR_INVALID_PARAMETER);
- return(FALSE);
- }
-
utbuf.modtime=(write_ticks - 116444736000000000ULL) / 10000000;
} else {
utbuf.modtime=statbuf.st_mtime;
@@ -1087,7 +1055,6 @@ static gboolean file_setfiletime(gpointer handle,
#endif
g_free (name);
- SetLastError (ERROR_INVALID_PARAMETER);
return(FALSE);
}
diff --git a/mono/io-layer/mutexes.c b/mono/io-layer/mutexes.c
index ee10921578a..ee736aac2c2 100644
--- a/mono/io-layer/mutexes.c
+++ b/mono/io-layer/mutexes.c
@@ -23,8 +23,9 @@
#undef DEBUG
/* This is used to serialise mutex creation when names are given
+ * (FIXME: make it process-shared)
*/
-static mono_mutex_t named_mutex_mutex;
+static mono_mutex_t named_mutex_mutex = MONO_MUTEX_INITIALIZER;
static void mutex_close_shared (gpointer handle);
static void mutex_signal(gpointer handle);
@@ -43,23 +44,6 @@ static mono_once_t mutex_ops_once=MONO_ONCE_INIT;
static void mutex_ops_init (void)
{
- int thr_ret;
-#if defined(_POSIX_THREAD_PROCESS_SHARED) && _POSIX_THREAD_PROCESS_SHARED != -1
- pthread_mutexattr_t mutex_shared_attr;
-
- thr_ret = mono_mutexattr_init (&mutex_shared_attr);
- g_assert (thr_ret == 0);
-
- thr_ret = mono_mutexattr_setpshared (&mutex_shared_attr,
- PTHREAD_PROCESS_SHARED);
- g_assert (thr_ret == 0);
-
- thr_ret = mono_mutex_init (&named_mutex_mutex, &mutex_shared_attr);
- g_assert (thr_ret == 0);
-#else
- thr_ret = mono_mutex_init (&named_mutex_mutex, NULL);
-#endif
-
_wapi_handle_register_capabilities (WAPI_HANDLE_MUTEX,
WAPI_HANDLE_CAP_WAIT |
WAPI_HANDLE_CAP_SIGNAL |
diff --git a/mono/io-layer/threads.c b/mono/io-layer/threads.c
index 31c1176a12c..b9ddc6aa3dc 100644
--- a/mono/io-layer/threads.c
+++ b/mono/io-layer/threads.c
@@ -99,7 +99,9 @@ static void thread_close_private (gpointer handle)
thread_handle->thread->id);
#endif
- thread_handle->thread=NULL;
+ if(thread_handle->thread!=NULL) {
+ _wapi_timed_thread_destroy (thread_handle->thread);
+ }
}
static void thread_own (gpointer handle)
@@ -626,10 +628,6 @@ guint32 ResumeThread(gpointer handle)
return(0xFFFFFFFF);
}
- if (thread_private_handle->thread == NULL) {
- return(0xFFFFFFFF);
- }
-
#ifdef WITH_INCLUDED_LIBGC
if (thread_private_handle->thread->suspend_count <= 1)
_wapi_timed_thread_resume (thread_private_handle->thread);
@@ -672,10 +670,6 @@ guint32 SuspendThread(gpointer handle)
return(0xFFFFFFFF);
}
- if (thread_private_handle->thread == NULL) {
- return(0xFFFFFFFF);
- }
-
if (!thread_private_handle->thread->suspend_count) {
if (handle == current)
_wapi_timed_thread_suspend (thread_private_handle->thread);
diff --git a/mono/io-layer/timed-thread.c b/mono/io-layer/timed-thread.c
index 6599e0660f3..c0d737862a2 100644
--- a/mono/io-layer/timed-thread.c
+++ b/mono/io-layer/timed-thread.c
@@ -254,8 +254,6 @@ int _wapi_timed_thread_join(TimedThread *thread, struct timespec *timeout,
if(exitstatus!=NULL) {
*exitstatus = thread->exitstatus;
}
-
- _wapi_timed_thread_destroy (thread);
}
return(result);
}
diff --git a/mono/io-layer/wait.c b/mono/io-layer/wait.c
index a236d17ed3e..e3d07b3a255 100644
--- a/mono/io-layer/wait.c
+++ b/mono/io-layer/wait.c
@@ -354,15 +354,9 @@ static gboolean test_and_own (guint32 numobjects, gpointer *handles,
done = _wapi_handle_count_signalled_handles (numobjects, handles,
waitall, count, lowest);
if (done == TRUE) {
- if (waitall == TRUE) {
- for (i = 0; i < numobjects; i++) {
- if (_wapi_handle_issignalled (handles[i])) {
- _wapi_handle_ops_own (handles[i]);
- }
- }
- } else {
- if (_wapi_handle_issignalled (handles[*lowest])) {
- _wapi_handle_ops_own (handles[*lowest]);
+ for (i = 0; i < numobjects; i++) {
+ if (_wapi_handle_issignalled (handles[i])) {
+ _wapi_handle_ops_own (handles[i]);
}
}
}
diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog
index df859437707..03869d5b735 100644
--- a/mono/metadata/ChangeLog
+++ b/mono/metadata/ChangeLog
@@ -1,91 +1,3 @@
-
-Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * reflection.c: fix to deal with object[] arrays in custom ctors
- (bug #62550).
-
-Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * gc.c: make GC warning messages use the trace API, they are just
- noise to most of the users.
-
-Tue Aug 3 16:40:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * gc.c, object.h: mono_gc_handle_*() interface and
- AddrOfPinnedObject fixes. GC handle support even without GC.
-
-Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * object.c: always create an object if null is passed
- to Invoke() where a valuetype is expected.
-
-2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * appdomain.c: hack to build correctly the private bin path on windows.
- Fixes bug #61991.
-
-2004-07-28 Dick Porter <dick@ximian.com>
-
- * socket-io.c
- (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
- returned sockaddr size before creating the remote address object.
- Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
- 61608.
-
-2004-07-28 Dick Porter <dick@ximian.com>
-
- * locales.c (string_invariant_compare_char): Fix invariant char
- compares between upper and lower cases. Fixes bug 61458.
-
-Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * debug-mono-symfile.c: fix one more endianess issue, from a patch
- by Geoff Norton (<gnorton@customerdna.com>).
-
-Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * class.c: fix class loads for pointer types (typeof(int) !=
- typeof(int*)).
-
-2004-07-24 Martin Baulig <martin@ximian.com>
-
- * reflection.c (mono_image_get_type_info): Only write a class
- layout entry if we actually have a size or a packing size.
-
-2004-07-13 Peter Williams <peter@newton.cx>
-
- * process.c (complete_path): Make sure we don't attempt to execute
- directories.
-
-2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * debug-helpers.c: undo my previous patch and fixed the real issue in
- ../mini/exceptions-x86.c
-
-2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
- when no HOME env. variable was set and a NullRef was thrown in a .cctor
- called from other .cctors.
-
-2004-07-09 Dick Porter <dick@ximian.com>
-
- * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
- Don't do any more processing if the matched length was 0. It was
- increasing the size of the string before. Fixes bug 61167.
-
-2004-07-09 Dick Porter <dick@ximian.com>
-
- * socket-io.h:
- * socket-io.c
- (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
- Add support for SO_PEERCRED if its available.
-
-2004-07-03 Zoltan Varga <vargaz@freemail.hu>
-
- * marshal.c: Fix managed->native stringbuilder marshalling. Implement
- marshalling of stringbuilder arrays. Fixes #59900.
-
2004-06-29 Martin Baulig <martin@ximian.com>
* mono-debug.c (mono_debug_add_method): Protect the whole function
diff --git a/mono/metadata/appdomain.c b/mono/metadata/appdomain.c
index af00a3510d2..a917a9ecd19 100644
--- a/mono/metadata/appdomain.c
+++ b/mono/metadata/appdomain.c
@@ -547,17 +547,9 @@ reduce_path (const gchar *dirname)
for (tmp = list; tmp; tmp = tmp->next) {
gchar *data = (gchar *) tmp->data;
- if (data && *data) {
-#ifdef PLATFORM_WIN32
- if (result->len == 0)
- g_string_append_printf (result, "%s\\", data);
- else if (result->str [result->len - 1] == '\\')
- g_string_append_printf (result, "%s", data);
- else
-#endif
- g_string_append_printf (result, "%c%s",
- G_DIR_SEPARATOR, data);
- }
+ if (data && *data)
+ g_string_append_printf (result, "%c%s", G_DIR_SEPARATOR,
+ (char *) tmp->data);
}
res = result->str;
diff --git a/mono/metadata/class.c b/mono/metadata/class.c
index 2814e47d255..7f434b5c734 100644
--- a/mono/metadata/class.c
+++ b/mono/metadata/class.c
@@ -2124,7 +2124,7 @@ mono_class_create_from_typespec (MonoImage *image, guint32 type_spec,
class = mono_array_class_get (type->data.klass, 1);
break;
case MONO_TYPE_PTR:
- class = mono_ptr_class_get (type->data.type);
+ class = mono_class_from_mono_type (type->data.type);
break;
case MONO_TYPE_GENERICINST:
g_assert (type->data.generic_inst->klass);
diff --git a/mono/metadata/debug-mono-symfile.c b/mono/metadata/debug-mono-symfile.c
index 612eb39babf..4f39e6827f1 100644
--- a/mono/metadata/debug-mono-symfile.c
+++ b/mono/metadata/debug-mono-symfile.c
@@ -136,7 +136,7 @@ mono_debug_close_mono_symbol_file (MonoSymbolFile *symfile)
static gchar *
read_string (const char *ptr)
{
- int len = read32 (ptr);
+ int len = *((guint32 *) ptr);
ptr += sizeof(guint32);
return g_filename_from_utf8 (ptr, len, NULL, NULL, NULL);
}
diff --git a/mono/metadata/gc.c b/mono/metadata/gc.c
index 73167d0e9dc..4695c8c1a2a 100644
--- a/mono/metadata/gc.c
+++ b/mono/metadata/gc.c
@@ -16,7 +16,6 @@
#include <mono/metadata/exception.h>
#include <mono/metadata/domain-internals.h>
#include <mono/metadata/class-internals.h>
-#include <mono/utils/mono-logger.h>
#define GC_I_HIDE_POINTERS
#include <mono/os/gc_wrapper.h>
@@ -348,17 +347,13 @@ ves_icall_System_GCHandle_GetTargetHandle (MonoObject *obj, guint32 handle, gint
/* Indexes start from 1 since 0 means the handle is not allocated */
idx = ++next_handle;
if (idx >= array_size) {
+#if HAVE_BOEHM_GC
gpointer *new_array;
guint8 *new_type_array;
if (!array_size)
array_size = 16;
-#if HAVE_BOEHM_GC
new_array = GC_MALLOC (sizeof (gpointer) * (array_size * 2));
new_type_array = GC_MALLOC (sizeof (guint8) * (array_size * 2));
-#else
- new_array = g_malloc0 (sizeof (gpointer) * (array_size * 2));
- new_type_array = g_malloc0 (sizeof (guint8) * (array_size * 2));
-#endif
if (gc_handles) {
int i;
memcpy (new_array, gc_handles, sizeof (gpointer) * array_size);
@@ -375,22 +370,20 @@ ves_icall_System_GCHandle_GetTargetHandle (MonoObject *obj, guint32 handle, gint
#else
if (((gulong)new_array [i]) & 0x1) {
#endif
-#if HAVE_BOEHM_GC
if (gc_handles [i] != (gpointer)-1)
GC_unregister_disappearing_link (&(gc_handles [i]));
if (new_array [i] != (gpointer)-1)
GC_GENERAL_REGISTER_DISAPPEARING_LINK (&(new_array [i]), REVEAL_POINTER (new_array [i]));
-#endif
}
}
}
array_size *= 2;
-#ifndef HAVE_BOEHM_GC
- g_free (gc_handles);
- g_free (gc_handle_types);
-#endif
gc_handles = new_array;
gc_handle_types = new_type_array;
+#else
+ LeaveCriticalSection (&handle_section);
+ mono_raise_exception (mono_get_exception_execution_engine ("No GCHandle support built-in"));
+#endif
}
/* resuse the type from the old target */
@@ -406,6 +399,9 @@ ves_icall_System_GCHandle_GetTargetHandle (MonoObject *obj, guint32 handle, gint
#if HAVE_BOEHM_GC
if (gc_handles [idx] != (gpointer)-1)
GC_GENERAL_REGISTER_DISAPPEARING_LINK (&(gc_handles [idx]), obj);
+#else
+ LeaveCriticalSection (&handle_section);
+ mono_raise_exception (mono_get_exception_execution_engine ("No weakref support"));
#endif
break;
default:
@@ -433,6 +429,9 @@ ves_icall_System_GCHandle_FreeHandle (guint32 handle)
if (gc_handles [idx] != (gpointer)-1)
GC_unregister_disappearing_link (&(gc_handles [idx]));
}
+#else
+ LeaveCriticalSection (&handle_section);
+ mono_raise_exception (mono_get_exception_execution_engine ("No GCHandle support"));
#endif
gc_handles [idx] = (gpointer)-1;
@@ -458,50 +457,11 @@ ves_icall_System_GCHandle_GetAddrOfPinnedObject (guint32 handle)
if (obj == (MonoObject *) -1)
return NULL;
}
- if (obj) {
- MonoClass *klass = mono_object_class (obj);
- if (klass == mono_defaults.string_class) {
- return mono_string_chars ((MonoString*)obj);
- } else if (klass->rank) {
- return mono_array_addr ((MonoArray*)obj, char, 0);
- } else {
- /* the C# code will check and throw the exception */
- /* FIXME: missing !klass->blittable test, see bug #61134,
- * disabled in 1.0 untill the blittable-using code is audited.
- if ((klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK) == TYPE_ATTRIBUTE_AUTO_LAYOUT)
- return (gpointer)-1; */
- return (char*)obj + sizeof (MonoObject);
- }
- }
+ return obj;
}
return NULL;
}
-guint32
-mono_gchandle_new (MonoObject *obj, gboolean pinned)
-{
- return ves_icall_System_GCHandle_GetTargetHandle (obj, 0, pinned? HANDLE_PINNED: HANDLE_NORMAL);
-}
-
-guint32
-mono_gchandle_new_weakref (MonoObject *obj, gboolean track_resurrection)
-{
- return ves_icall_System_GCHandle_GetTargetHandle (obj, 0, track_resurrection? HANDLE_WEAK_TRACK: HANDLE_WEAK);
-}
-
-/* This will return NULL for a collected object if using a weakref handle */
-MonoObject*
-mono_gchandle_get_target (guint32 gchandle)
-{
- return ves_icall_System_GCHandle_GetTarget (gchandle);
-}
-
-void
-mono_gchandle_free (guint32 gchandle)
-{
- ves_icall_System_GCHandle_FreeHandle (gchandle);
-}
-
#if HAVE_BOEHM_GC
static HANDLE finalizer_event;
@@ -646,12 +606,6 @@ static GCThreadFunctions mono_gc_thread_vtable = {
};
#endif /* WITH_INCLUDED_LIBGC */
-static void
-mono_gc_warning (char *msg, GC_word arg)
-{
- mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_GC, msg, (unsigned long)arg);
-}
-
void mono_gc_init (void)
{
InitializeCriticalSection (&handle_section);
diff --git a/mono/metadata/locales.c b/mono/metadata/locales.c
index 1210965a70a..7c10529f3f3 100644
--- a/mono/metadata/locales.c
+++ b/mono/metadata/locales.c
@@ -25,7 +25,7 @@
#include <locale.h>
-#undef DEBUG
+//#undef DEBUG
static gint32 string_invariant_compare_char (gunichar2 c1, gunichar2 c2,
gint32 options);
@@ -1431,11 +1431,6 @@ MonoString *ves_icall_System_String_InternalReplace_Str_Comp (MonoString *this,
* does match properly...
*/
match_len = usearch_getMatchedLength (search);
-
- if(match_len == 0) {
- continue;
- }
-
match=(UChar *)g_malloc0 (sizeof(UChar) * (match_len + 1));
usearch_getMatchedText (search, match, match_len, &ec);
@@ -1472,11 +1467,6 @@ MonoString *ves_icall_System_String_InternalReplace_Str_Comp (MonoString *this,
pos!=USEARCH_DONE;
pos=usearch_next (search, &ec)) {
match_len = usearch_getMatchedLength (search);
-
- if (match_len == 0) {
- continue;
- }
-
match=(UChar *)g_malloc0 (sizeof(UChar) * (match_len + 1));
usearch_getMatchedText (search, match, match_len, &ec);
@@ -1875,6 +1865,15 @@ static gint32 string_invariant_compare_char (gunichar2 c1, gunichar2 c2,
/* No options. Kana, symbol and spacing options don't
* apply to the invariant culture.
*/
+ if (c1type == G_UNICODE_UPPERCASE_LETTER &&
+ c2type == G_UNICODE_LOWERCASE_LETTER) {
+ return(1);
+ }
+
+ if (c1type == G_UNICODE_LOWERCASE_LETTER &&
+ c2type == G_UNICODE_UPPERCASE_LETTER) {
+ return(-1);
+ }
result = (gint32) c1 - c2;
}
diff --git a/mono/metadata/marshal.c b/mono/metadata/marshal.c
index 2892d81e88b..e2f384734b9 100644
--- a/mono/metadata/marshal.c
+++ b/mono/metadata/marshal.c
@@ -45,6 +45,9 @@ struct _MonoMethodBuilder {
static void
emit_struct_conv (MonoMethodBuilder *mb, MonoClass *klass, gboolean to_object);
+static gint
+mono_marshal_runtime_glist_find_klass (gconstpointer a, gconstpointer b);
+
static MonoMethod *
mono_find_method_by_name (MonoClass *klass, const char *name, int param_count)
{
@@ -221,20 +224,17 @@ mono_string_builder_to_utf8 (MonoStringBuilder *sb)
{
GError *error = NULL;
glong *res;
- gchar *tmp;
if (!sb)
return NULL;
res = g_malloc0 (mono_stringbuilder_capacity (sb) + 1);
- tmp = g_utf16_to_utf8 (mono_string_chars (sb->str), sb->length, NULL, res, &error);
+ g_utf16_to_utf8 (mono_string_chars (sb->str), sb->length, NULL, res, &error);
if (error) {
g_error_free (error);
mono_raise_exception (mono_get_exception_execution_engine ("Failed to convert StringBuilder from utf16 to utf8"));
}
- else
- memcpy (res, tmp, sb->length + 1);
return res;
}
@@ -1270,52 +1270,6 @@ mono_marshal_get_string_encoding (MonoMethodPInvoke *piinfo, MonoMarshalSpec *sp
}
}
-static MonoMarshalNative
-mono_marshal_get_stringbuilder_to_ptr_encoding (MonoMethodPInvoke *piinfo, MonoMarshalSpec *spec)
-{
- MonoMarshalNative encoding = mono_marshal_get_string_encoding (piinfo, spec);
-
- switch (encoding) {
- case MONO_NATIVE_LPWSTR:
- return MONO_MARSHAL_CONV_SB_LPWSTR;
- break;
- case MONO_NATIVE_LPSTR:
- return MONO_MARSHAL_CONV_SB_LPSTR;
- break;
- case MONO_NATIVE_LPTSTR:
- return MONO_MARSHAL_CONV_SB_LPTSTR;
- break;
- default:
- return -1;
- }
-}
-
-static MonoMarshalNative
-mono_marshal_get_ptr_to_stringbuilder_encoding (MonoMethodPInvoke *piinfo, MonoMarshalSpec *spec, gboolean *need_free)
-{
- MonoMarshalNative encoding = mono_marshal_get_string_encoding (piinfo, spec);
-
- *need_free = TRUE;
-
- switch (encoding) {
- case MONO_NATIVE_LPWSTR:
- /*
- * mono_string_builder_to_utf16 does not allocate a
- * new buffer, so no need to free it.
- */
- *need_free = FALSE;
- return MONO_MARSHAL_CONV_LPWSTR_SB;
- case MONO_NATIVE_LPSTR:
- return MONO_MARSHAL_CONV_LPSTR_SB;
- break;
- case MONO_NATIVE_LPTSTR:
- return MONO_MARSHAL_CONV_LPTSTR_SB;
- break;
- default:
- return -1;
- }
-}
-
static inline MonoMethod*
mono_marshal_find_in_cache (GHashTable *cache, gpointer key)
{
@@ -1665,7 +1619,7 @@ mono_remoting_wrapper (MonoMethod *method, gpointer *params)
}
}
- return mono_runtime_invoke (method, method->klass->valuetype? mono_object_unbox ((MonoObject*)this): this, mparams, NULL);
+ return mono_runtime_invoke (method, method->klass->valuetype? mono_object_unbox (this): this, mparams, NULL);
}
msg = mono_method_call_message_new (method, params, NULL, NULL, NULL);
@@ -2622,14 +2576,6 @@ mono_marshal_get_managed_wrapper (MonoMethod *method, MonoObject *this, MonoMars
klass = sig->ret->data.klass;
- if (klass->delegate) {
- mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
- mono_mb_emit_byte (mb, CEE_MONO_FUNC1);
- mono_mb_emit_byte (mb, MONO_MARSHAL_CONV_DEL_FTN);
- mono_mb_emit_byte (mb, CEE_STLOC_3);
- break;
- }
-
/* FIXME: Raise a MarshalDirectiveException here */
g_assert ((klass->flags & TYPE_ATTRIBUTE_LAYOUT_MASK) != TYPE_ATTRIBUTE_AUTO_LAYOUT);
@@ -3438,22 +3384,31 @@ mono_marshal_get_native_wrapper (MonoMethod *method)
mono_mb_emit_byte (mb, MONO_MARSHAL_CONV_DEL_FTN);
mono_mb_emit_stloc (mb, tmp_locals [i]);
} else if (klass == mono_defaults.stringbuilder_class) {
- MonoMarshalNative encoding = mono_marshal_get_stringbuilder_to_ptr_encoding (piinfo, spec);
+ MonoMarshalNative encoding = mono_marshal_get_string_encoding (piinfo, spec);
g_assert (!t->byref);
mono_mb_emit_ldarg (mb, argnum);
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_FUNC1);
- if (encoding != -1)
- mono_mb_emit_byte (mb, encoding);
- else {
+ switch (encoding) {
+ case MONO_NATIVE_LPWSTR:
+ mono_mb_emit_byte (mb, MONO_MARSHAL_CONV_SB_LPWSTR);
+ break;
+ case MONO_NATIVE_LPSTR:
+ mono_mb_emit_byte (mb, MONO_MARSHAL_CONV_SB_LPSTR);
+ break;
+ case MONO_NATIVE_LPTSTR:
+ mono_mb_emit_byte (mb, MONO_MARSHAL_CONV_SB_LPTSTR);
+ break;
+ default: {
char *msg = g_strdup_printf ("stringbuilder marshalling conversion %d not implemented", encoding);
MonoException *exc = mono_get_exception_not_implemented (msg);
g_warning (msg);
g_free (msg);
mono_raise_exception (exc);
}
+ }
mono_mb_emit_stloc (mb, tmp_locals [i]);
} else {
@@ -3549,13 +3504,10 @@ mono_marshal_get_native_wrapper (MonoMethod *method)
else {
MonoClass *eklass;
guint32 label1, label2, label3;
- int index_var, dest_ptr, esize;
- MonoMarshalNative encoding = mono_marshal_get_stringbuilder_to_ptr_encoding (piinfo, spec);
+ int index_var, dest_ptr;
dest_ptr = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
- eklass = klass->element_class;
-
/* Check null */
mono_mb_emit_ldarg (mb, argnum);
mono_mb_emit_stloc (mb, tmp_locals [i]);
@@ -3564,23 +3516,9 @@ mono_marshal_get_native_wrapper (MonoMethod *method)
label1 = mb->pos;
mono_mb_emit_i4 (mb, 0);
- if (eklass == mono_defaults.stringbuilder_class) {
- if (encoding == -1) {
- char *msg = g_strdup_printf ("stringbuilder marshalling conversion %d not implemented", encoding);
- MonoException *exc = mono_get_exception_not_implemented (msg);
- g_warning (msg);
- g_free (msg);
- mono_raise_exception (exc);
- }
- }
-
- if (eklass == mono_defaults.stringbuilder_class)
- esize = sizeof (gpointer);
- else
- esize = mono_class_native_size (eklass, NULL);
-
/* allocate space for the native struct and store the address */
- mono_mb_emit_icon (mb, esize);
+ eklass = klass->element_class;
+ mono_mb_emit_icon (mb, mono_class_native_size (eklass, NULL));
mono_mb_emit_ldarg (mb, argnum);
mono_mb_emit_byte (mb, CEE_LDLEN);
mono_mb_emit_byte (mb, CEE_MUL);
@@ -3605,34 +3543,22 @@ mono_marshal_get_native_wrapper (MonoMethod *method)
/* Emit marshalling code */
- if (eklass == mono_defaults.stringbuilder_class) {
- mono_mb_emit_ldloc (mb, dest_ptr);
- mono_mb_emit_ldarg (mb, argnum);
- mono_mb_emit_ldloc (mb, index_var);
- mono_mb_emit_byte (mb, CEE_LDELEM_REF);
- mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
- mono_mb_emit_byte (mb, CEE_MONO_FUNC1);
- mono_mb_emit_byte (mb, encoding);
- mono_mb_emit_byte (mb, CEE_STIND_I);
- }
- else {
- /* set the src_ptr */
- mono_mb_emit_ldarg (mb, argnum);
- mono_mb_emit_ldloc (mb, index_var);
- mono_mb_emit_byte (mb, CEE_LDELEMA);
- mono_mb_emit_i4 (mb, mono_mb_add_data (mb, eklass));
- mono_mb_emit_byte (mb, CEE_STLOC_0);
+ /* set the src_ptr */
+ mono_mb_emit_ldarg (mb, argnum);
+ mono_mb_emit_ldloc (mb, index_var);
+ mono_mb_emit_byte (mb, CEE_LDELEMA);
+ mono_mb_emit_i4 (mb, mono_mb_add_data (mb, eklass));
+ mono_mb_emit_byte (mb, CEE_STLOC_0);
- /* set dst_ptr */
- mono_mb_emit_ldloc (mb, dest_ptr);
- mono_mb_emit_byte (mb, CEE_STLOC_1);
+ /* set dst_ptr */
+ mono_mb_emit_ldloc (mb, dest_ptr);
+ mono_mb_emit_byte (mb, CEE_STLOC_1);
- /* emit valuetype conversion code */
- emit_struct_conv (mb, eklass, FALSE);
- }
+ /* emit valuetype conversion code */
+ emit_struct_conv (mb, eklass, FALSE);
mono_mb_emit_add_to_local (mb, index_var, 1);
- mono_mb_emit_add_to_local (mb, dest_ptr, esize);
+ mono_mb_emit_add_to_local (mb, dest_ptr, mono_class_native_size (eklass, NULL));
mono_mb_emit_byte (mb, CEE_BR);
mono_mb_emit_i4 (mb, label2 - (mb->pos + 4));
@@ -4059,20 +3985,33 @@ mono_marshal_get_native_wrapper (MonoMethod *method)
case MONO_TYPE_CLASS:
case MONO_TYPE_OBJECT:
if (t->data.klass == mono_defaults.stringbuilder_class) {
- gboolean need_free;
- MonoMarshalNative encoding;
-
- encoding = mono_marshal_get_ptr_to_stringbuilder_encoding (piinfo, spec, &need_free);
+ MonoMarshalNative encoding = mono_marshal_get_string_encoding (piinfo, spec);
+ gboolean need_free = TRUE;
g_assert (!t->byref);
- g_assert (encoding != -1);
-
mono_mb_emit_ldarg (mb, argnum);
mono_mb_emit_ldloc (mb, tmp_locals [i]);
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_PROC2);
- mono_mb_emit_byte (mb, encoding);
+ switch (encoding) {
+ case MONO_NATIVE_LPWSTR:
+ mono_mb_emit_byte (mb, MONO_MARSHAL_CONV_LPWSTR_SB);
+ /*
+ * mono_string_builder_to_utf16 does not allocate a
+ * new buffer, so no need to free it.
+ */
+ need_free = FALSE;
+ break;
+ case MONO_NATIVE_LPSTR:
+ mono_mb_emit_byte (mb, MONO_MARSHAL_CONV_LPSTR_SB);
+ break;
+ case MONO_NATIVE_LPTSTR:
+ mono_mb_emit_byte (mb, MONO_MARSHAL_CONV_LPTSTR_SB);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
if (need_free) {
mono_mb_emit_ldloc (mb, tmp_locals [i]);
@@ -4187,17 +4126,13 @@ mono_marshal_get_native_wrapper (MonoMethod *method)
}
/* Character arrays are implicitly marshalled as [Out] */
- if ((klass->element_class == mono_defaults.char_class) || (klass->element_class == mono_defaults.stringbuilder_class) || (t->attrs & PARAM_ATTRIBUTE_OUT)) {
+ if ((klass->element_class == mono_defaults.char_class) || (t->attrs & PARAM_ATTRIBUTE_OUT)) {
/* FIXME: Optimize blittable case */
MonoClass *eklass;
guint32 label1, label2, label3;
- int index_var, src_ptr, esize;
+ int index_var, src_ptr;
eklass = klass->element_class;
- if (eklass == mono_defaults.stringbuilder_class)
- esize = sizeof (gpointer);
- else
- esize = mono_class_native_size (eklass, NULL);
src_ptr = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
/* Check null */
@@ -4223,53 +4158,22 @@ mono_marshal_get_native_wrapper (MonoMethod *method)
/* Emit marshalling code */
- if (eklass == mono_defaults.stringbuilder_class) {
- gboolean need_free;
- MonoMarshalNative encoding = mono_marshal_get_ptr_to_stringbuilder_encoding (piinfo, spec, &need_free);
-
- g_assert (encoding != -1);
-
- /* dest */
- mono_mb_emit_ldarg (mb, argnum);
- mono_mb_emit_ldloc (mb, index_var);
- mono_mb_emit_byte (mb, CEE_LDELEM_REF);
-
- /* src */
- mono_mb_emit_ldloc (mb, src_ptr);
- mono_mb_emit_byte (mb, CEE_LDIND_I);
-
- mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
- mono_mb_emit_byte (mb, CEE_MONO_PROC2);
-
- mono_mb_emit_byte (mb, encoding);
-
- if (need_free) {
- /* src */
- mono_mb_emit_ldloc (mb, src_ptr);
- mono_mb_emit_byte (mb, CEE_LDIND_I);
-
- mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
- mono_mb_emit_byte (mb, CEE_MONO_FREE);
- }
- }
- else {
- /* set the src_ptr */
- mono_mb_emit_ldloc (mb, src_ptr);
- mono_mb_emit_byte (mb, CEE_STLOC_0);
+ /* set the src_ptr */
+ mono_mb_emit_ldloc (mb, src_ptr);
+ mono_mb_emit_byte (mb, CEE_STLOC_0);
- /* set dst_ptr */
- mono_mb_emit_ldarg (mb, argnum);
- mono_mb_emit_ldloc (mb, index_var);
- mono_mb_emit_byte (mb, CEE_LDELEMA);
- mono_mb_emit_i4 (mb, mono_mb_add_data (mb, eklass));
- mono_mb_emit_byte (mb, CEE_STLOC_1);
+ /* set dst_ptr */
+ mono_mb_emit_ldarg (mb, argnum);
+ mono_mb_emit_ldloc (mb, index_var);
+ mono_mb_emit_byte (mb, CEE_LDELEMA);
+ mono_mb_emit_i4 (mb, mono_mb_add_data (mb, eklass));
+ mono_mb_emit_byte (mb, CEE_STLOC_1);
- /* emit valuetype conversion code */
- emit_struct_conv (mb, eklass, TRUE);
- }
+ /* emit valuetype conversion code */
+ emit_struct_conv (mb, eklass, TRUE);
mono_mb_emit_add_to_local (mb, index_var, 1);
- mono_mb_emit_add_to_local (mb, src_ptr, esize);
+ mono_mb_emit_add_to_local (mb, src_ptr, mono_class_native_size (eklass, NULL));
mono_mb_emit_byte (mb, CEE_BR);
mono_mb_emit_i4 (mb, label2 - (mb->pos + 4));
diff --git a/mono/metadata/object.c b/mono/metadata/object.c
index 65176ce2435..bdf832baa6d 100644
--- a/mono/metadata/object.c
+++ b/mono/metadata/object.c
@@ -1586,9 +1586,13 @@ mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params,
case MONO_TYPE_R4:
case MONO_TYPE_R8:
case MONO_TYPE_VALUETYPE:
- /* MS seems to create the objects if a null is passed in */
- if (! ((gpointer *)params->vector)[i])
- ((gpointer*)params->vector)[i] = mono_object_new (mono_domain_get (), mono_class_from_mono_type (sig->params [i]));
+ if (sig->params [i]->byref) {
+ /* MS seems to create the objects if a null is passed in */
+ if (! ((gpointer *)params->vector)[i])
+ ((gpointer*)params->vector)[i] = mono_object_new (mono_domain_get (), mono_class_from_mono_type (sig->params [i]));
+ }
+ else
+ g_assert (((gpointer*)params->vector) [i]);
pa [i] = (char *)(((gpointer *)params->vector)[i]) + sizeof (MonoObject);
break;
case MONO_TYPE_STRING:
diff --git a/mono/metadata/object.h b/mono/metadata/object.h
index 2413cc7a346..c1ffc3c4c2d 100644
--- a/mono/metadata/object.h
+++ b/mono/metadata/object.h
@@ -252,11 +252,5 @@ mono_property_set_value (MonoProperty *prop, void *obj, void **params, MonoObjec
MonoObject*
mono_property_get_value (MonoProperty *prop, void *obj, void **params, MonoObject **exc);
-/* GC handles support */
-guint32 mono_gchandle_new (MonoObject *obj, gboolean pinned);
-guint32 mono_gchandle_new_weakref (MonoObject *obj, gboolean track_resurrection);
-MonoObject* mono_gchandle_get_target (guint32 gchandle);
-void mono_gchandle_free (guint32 gchandle);
-
#endif
diff --git a/mono/metadata/process.c b/mono/metadata/process.c
index 90edc4023e5..5e7cce9de7b 100644
--- a/mono/metadata/process.c
+++ b/mono/metadata/process.c
@@ -738,7 +738,7 @@ complete_path (const gunichar2 *appname, gunichar2 **completed)
return FALSE;
}
- if (g_file_test (utf8app, G_FILE_TEST_IS_EXECUTABLE) && !g_file_test (utf8app, G_FILE_TEST_IS_DIR)) {
+ if (g_file_test (utf8app, G_FILE_TEST_IS_EXECUTABLE)) {
g_free (utf8app);
return FALSE;
}
diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c
index c25ea98cd0d..9640136c0eb 100644
--- a/mono/metadata/reflection.c
+++ b/mono/metadata/reflection.c
@@ -2716,8 +2716,7 @@ mono_image_get_type_info (MonoDomain *domain, MonoReflectionTypeBuilder *tb, Mon
* if we have explicitlayout or sequentiallayouts, output data in the
* ClassLayout table.
*/
- if (((tb->attrs & TYPE_ATTRIBUTE_LAYOUT_MASK) != TYPE_ATTRIBUTE_AUTO_LAYOUT) &&
- ((tb->class_size > 0) || (tb->packing_size > 0))) {
+ if (((tb->attrs & TYPE_ATTRIBUTE_LAYOUT_MASK) != TYPE_ATTRIBUTE_AUTO_LAYOUT) && (tb->class_size != -1)) {
table = &assembly->tables [MONO_TABLE_CLASSLAYOUT];
table->rows++;
alloc_table (table, table->rows);
@@ -5869,7 +5868,6 @@ handle_type:
}
break;
case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
case MONO_TYPE_STRING:
for (i = 0; i < alen; i++) {
MonoObject *item = load_cattr_value (image, &t->data.klass->byval_arg, p, &p);
diff --git a/mono/metadata/socket-io.c b/mono/metadata/socket-io.c
index 1ef49278ea9..c2b129984e7 100644
--- a/mono/metadata/socket-io.c
+++ b/mono/metadata/socket-io.c
@@ -330,11 +330,6 @@ static gint32 convert_sockopt_level_and_name(MonoSocketOptionLevel mono_level,
case SocketOptionName_Type:
*system_name = SO_TYPE;
break;
-#ifdef SO_PEERCRED
- case SocketOptionName_PeerCred:
- *system_name = SO_PEERCRED;
- break;
-#endif
case SocketOptionName_ExclusiveAddressUse:
case SocketOptionName_UseLoopback:
case SocketOptionName_MaxConnections:
@@ -1160,15 +1155,7 @@ gint32 ves_icall_System_Net_Sockets_Socket_RecvFrom_internal(SOCKET sock, MonoAr
return(0);
}
- /* If we didn't get a socket size, then we're probably a
- * connected connection-oriented socket and the stack hasn't
- * returned the remote address. All we can do is return null.
- */
- if ( sa_size != 0 )
- *sockaddr=create_object_from_sockaddr(sa, sa_size, error);
- else
- *sockaddr=NULL;
-
+ *sockaddr=create_object_from_sockaddr(sa, sa_size, error);
g_free(sa);
return(ret);
@@ -1441,10 +1428,6 @@ void ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal(SOCKET soc
int lingersize=sizeof(linger);
struct timeval tv;
int tvsize=sizeof(tv);
-#ifdef SO_PEERCRED
- struct ucred cred;
- int credsize = sizeof(cred);
-#endif
MonoDomain *domain=mono_domain_get();
MonoObject *obj;
MonoClass *obj_class;
@@ -1478,13 +1461,6 @@ void ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal(SOCKET soc
&tvsize);
break;
-#ifdef SO_PEERCRED
- case SocketOptionName_PeerCred:
- ret = _wapi_getsockopt (sock, system_level, system_name, &cred,
- &credsize);
- break;
-#endif
-
default:
ret = _wapi_getsockopt (sock, system_level, system_name, &val,
&valsize);
@@ -1524,32 +1500,6 @@ void ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal(SOCKET soc
obj = int_to_object (domain, (tv.tv_sec * 1000) + (tv.tv_usec / 1000));
break;
-#ifdef SO_PEERCRED
- case SocketOptionName_PeerCred:
- {
- /* build a Mono.Posix.PeerCred+PeerCredData if
- * possible
- */
- MonoImage *mono_posix_image = mono_image_loaded ("Mono.Posix");
- MonoPeerCredData *cred_data;
-
- if (mono_posix_image == NULL) {
- *error = WSAENOPROTOOPT;
- return;
- }
-
- obj_class = mono_class_from_name(mono_posix_image,
- "Mono.Posix",
- "PeerCred/PeerCredData");
- obj = mono_object_new(domain, obj_class);
- cred_data = (MonoPeerCredData *)obj;
- cred_data->pid = cred.pid;
- cred_data->uid = cred.uid;
- cred_data->gid = cred.gid;
- break;
- }
-#endif
-
default:
obj = int_to_object (domain, val);
}
diff --git a/mono/metadata/socket-io.h b/mono/metadata/socket-io.h
index 5c2ee72181a..3540882f105 100644
--- a/mono/metadata/socket-io.h
+++ b/mono/metadata/socket-io.h
@@ -130,12 +130,7 @@ typedef enum {
SocketOptionName_BsdUrgent=2,
SocketOptionName_Expedited=2,
SocketOptionName_NoChecksum=1,
- SocketOptionName_ChecksumCoverage=20,
-
- /* This is Mono-specific, keep it in sync with
- * Mono.Posix/PeerCred.cs
- */
- SocketOptionName_PeerCred=10001
+ SocketOptionName_ChecksumCoverage=20
} MonoSocketOptionName;
typedef struct _MonoSocketAsyncResult {
@@ -159,14 +154,6 @@ typedef struct _MonoSocketAsyncResult {
gint error;
} MonoSocketAsyncResult;
-typedef struct
-{
- MonoObject obj;
- gint pid;
- gint uid;
- gint gid;
-} MonoPeerCredData;
-
extern gpointer ves_icall_System_Net_Sockets_Socket_Socket_internal(MonoObject *this, gint32 family, gint32 type, gint32 proto, gint32 *error);
extern void ves_icall_System_Net_Sockets_Socket_Close_internal(SOCKET sock, gint32 *error);
extern gint32 ves_icall_System_Net_Sockets_SocketException_WSAGetLastError_internal(void);
diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog
index 11963453f15..b7210c3fe9c 100644
--- a/mono/mini/ChangeLog
+++ b/mono/mini/ChangeLog
@@ -1,47 +1,4 @@
-2004-08-09 Zoltan Varga <vargaz@freemail.hu>
- * inssel-x86.brg: Set dreg of LOCALLOC correctly.
-
-Tue Aug 3 11:20:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * mini-ppc.c: mul.ovf.un exception name fix.
-
-Tue Aug 3 11:19:07 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * mini-ppc.c: reg allocator fix.
-
-Tue Aug 3 11:17:07 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * mini-ppc.c: make sure temp regs are not used for global reg
- allocation.
-
-Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
- numbers in the debug info (spotted by Geoff Norton,
- <gnorton@customerdna.com>).
-
-Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * inssel-ppc.brg: arguments on the stack are always
- relative to the stack pointer (spotted by Neale Ferguson).
-
-2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * exceptions-x86.c: delay appending the method name to the trace until
- after mono_jit_info_table_find is called, as this gets the real
- MonoMethod.
-
-2004-07-08 Zoltan Varga <vargaz@freemail.hu>
-
- * mini.c (handle_stack_args): Handle some corner cases. Fixes
- 58863.
-
-2004-07-05 Zoltan Varga <vargaz@freemail.hu>
-
- * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
- optimization.
-
Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
* mini.c: reinstated mono_compile_get_interface_var()
diff --git a/mono/mini/exceptions-x86.c b/mono/mini/exceptions-x86.c
index c0961c485d2..b0783ae39b1 100644
--- a/mono/mini/exceptions-x86.c
+++ b/mono/mini/exceptions-x86.c
@@ -462,6 +462,9 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInf
if (!(*lmf)->method)
return (gpointer)-1;
+ if (trace)
+ *trace = g_strdup_printf ("in (unmanaged) %s", mono_method_full_name ((*lmf)->method, TRUE));
+
if ((ji = mono_jit_info_table_find (domain, (gpointer)(*lmf)->eip))) {
*res = *ji;
} else {
@@ -469,9 +472,6 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls, MonoJitInf
res->method = (*lmf)->method;
}
- if (trace)
- *trace = g_strdup_printf ("in (unmanaged) %s", mono_method_full_name (res->method, TRUE));
-
new_ctx->SC_ESI = (*lmf)->esi;
new_ctx->SC_EDI = (*lmf)->edi;
new_ctx->SC_EBX = (*lmf)->ebx;
diff --git a/mono/mini/inssel-ppc.brg b/mono/mini/inssel-ppc.brg
index 38eced8c0dc..a4043e1d797 100644
--- a/mono/mini/inssel-ppc.brg
+++ b/mono/mini/inssel-ppc.brg
@@ -131,7 +131,7 @@ stmt: OP_SETRET (OP_ICONST) {
stmt: OP_OUTARG (reg) {
if (tree->inst_imm) {
- MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->reg1);
+ MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->reg1);
return;
}
tree->opcode = OP_SETREG;
@@ -142,7 +142,7 @@ stmt: OP_OUTARG (reg) {
stmt: OP_OUTARG (OP_REGVAR) {
if (tree->inst_imm) {
- MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->tree->dreg);
+ MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->tree->dreg);
return;
}
tree->opcode = OP_SETREG;
@@ -153,8 +153,8 @@ stmt: OP_OUTARG (OP_REGVAR) {
stmt: OP_OUTARG (lreg) {
if (tree->inst_imm) {
- MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->reg2);
- MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, ppc_r1, tree->inst_imm + 4, state->left->reg1);
+ MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->reg2);
+ MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, s->frame_reg, tree->inst_imm + 4, state->left->reg1);
return;
}
MONO_EMIT_NEW_UNALU (s, OP_SETREG, tree->unused, state->left->reg2);
@@ -166,7 +166,7 @@ stmt: OP_OUTARG (lreg) {
stmt: OP_OUTARG (OP_ICONST) {
if (tree->inst_imm) {
- MONO_EMIT_NEW_STORE_MEMBASE_IMM (s, OP_STORE_MEMBASE_IMM, ppc_r1, tree->inst_imm, state->left->tree->inst_c0);
+ MONO_EMIT_NEW_STORE_MEMBASE_IMM (s, OP_STORE_MEMBASE_IMM, s->frame_reg, tree->inst_imm, state->left->tree->inst_c0);
return;
}
tree->opcode = OP_SETREGIMM;
@@ -205,7 +205,7 @@ stmt: OP_OUTARG (OP_ICONST) {
stmt: OP_OUTARG (CEE_LDIND_REF (OP_REGVAR)) {
if (tree->inst_imm) {
- MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->left->tree->dreg);
+ MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORE_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->left->tree->dreg);
return;
}
tree->opcode = OP_SETREG;
@@ -223,7 +223,7 @@ stmt: OP_OUTARG (CEE_LDIND_REF (OP_REGVAR)) {
stmt: OP_OUTARG (freg) {
if (tree->inst_imm) {
int opcode = (tree->unused & 0xff00) == 0x0400? OP_STORER4_MEMBASE_REG: OP_STORER8_MEMBASE_REG;
- MONO_EMIT_NEW_STORE_MEMBASE (s, opcode, ppc_r1, tree->inst_imm, state->left->reg1);
+ MONO_EMIT_NEW_STORE_MEMBASE (s, opcode, s->frame_reg, tree->inst_imm, state->left->reg1);
return;
}
tree->opcode = OP_SETFREG;
@@ -234,7 +234,7 @@ stmt: OP_OUTARG (freg) {
stmt: OP_OUTARG_R4 (freg) {
if (tree->inst_imm) {
- MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORER4_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->reg1);
+ MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORER4_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->reg1);
return;
}
tree->opcode = OP_SETFREG;
@@ -245,7 +245,7 @@ stmt: OP_OUTARG_R4 (freg) {
stmt: OP_OUTARG_R8 (freg) {
if (tree->inst_imm) {
- MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORER8_MEMBASE_REG, ppc_r1, tree->inst_imm, state->left->reg1);
+ MONO_EMIT_NEW_STORE_MEMBASE (s, OP_STORER8_MEMBASE_REG, s->frame_reg, tree->inst_imm, state->left->reg1);
return;
}
tree->opcode = OP_SETFREG;
@@ -269,7 +269,7 @@ stmt: OP_OUTARG_VT (CEE_LDOBJ (base)) {
}
//g_print ("vt size: %d at R%d + %d\n", tree->inst_imm, vt->inst_basereg, vt->inst_offset);
if (ovf_size != 0) {
- mini_emit_memcpy (s, ppc_r1, tree->inst_imm + (soffset - vt->inst_offset), vt->inst_basereg, soffset, ovf_size * sizeof (gpointer), 0);
+ mini_emit_memcpy (s, s->frame_reg, tree->inst_imm + (soffset - vt->inst_offset), vt->inst_basereg, soffset, ovf_size * sizeof (gpointer), 0);
}
}
diff --git a/mono/mini/inssel-x86.brg b/mono/mini/inssel-x86.brg
index 96419ccdff8..b1f1cf67c77 100644
--- a/mono/mini/inssel-x86.brg
+++ b/mono/mini/inssel-x86.brg
@@ -151,7 +151,6 @@ reg: OP_LOCALLOC (OP_ICONST) {
if (tree->flags & MONO_INST_INIT) {
/* microcoded in mini-x86.c */
tree->sreg1 = mono_regstate_next_int (s->rs);
- tree->dreg = state->reg1;
MONO_EMIT_NEW_ICONST (s, tree->sreg1, state->left->tree->inst_c0);
mono_bblock_add_inst (s->cbb, tree);
} else {
diff --git a/mono/mini/mini-ppc.c b/mono/mini/mini-ppc.c
index 537cefb50a7..a62d49bd453 100644
--- a/mono/mini/mini-ppc.c
+++ b/mono/mini/mini-ppc.c
@@ -209,7 +209,7 @@ mono_arch_get_global_int_regs (MonoCompile *cfg)
if (cfg->frame_reg != ppc_sp)
top = 31;
#if USE_EXTRA_TEMPS
- top = 29;
+ top -= 2;
#endif
for (i = 13; i < top; ++i)
regs = g_list_prepend (regs, GUINT_TO_POINTER (i));
@@ -1296,11 +1296,7 @@ mono_spillvar_offset_float (MonoCompile *cfg, int spillvar)
#undef DEBUG
#define DEBUG(a) if (cfg->verbose_level > 1) a
//#define DEBUG(a)
-/* use ppc_r3-ppc_10,ppc_r12 as temp registers, f1-f13 for FP registers */
-#define PPC_CALLER_REGS ((0xff<<3) | (1<<12) | USE_EXTRA_TEMPS)
-#define PPC_CALLER_FREGS (0x3ffe)
-
-#define reg_is_freeable(r) (PPC_CALLER_REGS & 1 << (r))
+#define reg_is_freeable(r) ((r) >= 3 && (r) <= 10)
#define freg_is_freeable(r) ((r) >= 1 && (r) <= 13)
typedef struct {
@@ -1635,6 +1631,10 @@ alloc_int_reg (MonoCompile *cfg, InstList *curinst, MonoInst *ins, int sym_reg,
return val;
}
+/* use ppc_r3-ppc_10,ppc_r12 as temp registers, f1-f13 for FP registers */
+#define PPC_CALLER_REGS ((0xff<<3) | (1<<12) | USE_EXTRA_TEMPS)
+#define PPC_CALLER_FREGS (0x3ffe)
+
/*
* Local register allocation.
* We first scan the list of instructions and we save the liveness info of
@@ -2275,7 +2275,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
}
// if (ins->cil_code)
// g_print ("cil code\n");
- mono_debug_record_line_number (cfg, ins, offset);
switch (ins->opcode) {
case OP_BIGMUL:
@@ -2687,7 +2686,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
*/
ppc_mulhwu (code, ppc_r0, ins->sreg1, ins->sreg2);
ppc_cmpi (code, 0, 0, ppc_r0, 0);
- EMIT_COND_SYSTEM_EXCEPTION (CEE_BNE_UN - CEE_BEQ, "OverflowException");
+ EMIT_COND_SYSTEM_EXCEPTION (CEE_BNE_UN - CEE_BEQ, ins->inst_p1);
ppc_mullw (code, ins->dreg, ins->sreg1, ins->sreg2);
break;
case OP_ICONST:
@@ -3410,8 +3409,6 @@ mono_arch_emit_prolog (MonoCompile *cfg)
ArgInfo *ainfo = cinfo->args + i;
inst = cfg->varinfo [pos];
- if (cfg->verbose_level > 2)
- g_print ("Saving argument %d (type: %d)\n", i, ainfo->regtype);
if (inst->opcode == OP_REGVAR) {
if (ainfo->regtype == RegTypeGeneral)
ppc_mr (code, inst->dreg, ainfo->reg);
diff --git a/mono/mini/mini-s390.c b/mono/mini/mini-s390.c
index 0a7db247fa2..101c5c7ec76 100644
--- a/mono/mini/mini-s390.c
+++ b/mono/mini/mini-s390.c
@@ -2944,8 +2944,6 @@ guint8 cond;
code = cfg->native_code + offset;
}
- mono_debug_record_line_number (cfg, ins, offset);
-
switch (ins->opcode) {
case OP_STOREI1_MEMBASE_IMM: {
s390_lhi (code, s390_r14, ins->inst_imm);
diff --git a/mono/mini/mini-sparc.c b/mono/mini/mini-sparc.c
index d0f58dc84cf..54fd7fda138 100644
--- a/mono/mini/mini-sparc.c
+++ b/mono/mini/mini-sparc.c
@@ -2546,7 +2546,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
code_start = (guint8*)code;
// if (ins->cil_code)
// g_print ("cil code\n");
- mono_debug_record_line_number (cfg, ins, offset);
switch (ins->opcode) {
case OP_STOREI1_MEMBASE_IMM:
diff --git a/mono/mini/mini.c b/mono/mini/mini.c
index 14a32f6dd6c..95a14efc341 100644
--- a/mono/mini/mini.c
+++ b/mono/mini/mini.c
@@ -1581,24 +1581,23 @@ mono_compile_get_interface_var (MonoCompile *cfg, int slot, MonoInst *ins)
*/
static int
handle_stack_args (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **sp, int count) {
- int i, bindex;
+ int i;
MonoBasicBlock *outb;
MonoInst *inst, **locals;
- gboolean found;
if (!count)
return 0;
if (cfg->verbose_level > 3)
g_print ("%d item(s) on exit from B%d\n", count, bb->block_num);
if (!bb->out_scount) {
+ int found = 0;
bb->out_scount = count;
//g_print ("bblock %d has out:", bb->block_num);
- found = FALSE;
for (i = 0; i < bb->out_count; ++i) {
outb = bb->out_bb [i];
//g_print (" %d", outb->block_num);
if (outb->in_stack) {
- found = TRUE;
+ found = 1;
bb->out_stack = outb->in_stack;
break;
}
@@ -1607,34 +1606,19 @@ handle_stack_args (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **sp, int coun
if (!found) {
bb->out_stack = mono_mempool_alloc (cfg->mempool, sizeof (MonoInst*) * count);
for (i = 0; i < count; ++i) {
- /*
- * try to reuse temps already allocated for this purpouse, if they occupy the same
- * stack slot and if they are of the same type.
- * This won't cause conflicts since if 'local' is used to
- * store one of the values in the in_stack of a bblock, then
- * the same variable will be used for the same outgoing stack
- * slot as well.
- * This doesn't work when inlining methods, since the bblocks
- * in the inlined methods do not inherit their in_stack from
- * the bblock they are inlined to. See bug #58863 for an
- * example.
- */
- if (cfg->inlined_method)
- bb->out_stack [i] = mono_compile_create_var (cfg, type_from_stack_type (sp [i]), OP_LOCAL);
- else
- bb->out_stack [i] = mono_compile_get_interface_var (cfg, i, sp [i]);
+/* see bug#58863, but removing this code causes regressions in gtk-sharp build
+ * (SEGV running Method::Initialize() in gapi_codegen.exe)
+ */
+#if 1
+ /* try to reuse temps already allocated for this purpouse, if they occupy the same
+ * stack slot and if they are of the same type. */
+ bb->out_stack [i] = mono_compile_get_interface_var (cfg, i, sp [i]);
+#else
+ bb->out_stack [i] = mono_compile_create_var (cfg, type_from_stack_type (sp [i]), OP_LOCAL);
+#endif
}
}
}
-
- for (i = 0; i < bb->out_count; ++i) {
- outb = bb->out_bb [i];
- if (outb->in_scount)
- continue; /* check they are the same locals */
- outb->in_scount = count;
- outb->in_stack = bb->out_stack;
- }
-
locals = bb->out_stack;
for (i = 0; i < count; ++i) {
/* add store ops at the end of the bb, before the branch */
@@ -1649,36 +1633,14 @@ handle_stack_args (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **sp, int coun
if (cfg->verbose_level > 3)
g_print ("storing %d to temp %d\n", i, locals [i]->inst_c0);
}
-
- /*
- * It is possible that the out bblocks already have in_stack assigned, and
- * the in_stacks differ. In this case, we will store to all the different
- * in_stacks.
- */
-
- found = TRUE;
- bindex = 0;
- while (found) {
- /* Find a bblock which has a different in_stack */
- found = FALSE;
- while (bindex < bb->out_count) {
- outb = bb->out_bb [bindex];
- if (outb->in_stack != locals) {
- /*
- * Instead of storing sp [i] to locals [i], we need to store
- * locals [i] to <new locals>[i], since the sp [i] tree can't
- * be shared between trees.
- */
- for (i = 0; i < count; ++i)
- mono_add_varcopy_to_end (cfg, bb, locals [i]->inst_c0, outb->in_stack [i]->inst_c0);
- locals = outb->in_stack;
- found = TRUE;
- break;
- }
- bindex ++;
- }
- }
+ for (i = 0; i < bb->out_count; ++i) {
+ outb = bb->out_bb [i];
+ if (outb->in_scount)
+ continue; /* check they are the same locals */
+ outb->in_scount = count;
+ outb->in_stack = locals;
+ }
return 0;
}
@@ -2465,7 +2427,6 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
MonoMethodHeader *cheader;
MonoBasicBlock *ebblock, *sbblock;
int i, costs, new_locals_offset;
- MonoMethod *prev_inlined_method;
if (cfg->verbose_level > 2)
g_print ("INLINE START %p %s -> %s\n", cmethod, mono_method_full_name (cfg->method, TRUE), mono_method_full_name (cmethod, TRUE));
@@ -2494,13 +2455,8 @@ inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig,
ebblock->block_num = cfg->num_bblocks++;
ebblock->real_offset = real_offset;
- prev_inlined_method = cfg->inlined_method;
- cfg->inlined_method = cmethod;
-
costs = mono_method_to_ir (cfg, cmethod, sbblock, ebblock, new_locals_offset, rvar, dont_inline, sp, real_offset, *ip == CEE_CALLVIRT);
- cfg->inlined_method = prev_inlined_method;
-
if ((costs >= 0 && costs < 60) || inline_allways) {
if (cfg->verbose_level > 2)
g_print ("INLINE END %s -> %s\n", mono_method_full_name (cfg->method, TRUE), mono_method_full_name (cmethod, TRUE));
@@ -7090,12 +7046,10 @@ optimize_branches (MonoCompile *cfg)
bbn->code->inst_target_bb->region == bb->region) {
if (cfg->verbose_level > 2)
- g_print ("in %s branch to branch triggered %d -> %d -> %d\n", cfg->method->name,
- bb->block_num, bbn->block_num, bbn->code->inst_target_bb->block_num);
-
- replace_in_block (bbn, bb, NULL);
- replace_out_block (bb, bbn, bbn->code->inst_target_bb);
- link_bblock (cfg, bb, bbn->code->inst_target_bb);
+ g_print ("in %s branch to branch triggered %d -> %d\n", cfg->method->name,
+ bb->block_num, bbn->block_num);
+
+ replace_basic_block (bb, bb->out_bb [0], bbn->code->inst_target_bb);
bb->last_ins->inst_target_bb = bbn->code->inst_target_bb;
changed = TRUE;
break;
diff --git a/mono/mini/mini.h b/mono/mini/mini.h
index e62be1b95cb..adc1e9086b5 100644
--- a/mono/mini/mini.h
+++ b/mono/mini/mini.h
@@ -492,7 +492,6 @@ typedef struct {
MonoSpillInfo *spill_info_float; /* fp register spills */
gint spill_count;
/* unsigned char *cil_code; */
- MonoMethod *inlined_method; /* the method which is currently inlined */
/* the exception object passed to catch/filter blocks */
MonoInst *exvar;
diff --git a/mono/tests/Makefile.am b/mono/tests/Makefile.am
index 2ac008e74c4..23cc36cc3cc 100644
--- a/mono/tests/Makefile.am
+++ b/mono/tests/Makefile.am
@@ -41,7 +41,6 @@ TEST_CS_SRC= \
exception16.cs \
struct.cs \
valuetype-gettype.cs \
- typeof-ptr.cs \
static-constructor.cs \
pinvoke.cs \
pinvoke1.cs \
diff --git a/mono/tests/libtest.c b/mono/tests/libtest.c
index 6a9bad00f5a..0d651b00e80 100644
--- a/mono/tests/libtest.c
+++ b/mono/tests/libtest.c
@@ -636,24 +636,10 @@ mono_test_marshal_primitive_byref_delegate (PrimitiveByrefDelegate delegate)
return 0;
}
-typedef int (*return_int_delegate) (int i);
-
-typedef return_int_delegate (*ReturnDelegateDelegate) ();
-
-int
-mono_test_marshal_return_delegate_delegate (ReturnDelegateDelegate d)
-{
- return (d ()) (55);
-}
-
-
int
mono_test_marshal_stringbuilder (char *s, int n)
{
const char m[] = "This is my message. Isn't it nice?";
-
- if (strcmp (s, "ABCD") != 0)
- return 1;
strncpy(s, m, n);
return 0;
}
@@ -701,20 +687,6 @@ mono_test_marshal_string_array (char **array)
}
int
-mono_test_marshal_stringbuilder_array (char **array)
-{
- if (strcmp (array [0], "ABC"))
- return 1;
- if (strcmp (array [1], "DEF"))
- return 2;
-
- strcpy (array [0], "DEF");
- strcpy (array [1], "ABC");
-
- return 0;
-}
-
-int
mono_test_marshal_unicode_string_array (gunichar2 **array, char **array2)
{
GError *error = NULL;
@@ -1020,18 +992,6 @@ mono_test_marshal_mixed_point (mixed_point pt)
}
int
-mono_test_marshal_mixed_point_2 (mixed_point *pt)
-{
- if (pt->x != 5 || pt->y != 6.75)
- return 1;
-
- pt->x = 10;
- pt->y = 12.35;
-
- return 0;
-}
-
-int
time_t_sizeof (void)
{
return sizeof (time_t);
diff --git a/mono/tests/pinvoke2.cs b/mono/tests/pinvoke2.cs
index 6dd5a7828a7..179f67d0f56 100755
--- a/mono/tests/pinvoke2.cs
+++ b/mono/tests/pinvoke2.cs
@@ -111,9 +111,6 @@ public class Tests {
[DllImport ("libtest", EntryPoint="mono_test_marshal_unicode_string_array", CharSet=CharSet.Unicode)]
public static extern int mono_test_marshal_unicode_string_array (string [] a1, [MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPStr)]string [] a2);
- [DllImport ("libtest", EntryPoint="mono_test_marshal_stringbuilder_array")]
- public static extern int mono_test_marshal_stringbuilder_array (StringBuilder [] a1);
-
[DllImport ("libtest", EntryPoint="mono_test_marshal_inout_array")]
public static extern int mono_test_marshal_inout_array ([In, Out] int [] a1);
@@ -416,7 +413,6 @@ public class Tests {
static int test_0_marshal_stringbuilder () {
StringBuilder sb = new StringBuilder(255);
- sb.Append ("ABCD");
mono_test_marshal_stringbuilder (sb, sb.Capacity);
String res = sb.ToString();
@@ -449,20 +445,6 @@ public class Tests {
return mono_test_marshal_unicode_string_array (new String [] { "ABC", "DEF" }, new String [] { "ABC", "DEF" });
}
- static int test_0_marshal_stringbuilder_array () {
- StringBuilder sb1 = new StringBuilder ("ABC");
- StringBuilder sb2 = new StringBuilder ("DEF");
-
- int res = mono_test_marshal_stringbuilder_array (new StringBuilder [] { sb1, sb2 });
- if (res != 0)
- return res;
- if (sb1.ToString () != "DEF")
- return 5;
- if (sb2.ToString () != "ABC")
- return 6;
- return 0;
- }
-
static int test_0_last_error () {
mono_test_last_error (5);
if (Marshal.GetLastWin32Error () == 5)
diff --git a/mono/tests/pinvoke3.cs b/mono/tests/pinvoke3.cs
index 0a0d39ee3aa..f463e14afc5 100755
--- a/mono/tests/pinvoke3.cs
+++ b/mono/tests/pinvoke3.cs
@@ -150,9 +150,6 @@ public class Tests {
[DllImport ("libtest", EntryPoint="mono_test_marshal_primitive_byref_delegate")]
public static extern int mono_test_marshal_primitive_byref_delegate (PrimitiveByrefDelegate d);
- [DllImport ("libtest", EntryPoint="mono_test_marshal_return_delegate_delegate")]
- public static extern int mono_test_marshal_return_delegate_delegate (ReturnDelegateDelegate d);
-
public delegate int TestDelegate (int a, ref SimpleStruct ss, int b);
public delegate SimpleStruct SimpleDelegate2 (SimpleStruct ss);
@@ -171,8 +168,6 @@ public class Tests {
public delegate int PrimitiveByrefDelegate (ref int i);
- public delegate return_int_delegate ReturnDelegateDelegate ();
-
public static int Main () {
return TestDriver.RunTests (typeof (Tests));
}
@@ -283,13 +278,4 @@ public class Tests {
return mono_test_marshal_primitive_byref_delegate (d);
}
-
- public static return_int_delegate return_delegate () {
- return new return_int_delegate (return_self);
- }
-
- static int test_55_marshal_return_delegate_delegate () {
- return mono_test_marshal_return_delegate_delegate (new ReturnDelegateDelegate (return_delegate));
- }
-
}
diff --git a/mono/tests/typeof-ptr.cs b/mono/tests/typeof-ptr.cs
deleted file mode 100644
index eea3d1072db..00000000000
--- a/mono/tests/typeof-ptr.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-using System.Reflection;
-
-class T {
- public static unsafe void meth (int a, int* b) {
- }
- static int Main () {
- ParameterInfo[] args = typeof (T).GetMethod ("meth").GetParameters ();
- if (args[0].ParameterType == args[1].ParameterType)
- return 1;
-
- if (typeof(int) == typeof (int*))
- return 2;
- if (args[0].ParameterType != typeof(int))
- return 3;
- if (args[1].ParameterType != typeof(int*))
- return 4;
- return 0;
- }
-}
diff --git a/web/pending-classes.in b/web/pending-classes.in
new file mode 100644
index 00000000000..1cdb5a4cb36
--- /dev/null
+++ b/web/pending-classes.in
@@ -0,0 +1,246 @@
+System.Object
+System.Exception
+System.ValueType
+System.Delegate
+System.MulticastDelegate
+System.Enum
+System.Activator
+System.ArgIterator
+System.__ComObject
+System.TypedReference
+System.Security.AllowPartiallyTrustedCallersAttribute
+System.Runtime.Serialization.Formatter
+System.Runtime.Serialization.FormatterConverter
+System.Runtime.Serialization.FormatterServices
+System.Runtime.Serialization.ObjectIDGenerator
+System.Runtime.Serialization.ObjectManager
+System.Reflection.ModuleResolveEventHandler
+System.Reflection.Pointer
+System.Globalization.CompareInfo
+System.Globalization.HebrewCalendar
+System.Globalization.HijriCalendar
+System.Globalization.JapaneseCalendar
+System.Globalization.KoreanCalendar
+System.Globalization.SortKey
+System.Globalization.StringInfo
+System.Globalization.TaiwanCalendar
+System.Globalization.TextElementEnumerator
+System.Globalization.TextInfo
+System.Globalization.ThaiBuddhistCalendar
+System.IO.IsolatedStorage.IsolatedStorageFile
+System.Reflection.Emit.MethodRental
+System.Runtime.CompilerServices.AccessedThroughPropertyAttribute
+System.Runtime.CompilerServices.CallConvCdecl
+System.Runtime.CompilerServices.CallConvStdcall
+System.Runtime.CompilerServices.CallConvThiscall
+System.Runtime.CompilerServices.CallConvFastcall
+System.Runtime.CompilerServices.CustomConstantAttribute
+System.Runtime.CompilerServices.DateTimeConstantAttribute
+System.Runtime.CompilerServices.DiscardableAttribute
+System.Runtime.CompilerServices.DecimalConstantAttribute
+System.Runtime.CompilerServices.CompilationRelaxationsAttribute
+System.Runtime.CompilerServices.CompilerGlobalScopeAttribute
+System.Runtime.CompilerServices.IDispatchConstantAttribute
+System.Runtime.CompilerServices.IsVolatile
+System.Runtime.CompilerServices.IUnknownConstantAttribute
+System.Runtime.CompilerServices.RequiredAttributeAttribute
+System.Runtime.InteropServices.ArrayWithOffset
+System.Runtime.InteropServices.DispIdAttribute
+System.Runtime.InteropServices.ClassInterfaceType
+System.Runtime.InteropServices.ClassInterfaceAttribute
+System.Runtime.InteropServices.ComVisibleAttribute
+System.Runtime.InteropServices.LCIDConversionAttribute
+System.Runtime.InteropServices.ComRegisterFunctionAttribute
+System.Runtime.InteropServices.ComUnregisterFunctionAttribute
+System.Runtime.InteropServices.ProgIdAttribute
+System.Runtime.InteropServices.ImportedFromTypeLibAttribute
+System.Runtime.InteropServices.IDispatchImplType
+System.Runtime.InteropServices.IDispatchImplAttribute
+System.Runtime.InteropServices.ComSourceInterfacesAttribute
+System.Runtime.InteropServices.ComConversionLossAttribute
+System.Runtime.InteropServices.TypeLibTypeFlags
+System.Runtime.InteropServices.TypeLibFuncFlags
+System.Runtime.InteropServices.TypeLibVarFlags
+System.Runtime.InteropServices.TypeLibTypeAttribute
+System.Runtime.InteropServices.TypeLibFuncAttribute
+System.Runtime.InteropServices.TypeLibVarAttribute
+System.Runtime.InteropServices.ComImportAttribute
+System.Runtime.InteropServices.PreserveSigAttribute
+System.Runtime.InteropServices.ComAliasNameAttribute
+System.Runtime.InteropServices.AutomationProxyAttribute
+System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute
+System.Runtime.InteropServices.CoClassAttribute
+System.Runtime.InteropServices.ComEventInterfaceAttribute
+System.Runtime.InteropServices.COMException
+System.Runtime.InteropServices.ComMemberType
+System.Runtime.InteropServices.CurrencyWrapper
+System.Runtime.InteropServices.DispatchWrapper
+System.Runtime.InteropServices.ErrorWrapper
+System.Runtime.InteropServices.ExtensibleClassFactory
+System.Runtime.InteropServices.HandleRef
+System.Runtime.InteropServices.InvalidComObjectException
+System.Runtime.InteropServices.InvalidOleVariantTypeException
+System.Runtime.InteropServices.TypeLibImporterFlags
+System.Runtime.InteropServices.ExporterEventKind
+System.Runtime.InteropServices.ITypeLibExporterNotifySink
+System.Runtime.InteropServices.ITypeLibConverter
+System.Runtime.InteropServices.MarshalDirectiveException
+System.Runtime.InteropServices.ObjectCreationDelegate
+System.Runtime.InteropServices.RuntimeEnvironment
+System.Runtime.InteropServices.RegistrationServices
+System.Runtime.InteropServices.SafeArrayRankMismatchException
+System.Runtime.InteropServices.SafeArrayTypeMismatchException
+System.Runtime.InteropServices.SEHException
+System.Runtime.InteropServices.TypeLibConverter
+System.Runtime.InteropServices.BIND_OPTS
+System.Runtime.InteropServices.UCOMIBindCtx
+System.Runtime.InteropServices.UCOMIConnectionPointContainer
+System.Runtime.InteropServices.UCOMIConnectionPoint
+System.Runtime.InteropServices.UCOMIEnumMoniker
+System.Runtime.InteropServices.CONNECTDATA
+System.Runtime.InteropServices.UCOMIEnumConnections
+System.Runtime.InteropServices.UCOMIEnumConnectionPoints
+System.Runtime.InteropServices.UCOMIEnumString
+System.Runtime.InteropServices.UCOMIEnumVARIANT
+System.Runtime.InteropServices.FILETIME
+System.Runtime.InteropServices.UCOMIMoniker
+System.Runtime.InteropServices.UCOMIPersistFile
+System.Runtime.InteropServices.UCOMIRunningObjectTable
+System.Runtime.InteropServices.STATSTG
+System.Runtime.InteropServices.UCOMIStream
+System.Runtime.InteropServices.DESCKIND
+System.Runtime.InteropServices.BINDPTR
+System.Runtime.InteropServices.UCOMITypeComp
+System.Runtime.InteropServices.TYPEKIND
+System.Runtime.InteropServices.TYPEFLAGS
+System.Runtime.InteropServices.IMPLTYPEFLAGS
+System.Runtime.InteropServices.TYPEATTR
+System.Runtime.InteropServices.FUNCDESC
+System.Runtime.InteropServices.IDLFLAG
+System.Runtime.InteropServices.IDLDESC
+System.Runtime.InteropServices.PARAMFLAG
+System.Runtime.InteropServices.PARAMDESC
+System.Runtime.InteropServices.TYPEDESC
+System.Runtime.InteropServices.ELEMDESC
+System.Runtime.InteropServices.VARDESC
+System.Runtime.InteropServices.DISPPARAMS
+System.Runtime.InteropServices.EXCEPINFO
+System.Runtime.InteropServices.FUNCKIND
+System.Runtime.InteropServices.INVOKEKIND
+System.Runtime.InteropServices.CALLCONV
+System.Runtime.InteropServices.FUNCFLAGS
+System.Runtime.InteropServices.VARFLAGS
+System.Runtime.InteropServices.UCOMITypeInfo
+System.Runtime.InteropServices.SYSKIND
+System.Runtime.InteropServices.LIBFLAGS
+System.Runtime.InteropServices.TYPELIBATTR
+System.Runtime.InteropServices.UCOMITypeLib
+System.Runtime.InteropServices.UnknownWrapper
+System.Runtime.Remoting.IObjectHandle
+System.Runtime.Remoting.IRemotingTypeInfo
+System.Runtime.Remoting.IChannelInfo
+System.Runtime.Remoting.IEnvoyInfo
+System.Runtime.Remoting.RemotingConfiguration
+System.Runtime.Remoting.TypeEntry
+System.Runtime.Remoting.ActivatedClientTypeEntry
+System.Runtime.Remoting.ActivatedServiceTypeEntry
+System.Runtime.Remoting.WellKnownClientTypeEntry
+System.Runtime.Remoting.WellKnownServiceTypeEntry
+System.Runtime.Remoting.RemotingException
+System.Runtime.Remoting.ServerException
+System.Runtime.Remoting.RemotingTimeoutException
+System.Runtime.Remoting.RemotingServices
+System.Runtime.Remoting.InternalRemotingServices
+System.Runtime.Remoting.SoapServices
+System.Runtime.Remoting.Activation.UrlAttribute
+System.Runtime.Remoting.Messaging.IMessageSink
+System.Runtime.Remoting.Messaging.AsyncResult
+System.Runtime.Remoting.Messaging.CallContext
+System.Runtime.Remoting.Messaging.ILogicalThreadAffinative
+System.Runtime.Remoting.Messaging.InternalMessageWrapper
+System.Runtime.Remoting.Messaging.IMethodCallMessage
+System.Runtime.Remoting.Messaging.MethodCallMessageWrapper
+System.Runtime.Remoting.Messaging.HeaderHandler
+System.Runtime.Remoting.Messaging.IMessageCtrl
+System.Runtime.Remoting.Messaging.IRemotingFormatter
+System.Runtime.Remoting.Messaging.ReturnMessage
+System.Runtime.Remoting.Messaging.MethodCall
+System.Runtime.Remoting.Messaging.ConstructionCall
+System.Runtime.Remoting.Messaging.MethodResponse
+System.Runtime.Remoting.Messaging.ConstructionResponse
+System.Runtime.Remoting.Messaging.MethodReturnMessageWrapper
+System.Runtime.Remoting.Messaging.OneWayAttribute
+System.Runtime.Remoting.Messaging.MessageSurrogateFilter
+System.Runtime.Remoting.Messaging.RemotingSurrogateSelector
+System.Runtime.Remoting.Contexts.CrossContextDelegate
+System.Runtime.Remoting.Contexts.ContextProperty
+System.Runtime.Remoting.Contexts.IContextPropertyActivator
+System.Runtime.Remoting.Contexts.IContributeClientContextSink
+System.Runtime.Remoting.Contexts.IContributeDynamicSink
+System.Runtime.Remoting.Contexts.IContributeEnvoySink
+System.Runtime.Remoting.Contexts.IContributeObjectSink
+System.Runtime.Remoting.Contexts.IContributeServerContextSink
+System.Runtime.Serialization.Formatters.InternalRM
+System.Runtime.Serialization.Formatters.InternalST
+System.Runtime.Serialization.Formatters.SoapMessage
+System.Runtime.Serialization.Formatters.SoapFault
+System.Runtime.Serialization.Formatters.ServerFault
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+System.Security.Cryptography.CryptoConfig
+System.Security.Cryptography.KeyedHashAlgorithm
+System.Security.Cryptography.HMACSHA1
+System.Security.Cryptography.MACTripleDES
+System.Security.Cryptography.MaskGenerationMethod
+System.Security.Cryptography.PasswordDeriveBytes
+System.Security.Cryptography.PKCS1MaskGenerationMethod
+System.Security.Cryptography.RC2
+System.Security.Cryptography.RC2CryptoServiceProvider
+System.Security.Cryptography.RSACryptoServiceProvider
+System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter
+System.Security.Cryptography.RSAOAEPKeyExchangeFormatter
+System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter
+System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
+System.Security.Cryptography.RSAPKCS1SignatureDeformatter
+System.Security.Cryptography.RSAPKCS1SignatureFormatter
+System.Security.Cryptography.SHA1Managed
+System.Security.Cryptography.TripleDES
+System.Security.Cryptography.TripleDESCryptoServiceProvider
+System.Security.Permissions.EnvironmentPermission
+System.Security.Permissions.FileDialogPermission
+System.Security.Permissions.IsolatedStorageFilePermission
+System.Security.Permissions.PrincipalPermissionAttribute
+System.Security.Permissions.SecurityPermissionAttribute
+System.Security.Permissions.PublisherIdentityPermissionAttribute
+System.Security.Permissions.PublisherIdentityPermission
+System.Security.Permissions.ReflectionPermission
+System.Security.Permissions.RegistryPermission
+System.Security.Permissions.PrincipalPermission
+System.Security.Permissions.SiteIdentityPermission
+System.Security.Permissions.StrongNameIdentityPermission
+System.Security.Permissions.StrongNamePublicKeyBlob
+System.Security.Permissions.UIPermission
+System.Security.Permissions.UrlIdentityPermission
+System.Security.Permissions.ZoneIdentityPermission
+System.Security.Policy.ApplicationDirectory
+System.Security.Policy.ApplicationDirectoryMembershipCondition
+System.Security.Policy.FirstMatchCodeGroup
+System.Security.Policy.Hash
+System.Security.Policy.HashMembershipCondition
+System.Security.Policy.NetCodeGroup
+System.Security.Policy.PermissionRequestEvidence
+System.Security.Policy.Publisher
+System.Security.Policy.PublisherMembershipCondition
+System.Security.Policy.Site
+System.Security.Policy.SiteMembershipCondition
+System.Security.Policy.StrongName
+System.Security.Policy.StrongNameMembershipCondition
+System.Security.Policy.UnionCodeGroup
+System.Security.Policy.Url
+System.Security.Policy.UrlMembershipCondition
+System.Security.Policy.Zone
+System.Security.Policy.ZoneMembershipCondition
+System.Security.Principal.WindowsIdentity
+System.Security.Principal.WindowsImpersonationContext
+System.Security.Principal.WindowsPrincipal
+System.Threading.CompressedStack
+
diff --git a/web/web/masterinfos/.cvsignore b/web/web/masterinfos/.cvsignore
new file mode 100644
index 00000000000..6722cd96e78
--- /dev/null
+++ b/web/web/masterinfos/.cvsignore
@@ -0,0 +1 @@
+*.xml
diff --git a/web/web/masterinfos/Makefile b/web/web/masterinfos/Makefile
new file mode 100644
index 00000000000..73f0b96341b
--- /dev/null
+++ b/web/web/masterinfos/Makefile
@@ -0,0 +1,96 @@
+# Note that you will need Microsoft.NET to generate those masterinfos
+
+# Customize to indicate your own installation dir.
+DLL_PATH=c:/WINDOWS/Microsoft.NET/Framework/v1.1.4322
+# DLL_PATH=c:/WINDOWS/Microsoft.NET/Framework/v1.2.30703
+
+all: \
+ mscorlib.xml \
+ System.xml \
+ System.Xml.xml \
+ System.Configuration.Install.xml \
+ System.Data.xml \
+ System.Data.OracleClient.xml \
+ System.Design.xml \
+ System.Management.xml \
+ System.Messaging.xml \
+ System.Web.xml \
+ System.Web.Services.xml \
+ System.Runtime.Serialization.Formatters.Soap.xml \
+ System.Drawing.xml \
+ System.Drawing.Design.xml \
+ System.Security.xml \
+ System.DirectoryServices.xml \
+ System.EnterpriseServices.xml \
+ System.Runtime.Remoting.xml \
+ System.Windows.Forms.xml \
+ Microsoft.VisualBasic.xml \
+ Cscompmgd.xml
+
+mscorlib.xml :
+ mono-api-info $(DLL_PATH)/mscorlib.dll > mscorlib.xml
+
+System.xml :
+ mono-api-info $(DLL_PATH)/System.dll > System.xml
+
+System.Xml.xml :
+ mono-api-info $(DLL_PATH)/System.Xml.dll > System.Xml.xml
+
+System.Configuration.Install.xml :
+ mono-api-info $(DLL_PATH)/System.Configuration.Install.dll > System.Configuration.Install.xml
+
+System.Data.xml :
+ mono-api-info $(DLL_PATH)/System.Data.dll > System.Data.xml
+
+System.Data.OracleClient.xml :
+ mono-api-info $(DLL_PATH)/System.Data.OracleClient.dll > System.Data.OracleClient.xml
+
+System.Design.xml :
+ mono-api-info $(DLL_PATH)/System.Design.dll > System.Design.xml
+
+System.Management.xml :
+ mono-api-info $(DLL_PATH)/System.Management.dll > System.Management.xml
+
+System.Messaging.xml :
+ mono-api-info $(DLL_PATH)/System.Messaging.dll > System.Messaging.xml
+
+System.Web.xml :
+ mono-api-info $(DLL_PATH)/System.Web.dll > System.Web.xml
+
+System.Web.Services.xml :
+ mono-api-info $(DLL_PATH)/System.Web.Services.dll > System.Web.Services.xml
+
+System.Runtime.Remoting.xml :
+ mono-api-info $(DLL_PATH)/System.Runtime.Remoting.dll > System.Runtime.Remoting.xml
+
+System.Runtime.Serialization.Formatters.Soap.xml :
+ mono-api-info $(DLL_PATH)/System.Runtime.Serialization.Formatters.Soap.dll > System.Runtime.Serialization.Formatters.Soap.xml
+
+System.Drawing.xml :
+ mono-api-info $(DLL_PATH)/System.Drawing.dll > System.Drawing.xml
+
+System.Drawing.Design.xml :
+ mono-api-info $(DLL_PATH)/System.Drawing.Design.dll > System.Drawing.Design.xml
+
+System.Security.xml :
+ mono-api-info $(DLL_PATH)/System.Security.dll > System.Security.xml
+
+System.DirectoryServices.xml :
+ mono-api-info $(DLL_PATH)/System.DirectoryServices.dll > System.DirectoryServices.xml
+
+System.EnterpriseServices.xml :
+ mono-api-info $(DLL_PATH)/System.EnterpriseServices.dll > System.EnterpriseServices.xml
+
+System.Windows.Forms.xml :
+ mono-api-info $(DLL_PATH)/System.Windows.Forms.dll > System.Windows.Forms.xml
+
+Cscompmgd.xml :
+ mono-api-info $(DLL_PATH)/Cscompmgd.dll > Cscompmgd.xml
+
+Microsoft.VisualBasic.xml :
+ mono-api-info $(DLL_PATH)/Microsoft.VisualBasic.dll > Microsoft.VisualBasic.xml
+
+clean:
+ rm mscorlib.xml System.xml System.Xml.xml System.Configuration.Install.xml System.Data.xml System.Data.OracleClient.xml System.Design.xml System.Drawing.Design.xml System.Management.xml System.Messaging.xml System.Web.xml System.Web.Services.xml System.Runtime.Serialization.Formatters.Soap.xml System.Drawing.xml System.Security.xml System.DirectoryServices.xml System.EnterpriseServices.xml System.Runtime.Remoting.xml System.Windows.Forms.xml Cscompmgd.xml Microsoft.VisualBasic.xml
+
+