diff options
Diffstat (limited to 'mcs/class')
216 files changed, 1058 insertions, 4632 deletions
diff --git a/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/ChangeLog b/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/ChangeLog index 594c2b007f8..e0aaa445669 100644 --- a/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/ChangeLog +++ b/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/ChangeLog @@ -1,8 +1,3 @@ -2004-07-22 Jambunathan K <kjambunathan@novell.com> - - * Constants.cs: Fixed definitions of vbCr, vbLf, vbCrLf and - vbNewLine - 2004-06-24 Jambunathan K <kjambunathan@novell.com> * RandomVBFile.cs: Fixed FileGet() for Date and Decimal types * FileSystem.cs: Fixed ChDir, FileCopy diff --git a/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Constants.cs b/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Constants.cs index 16fc0d5da8f..310051ccf03 100644 --- a/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Constants.cs +++ b/mcs/class/Microsoft.VisualBasic/Microsoft.VisualBasic/Constants.cs @@ -1,11 +1,11 @@ -// -// Constants.cs -// -// Author: -// Chris J Breisch (cjbreisch@altavista.net) -// -// (C) 2002 Chris J Breisch -// +//
+// Constants.cs
+//
+// Author:
+// Chris J Breisch (cjbreisch@altavista.net)
+//
+// (C) 2002 Chris J Breisch
+//
// // Copyright (c) 2002-2003 Mainsoft Corporation. @@ -30,131 +30,131 @@ // 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; - -namespace Microsoft.VisualBasic { - [Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute] - sealed public class Constants { - // Declarations - public const System.Int32 vbObjectError = (System.Int32)(-2147221504); - public const System.String vbCrLf = "\r\n"; - public const System.String vbNewLine = "\r\n"; - public const System.String vbCr = "\r"; - public const System.String vbLf = "\n"; - public const System.String vbBack = "\b"; - public const System.String vbFormFeed = "\f"; - public const System.String vbTab = "\t"; - public const System.String vbVerticalTab = "\v"; - public const System.String vbNullChar = "\0"; - public const System.String vbNullString = ""; - - public const AppWinStyle vbHide = AppWinStyle.Hide; - public const AppWinStyle vbNormalFocus = AppWinStyle.NormalFocus; - public const AppWinStyle vbMinimizedFocus = AppWinStyle.MinimizedFocus; - public const AppWinStyle vbMaximizedFocus = AppWinStyle.MaximizedFocus; - public const AppWinStyle vbNormalNoFocus = AppWinStyle.NormalNoFocus; - public const AppWinStyle vbMinimizedNoFocus = AppWinStyle.MinimizedNoFocus; - - public const CallType vbMethod = CallType.Method; - public const CallType vbGet = CallType.Get; - public const CallType vbLet = CallType.Let; - public const CallType vbSet = CallType.Set; - - public const CompareMethod vbBinaryCompare = CompareMethod.Binary; - public const CompareMethod vbTextCompare = CompareMethod.Text; - - public const DateFormat vbGeneralDate = DateFormat.GeneralDate; - public const DateFormat vbLongDate = DateFormat.LongDate; - public const DateFormat vbShortDate = DateFormat.ShortDate; - public const DateFormat vbLongTime = DateFormat.LongTime; - public const DateFormat vbShortTime = DateFormat.ShortTime; - - public const FirstDayOfWeek vbUseSystemDayOfWeek = FirstDayOfWeek.System; - public const FirstDayOfWeek vbSunday = FirstDayOfWeek.Sunday; - public const FirstDayOfWeek vbMonday = FirstDayOfWeek.Monday; - public const FirstDayOfWeek vbTuesday = FirstDayOfWeek.Tuesday; - public const FirstDayOfWeek vbWednesday = FirstDayOfWeek.Wednesday; - public const FirstDayOfWeek vbThursday = FirstDayOfWeek.Thursday; - public const FirstDayOfWeek vbFriday = FirstDayOfWeek.Friday; - public const FirstDayOfWeek vbSaturday = FirstDayOfWeek.Saturday; - - public const FileAttribute vbNormal = FileAttribute.Normal; - public const FileAttribute vbReadOnly = FileAttribute.ReadOnly; - public const FileAttribute vbHidden = FileAttribute.Hidden; - public const FileAttribute vbSystem = FileAttribute.System; - public const FileAttribute vbVolume = FileAttribute.Volume; - public const FileAttribute vbDirectory = FileAttribute.Directory; - public const FileAttribute vbArchive = FileAttribute.Archive; - - public const FirstWeekOfYear vbUseSystem = FirstWeekOfYear.System; - public const FirstWeekOfYear vbFirstJan1 = FirstWeekOfYear.Jan1; - public const FirstWeekOfYear vbFirstFourDays = FirstWeekOfYear.FirstFourDays; - public const FirstWeekOfYear vbFirstFullWeek = FirstWeekOfYear.FirstFullWeek; - - public const VbStrConv vbUpperCase = VbStrConv.UpperCase; - public const VbStrConv vbLowerCase = VbStrConv.LowerCase; - public const VbStrConv vbProperCase = VbStrConv.ProperCase; - public const VbStrConv vbWide = VbStrConv.Wide; - public const VbStrConv vbNarrow = VbStrConv.Narrow; - public const VbStrConv vbKatakana = VbStrConv.Katakana; - public const VbStrConv vbHiragana = VbStrConv.Hiragana; - public const VbStrConv vbSimplifiedChinese = VbStrConv.SimplifiedChinese; - public const VbStrConv vbTraditionalChinese = VbStrConv.TraditionalChinese; - public const VbStrConv vbLinguisticCasing = VbStrConv.LinguisticCasing; - - public const TriState vbUseDefault = TriState.UseDefault; - public const TriState vbTrue = TriState.True; - public const TriState vbFalse = TriState.False; - - public const VariantType vbEmpty = VariantType.Empty; - public const VariantType vbNull = VariantType.Null; - public const VariantType vbInteger = VariantType.Integer; - public const VariantType vbLong = VariantType.Long; - public const VariantType vbSingle = VariantType.Single; - public const VariantType vbDouble = VariantType.Double; - public const VariantType vbCurrency = VariantType.Currency; - public const VariantType vbDate = VariantType.Date; - public const VariantType vbString = VariantType.String; - public const VariantType vbObject = VariantType.Object; - public const VariantType vbBoolean = VariantType.Boolean; - public const VariantType vbVariant = VariantType.Variant; - public const VariantType vbDecimal = VariantType.Decimal; - public const VariantType vbByte = VariantType.Byte; - public const VariantType vbUserDefinedType = VariantType.UserDefinedType; - public const VariantType vbArray = VariantType.Array; - - public const MsgBoxResult vbOK = MsgBoxResult.OK; - public const MsgBoxResult vbCancel = MsgBoxResult.Cancel; - public const MsgBoxResult vbAbort = MsgBoxResult.Abort; - public const MsgBoxResult vbRetry = MsgBoxResult.Retry; - public const MsgBoxResult vbIgnore = MsgBoxResult.Ignore; - public const MsgBoxResult vbYes = MsgBoxResult.Yes; - public const MsgBoxResult vbNo = MsgBoxResult.No; - - public const MsgBoxStyle vbOKOnly = MsgBoxStyle.OKOnly; - public const MsgBoxStyle vbOKCancel = MsgBoxStyle.OKCancel; - public const MsgBoxStyle vbAbortRetryIgnore = MsgBoxStyle.AbortRetryIgnore; - public const MsgBoxStyle vbYesNoCancel = MsgBoxStyle.YesNoCancel; - public const MsgBoxStyle vbYesNo = MsgBoxStyle.YesNo; - public const MsgBoxStyle vbRetryCancel = MsgBoxStyle.RetryCancel; - public const MsgBoxStyle vbCritical = MsgBoxStyle.Critical; - public const MsgBoxStyle vbQuestion = MsgBoxStyle.Question; - public const MsgBoxStyle vbExclamation = MsgBoxStyle.Exclamation; - public const MsgBoxStyle vbInformation = MsgBoxStyle.Information; - public const MsgBoxStyle vbDefaultButton1 = MsgBoxStyle.DefaultButton1; - public const MsgBoxStyle vbDefaultButton2 = MsgBoxStyle.DefaultButton2; - public const MsgBoxStyle vbDefaultButton3 = MsgBoxStyle.DefaultButton3; - public const MsgBoxStyle vbApplicationModal = MsgBoxStyle.ApplicationModal; - public const MsgBoxStyle vbSystemModal = MsgBoxStyle.SystemModal; - public const MsgBoxStyle vbMsgBoxHelp = MsgBoxStyle.MsgBoxHelp; - public const MsgBoxStyle vbMsgBoxRight = MsgBoxStyle.MsgBoxRight; - public const MsgBoxStyle vbMsgBoxRtlReading = MsgBoxStyle.MsgBoxRtlReading; - public const MsgBoxStyle vbMsgBoxSetForeground = MsgBoxStyle.MsgBoxSetForeground; - - // Constructors - // Properties - // Methods - // Events - }; -} +
+using System;
+
+namespace Microsoft.VisualBasic {
+ [Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
+ sealed public class Constants {
+ // Declarations
+ public const System.Int32 vbObjectError = (System.Int32)(-2147221504);
+ public const System.String vbCrLf = "\n\r";
+ public const System.String vbNewLine = "\n\r";
+ public const System.String vbCr = "\n";
+ public const System.String vbLf = "\r";
+ public const System.String vbBack = "\b";
+ public const System.String vbFormFeed = "\f";
+ public const System.String vbTab = "\t";
+ public const System.String vbVerticalTab = "\v";
+ public const System.String vbNullChar = "\0";
+ public const System.String vbNullString = "";
+
+ public const AppWinStyle vbHide = AppWinStyle.Hide;
+ public const AppWinStyle vbNormalFocus = AppWinStyle.NormalFocus;
+ public const AppWinStyle vbMinimizedFocus = AppWinStyle.MinimizedFocus;
+ public const AppWinStyle vbMaximizedFocus = AppWinStyle.MaximizedFocus;
+ public const AppWinStyle vbNormalNoFocus = AppWinStyle.NormalNoFocus;
+ public const AppWinStyle vbMinimizedNoFocus = AppWinStyle.MinimizedNoFocus;
+
+ public const CallType vbMethod = CallType.Method;
+ public const CallType vbGet = CallType.Get;
+ public const CallType vbLet = CallType.Let;
+ public const CallType vbSet = CallType.Set;
+
+ public const CompareMethod vbBinaryCompare = CompareMethod.Binary;
+ public const CompareMethod vbTextCompare = CompareMethod.Text;
+
+ public const DateFormat vbGeneralDate = DateFormat.GeneralDate;
+ public const DateFormat vbLongDate = DateFormat.LongDate;
+ public const DateFormat vbShortDate = DateFormat.ShortDate;
+ public const DateFormat vbLongTime = DateFormat.LongTime;
+ public const DateFormat vbShortTime = DateFormat.ShortTime;
+
+ public const FirstDayOfWeek vbUseSystemDayOfWeek = FirstDayOfWeek.System;
+ public const FirstDayOfWeek vbSunday = FirstDayOfWeek.Sunday;
+ public const FirstDayOfWeek vbMonday = FirstDayOfWeek.Monday;
+ public const FirstDayOfWeek vbTuesday = FirstDayOfWeek.Tuesday;
+ public const FirstDayOfWeek vbWednesday = FirstDayOfWeek.Wednesday;
+ public const FirstDayOfWeek vbThursday = FirstDayOfWeek.Thursday;
+ public const FirstDayOfWeek vbFriday = FirstDayOfWeek.Friday;
+ public const FirstDayOfWeek vbSaturday = FirstDayOfWeek.Saturday;
+
+ public const FileAttribute vbNormal = FileAttribute.Normal;
+ public const FileAttribute vbReadOnly = FileAttribute.ReadOnly;
+ public const FileAttribute vbHidden = FileAttribute.Hidden;
+ public const FileAttribute vbSystem = FileAttribute.System;
+ public const FileAttribute vbVolume = FileAttribute.Volume;
+ public const FileAttribute vbDirectory = FileAttribute.Directory;
+ public const FileAttribute vbArchive = FileAttribute.Archive;
+
+ public const FirstWeekOfYear vbUseSystem = FirstWeekOfYear.System;
+ public const FirstWeekOfYear vbFirstJan1 = FirstWeekOfYear.Jan1;
+ public const FirstWeekOfYear vbFirstFourDays = FirstWeekOfYear.FirstFourDays;
+ public const FirstWeekOfYear vbFirstFullWeek = FirstWeekOfYear.FirstFullWeek;
+
+ public const VbStrConv vbUpperCase = VbStrConv.UpperCase;
+ public const VbStrConv vbLowerCase = VbStrConv.LowerCase;
+ public const VbStrConv vbProperCase = VbStrConv.ProperCase;
+ public const VbStrConv vbWide = VbStrConv.Wide;
+ public const VbStrConv vbNarrow = VbStrConv.Narrow;
+ public const VbStrConv vbKatakana = VbStrConv.Katakana;
+ public const VbStrConv vbHiragana = VbStrConv.Hiragana;
+ public const VbStrConv vbSimplifiedChinese = VbStrConv.SimplifiedChinese;
+ public const VbStrConv vbTraditionalChinese = VbStrConv.TraditionalChinese;
+ public const VbStrConv vbLinguisticCasing = VbStrConv.LinguisticCasing;
+
+ public const TriState vbUseDefault = TriState.UseDefault;
+ public const TriState vbTrue = TriState.True;
+ public const TriState vbFalse = TriState.False;
+
+ public const VariantType vbEmpty = VariantType.Empty;
+ public const VariantType vbNull = VariantType.Null;
+ public const VariantType vbInteger = VariantType.Integer;
+ public const VariantType vbLong = VariantType.Long;
+ public const VariantType vbSingle = VariantType.Single;
+ public const VariantType vbDouble = VariantType.Double;
+ public const VariantType vbCurrency = VariantType.Currency;
+ public const VariantType vbDate = VariantType.Date;
+ public const VariantType vbString = VariantType.String;
+ public const VariantType vbObject = VariantType.Object;
+ public const VariantType vbBoolean = VariantType.Boolean;
+ public const VariantType vbVariant = VariantType.Variant;
+ public const VariantType vbDecimal = VariantType.Decimal;
+ public const VariantType vbByte = VariantType.Byte;
+ public const VariantType vbUserDefinedType = VariantType.UserDefinedType;
+ public const VariantType vbArray = VariantType.Array;
+
+ public const MsgBoxResult vbOK = MsgBoxResult.OK;
+ public const MsgBoxResult vbCancel = MsgBoxResult.Cancel;
+ public const MsgBoxResult vbAbort = MsgBoxResult.Abort;
+ public const MsgBoxResult vbRetry = MsgBoxResult.Retry;
+ public const MsgBoxResult vbIgnore = MsgBoxResult.Ignore;
+ public const MsgBoxResult vbYes = MsgBoxResult.Yes;
+ public const MsgBoxResult vbNo = MsgBoxResult.No;
+
+ public const MsgBoxStyle vbOKOnly = MsgBoxStyle.OKOnly;
+ public const MsgBoxStyle vbOKCancel = MsgBoxStyle.OKCancel;
+ public const MsgBoxStyle vbAbortRetryIgnore = MsgBoxStyle.AbortRetryIgnore;
+ public const MsgBoxStyle vbYesNoCancel = MsgBoxStyle.YesNoCancel;
+ public const MsgBoxStyle vbYesNo = MsgBoxStyle.YesNo;
+ public const MsgBoxStyle vbRetryCancel = MsgBoxStyle.RetryCancel;
+ public const MsgBoxStyle vbCritical = MsgBoxStyle.Critical;
+ public const MsgBoxStyle vbQuestion = MsgBoxStyle.Question;
+ public const MsgBoxStyle vbExclamation = MsgBoxStyle.Exclamation;
+ public const MsgBoxStyle vbInformation = MsgBoxStyle.Information;
+ public const MsgBoxStyle vbDefaultButton1 = MsgBoxStyle.DefaultButton1;
+ public const MsgBoxStyle vbDefaultButton2 = MsgBoxStyle.DefaultButton2;
+ public const MsgBoxStyle vbDefaultButton3 = MsgBoxStyle.DefaultButton3;
+ public const MsgBoxStyle vbApplicationModal = MsgBoxStyle.ApplicationModal;
+ public const MsgBoxStyle vbSystemModal = MsgBoxStyle.SystemModal;
+ public const MsgBoxStyle vbMsgBoxHelp = MsgBoxStyle.MsgBoxHelp;
+ public const MsgBoxStyle vbMsgBoxRight = MsgBoxStyle.MsgBoxRight;
+ public const MsgBoxStyle vbMsgBoxRtlReading = MsgBoxStyle.MsgBoxRtlReading;
+ public const MsgBoxStyle vbMsgBoxSetForeground = MsgBoxStyle.MsgBoxSetForeground;
+
+ // Constructors
+ // Properties
+ // Methods
+ // Events
+ };
+}
diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog index 8b10478d15b..42df9e1632a 100644 --- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog +++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/ChangeLog @@ -1,5 +1,6 @@ -2004-08-09 Sureshkumar T <tsureshkumar@novell.com> - * Tds70.cs - Prepare Method stored procedure handle read problem fixed. +2004-06-30 Umadevi S <sumadevi@novell.com> + * Tds.cs - In the NextResult method handling TdsPacketSubType. TableName. + 2004-04-22 Sebastien Pouliot <sebastien@ximian.com> diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs index 1a917399a3f..e1cf4697ee7 100644 --- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs +++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs @@ -293,6 +293,12 @@ namespace Mono.Data.Tds.Protocol { break; case TdsPacketSubType.TableName: + // done = true; + peek = Comm.Peek (); + done = (peek != (byte) TdsPacketSubType.ColumnDetail); + + break; + case TdsPacketSubType.ColumnDetail: done = true; break; default: diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs index 010283fb929..0b55a30abe3 100644 --- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs +++ b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs @@ -457,9 +457,9 @@ namespace Mono.Data.Tds.Protocol { parms.Add (new TdsMetaParameter ("@P3", "nvarchar", commandText)); ExecProc ("sp_prepare", parms, 0, true); - SkipToEnd (); - if (ColumnValues [0] == null || ColumnValues [0] == DBNull.Value) + if (!NextResult () || !NextRow () || ColumnValues [0] == null || ColumnValues [0] == DBNull.Value) throw new TdsInternalException (); + SkipToEnd (); return ColumnValues [0].ToString (); } diff --git a/mcs/class/Mono.Posix/Mono.Posix.dll.sources b/mcs/class/Mono.Posix/Mono.Posix.dll.sources index b426c78e14a..cf4150a2efb 100644 --- a/mcs/class/Mono.Posix/Mono.Posix.dll.sources +++ b/mcs/class/Mono.Posix/Mono.Posix.dll.sources @@ -4,5 +4,4 @@ ./Mono.Posix/Syscall.cs ./Mono.Posix/MapAttribute.cs ./Mono.Posix/IncludeAttribute.cs -./Mono.Posix/Catalog.cs -./Mono.Posix/PeerCred.cs +./Mono.Posix/Catalog.cs
\ No newline at end of file diff --git a/mcs/class/Mono.Posix/Mono.Posix/ChangeLog b/mcs/class/Mono.Posix/Mono.Posix/ChangeLog index c38db5ee850..b6fd766afdc 100644 --- a/mcs/class/Mono.Posix/Mono.Posix/ChangeLog +++ b/mcs/class/Mono.Posix/Mono.Posix/ChangeLog @@ -1,7 +1,3 @@ -2004-07-09 Dick Porter <dick@ximian.com> - - * PeerCred.cs: Get the unix socket peer credentials. - 2004-05-26 Miguel de Icaza <miguel@ximian.com> * Syscall.cs: Do not let the runtime handle strings, as we do not diff --git a/mcs/class/Mono.Posix/Mono.Posix/PeerCred.cs b/mcs/class/Mono.Posix/Mono.Posix/PeerCred.cs deleted file mode 100644 index 76071bcbca5..00000000000 --- a/mcs/class/Mono.Posix/Mono.Posix/PeerCred.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Mono.Posix.PeerCred: Peer credentials class for AF_UNIX sockets -// -// Authors: -// Dick Porter (dick@ximian.com) -// -// (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.Net.Sockets; - -namespace Mono.Posix -{ - public class PeerCred - { - private struct PeerCredData { - public int pid; - public int uid; - public int gid; - } - - /* Make sure this doesn't clash with anything in - * SocketOptionName, and keep it synchronised with the - * runtime - */ - private const int so_peercred=10001; - private PeerCredData data; - - public PeerCred (Socket sock) { - if (sock.AddressFamily != AddressFamily.Unix) { - throw new ArgumentException ("Only Unix sockets are supported", "sock"); - } - - data = (PeerCredData)sock.GetSocketOption (SocketOptionLevel.Socket, (SocketOptionName)so_peercred); - } - - public int ProcessID { - get { - return(data.pid); - } - } - - public int UserID { - get { - return(data.uid); - } - } - - public int GroupID { - get { - return(data.gid); - } - } - } -} - diff --git a/mcs/class/Mono.Security/ChangeLog b/mcs/class/Mono.Security/ChangeLog index 6d00422c990..236840ba508 100644 --- a/mcs/class/Mono.Security/ChangeLog +++ b/mcs/class/Mono.Security/ChangeLog @@ -1,7 +1,3 @@ -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 c2d609ecec2..63fbab93a8c 100755 --- a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeBase.cs +++ b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeBase.cs @@ -5,7 +5,9 @@ // Sebastien Pouliot <sebastien@ximian.com> // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// (C) 2004 Novell (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,167 +58,63 @@ namespace Mono.Security.Authenticode { public const string spcIndirectDataContext = "1.3.6.1.4.1.311.2.1.4"; - private byte[] fileblock; - private FileStream fs; - private int blockNo; - private int blockLength; - private int peOffset; - private int dirSecurityOffset; - private int dirSecuritySize; + internal byte[] rawData; public AuthenticodeBase () { - fileblock = new byte [4096]; - } - - internal void Open (string filename) - { - if (fs != null) - Close (); - fs = new FileStream (filename, FileMode.Open, FileAccess.Read, FileShare.Read); - } - - internal void Close () - { - if (fs != null) { - fs.Close (); - fs = null; - blockNo = 0; - } } - internal bool ReadFirstBlock () + protected byte[] HashFile (string fileName, string hashName) { - 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; + 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 (); - // 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; + // MZ - DOS header + if (BitConverterLE.ToUInt16 (file, 0) != 0x5A4D) + return null; - // 2.2. Locate IMAGE_DIRECTORY_ENTRY_SECURITY (offset and size) - dirSecurityOffset = BitConverterLE.ToInt32 (fileblock, peOffset + 152); - dirSecuritySize = BitConverterLE.ToInt32 (fileblock, peOffset + 156); + // find offset of PE header + int peOffset = BitConverterLE.ToInt32 (file, 60); + if (peOffset > file.Length) + return null; - return true; - } + // PE - NT header + if (BitConverterLE.ToUInt16 (file, peOffset) != 0x4550) + return null; - internal byte[] GetSecurityEntry () - { - if (blockNo < 1) - ReadFirstBlock (); + // IMAGE_DIRECTORY_ENTRY_SECURITY + int dirSecurityOffset = BitConverterLE.ToInt32 (file, peOffset + 152); + int dirSecuritySize = BitConverterLE.ToInt32 (file, peOffset + 156); if (dirSecuritySize > 8) { - // 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); + 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 ();*/ } + else + rawData = null; - // Authenticode(r) gymnastics - // Hash from (generally) 0 to 215 (216 bytes) + HashAlgorithm hash = HashAlgorithm.Create (hashName); + // 0 to 215 (216) then skip 4 (checksum) int pe = peOffset + 88; - hash.TransformBlock (fileblock, 0, pe, fileblock, 0); - // then skip 4 for checksum + hash.TransformBlock (file, 0, pe, file, 0); pe += 4; - // 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 + // 220 to 279 (60) then skip 8 (IMAGE_DIRECTORY_ENTRY_SECURITY) + hash.TransformBlock (file, pe, 60, file, pe); 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 ea0bd30e242..4d30ea38aab 100755 --- a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeDeformatter.cs +++ b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeDeformatter.cs @@ -5,7 +5,9 @@ // Sebastien Pouliot <sebastien@ximian.com> // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// (C) 2004 Novell (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,9 +56,6 @@ 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,20 +69,17 @@ namespace Mono.Security.Authenticode { public AuthenticodeDeformatter (string fileName) : this () { - FileName = fileName; + 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 + } } public string FileName { get { return filename; } - set { - Reset (); - try { - CheckSignature (value); - } - catch { - reason = 1; - } - } + set { CheckSignature (value); } } public byte[] Hash { @@ -104,7 +100,7 @@ namespace Mono.Security.Authenticode { public bool IsTrusted () { - if (entry == null) { + if (rawData == null) { reason = 1; return false; } @@ -114,13 +110,13 @@ namespace Mono.Security.Authenticode { return false; } - if ((signerChain.Root == null) || !trustedRoot) { + if (signerChain.Root == null) { reason = 6; return false; } if (timestamp != DateTime.MinValue) { - if ((timestampChain.Root == null) || !trustedTimestampRoot) { + if (timestampChain.Root == null) { reason = 6; return false; } @@ -142,11 +138,7 @@ namespace Mono.Security.Authenticode { } public byte[] Signature { - get { - if (entry == null) - return null; - return (byte[]) entry.Clone (); - } + get { return (byte[]) rawData.Clone (); } } public DateTime Timestamp { @@ -164,58 +156,43 @@ namespace Mono.Security.Authenticode { private bool CheckSignature (string fileName) { filename = fileName; - base.Open (filename); - entry = base.GetSecurityEntry (); - if (entry == null) { - // no signature is present - reason = 1; - base.Close (); + + // 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) return false; - } - PKCS7.ContentInfo ci = new PKCS7.ContentInfo (entry); - if (ci.ContentType != PKCS7.Oid.signedData) { - base.Close (); + PKCS7.ContentInfo ci = new PKCS7.ContentInfo (rawData); + if (ci.ContentType != PKCS7.Oid.signedData) return false; - } PKCS7.SignedData sd = new PKCS7.SignedData (ci.Content); - if (sd.ContentInfo.ContentType != spcIndirectDataContext) { - base.Close (); + if (sd.ContentInfo.ContentType != spcIndirectDataContext) return false; - } coll = sd.Certificates; ASN1 spc = sd.ContentInfo.Content; signedHash = spc [0][1][1]; - - 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; + if (signedHash.Length == 20) { + // seems to be SHA-1, restart hashing + hashName = "SHA1"; + hash = HashFile (filename, hashName); } - base.Close (); if (!signedHash.CompareValue (hash)) return false; // messageDigest is a hash of spcIndirectDataContext (which includes the file hash) byte[] spcIDC = spc [0].Value; - ha.Initialize (); // re-using hash instance + HashAlgorithm ha = HashAlgorithm.Create (hashName); byte[] messageDigest = ha.ComputeHash (spcIDC); - return VerifySignature (sd, messageDigest, ha); + return VerifySignature (sd, messageDigest, hashName); } private bool CompareIssuerSerial (string issuer, byte[] serial, X509Certificate x509) @@ -235,7 +212,7 @@ namespace Mono.Security.Authenticode { } //private bool VerifySignature (ASN1 cs, byte[] calculatedMessageDigest, string hashName) - private bool VerifySignature (PKCS7.SignedData sd, byte[] calculatedMessageDigest, HashAlgorithm ha) + private bool VerifySignature (PKCS7.SignedData sd, byte[] calculatedMessageDigest, string hashName) { string contentType = null; ASN1 messageDigest = null; @@ -264,7 +241,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][0][0].Value); + spcSpOpusInfo = System.Text.Encoding.UTF8.GetString (attr[1][0][1][0].Value); } catch (NullReferenceException) { spcSpOpusInfo = null; @@ -284,13 +261,13 @@ namespace Mono.Security.Authenticode { return false; // verify signature - string hashOID = CryptoConfig.MapNameToOID (ha.ToString ()); + string hashOID = CryptoConfig.MapNameToOID (hashName); // 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); - ha.Initialize (); + HashAlgorithm ha = HashAlgorithm.Create (hashName); byte[] p7hash = ha.ComputeHash (aa.GetBytes ()); byte[] signature = sd.SignerInfo.Signature; @@ -304,9 +281,10 @@ namespace Mono.Security.Authenticode { RSACryptoServiceProvider rsa = (RSACryptoServiceProvider) x509.RSA; if (rsa.VerifyHash (p7hash, hashOID, signature)) { signerChain.LoadCertificates (coll); - trustedRoot = signerChain.Build (x509); - signingCertificate = x509; - break; + if (signerChain.Build (x509)) + signingCertificate = x509; + else + return false; } } } @@ -322,18 +300,17 @@ namespace Mono.Security.Authenticode { // countersignature (1 2 840 113549 1 9 6) // SET { PKCS7.SignerInfo cs = new PKCS7.SignerInfo (attr [1]); - trustedTimestampRoot = VerifyCounterSignature (cs, signature); - break; + return VerifyCounterSignature (cs, signature, hashName); default: // we don't support other unauthenticated attributes break; } } - return (trustedRoot && trustedTimestampRoot); + return true; } - private bool VerifyCounterSignature (PKCS7.SignerInfo cs, byte[] signature) + private bool VerifyCounterSignature (PKCS7.SignerInfo cs, byte[] signature, string hashName) { // SEQUENCE { // INTEGER 1 @@ -380,7 +357,6 @@ 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"; @@ -421,20 +397,5 @@ 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 983c55534cc..9813f809be4 100755 --- a/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs +++ b/mcs/class/Mono.Security/Mono.Security.Authenticode/AuthenticodeFormatter.cs @@ -5,7 +5,9 @@ // Sebastien Pouliot <sebastien@ximian.com> // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// (C) 2004 Novell (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 @@ -52,7 +54,6 @@ namespace Mono.Security.Authenticode { private PKCS7.SignedData pkcs7; private string description; private Uri url; - private byte [] entry; public AuthenticodeFormatter () : base () { @@ -241,11 +242,11 @@ namespace Mono.Security.Authenticode { int dirSecuritySize = BitConverter.ToInt32 (file, peOffset + 156); if (dirSecuritySize > 8) { - entry = new byte [dirSecuritySize - 8]; - Buffer.BlockCopy (file, dirSecurityOffset + 8, entry, 0, entry.Length); + rawData = new byte [dirSecuritySize - 8]; + Buffer.BlockCopy (file, dirSecurityOffset + 8, rawData, 0, rawData.Length); } else - entry = null; + rawData = 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 0e1b07e15aa..19cc3c81335 100644 --- a/mcs/class/Mono.Security/Mono.Security.Authenticode/ChangeLog +++ b/mcs/class/Mono.Security/Mono.Security.Authenticode/ChangeLog @@ -1,9 +1,3 @@ -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.Protocol.Tls/ChangeLog b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog index a5a20358101..e55f1f5ecd8 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog @@ -1,15 +1,3 @@ -2004-07-14 Sebastien Pouliot <sebastien@ximian.com> - - * SslClientStream.cs: Changed lock to "new object()" and not - String.Empty (as the read/write locks points becomes the same). - * SslServerStream.cs: Changed lock to "new object()" and not - String.Empty (as the read/write locks points becomes the same). - -2004-07-14 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpsClientStream.cs: get an HttpWebRequest so that we can use the - ServicePoint it has. No need to get the host now. - 2004-05-09 Carlos Guzman Alvarez <carlosga@telefonica.net>
* Mono.Security.Protocol.Tls/Alert.cs:
diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs index 678cf83163c..1da66f06849 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/HttpsClientStream.cs @@ -40,13 +40,14 @@ namespace Mono.Security.Protocol.Tls { internal class HttpsClientStream : SslClientStream { - private HttpWebRequest _request; + private string _host; + private WebRequest _request; - public HttpsClientStream (Stream stream, X509CertificateCollection clientCertificates, - HttpWebRequest request) - : base (stream, request.RequestUri.Host, false, SecurityProtocolType.Default, clientCertificates) + public HttpsClientStream (Stream stream, string targetHost, X509CertificateCollection clientCertificates, WebRequest request) + : base (stream, targetHost, false, SecurityProtocolType.Default, clientCertificates) { + _host = targetHost; // this constructor permit access to the WebRequest to call // ICertificatePolicy.CheckValidationResult _request = request; @@ -60,7 +61,8 @@ namespace Mono.Security.Protocol.Tls { { bool failed = (certificateErrors.Length > 0); if (ServicePointManager.CertificatePolicy != null) { - ServicePoint sp = _request.ServicePoint; + Uri target = new Uri ("https://" + _host); + ServicePoint sp = ServicePointManager.FindServicePoint (target); // only one problem can be reported by this interface int problem = ((failed) ? certificateErrors [0] : 0); diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs index fccfb9902b3..068a24f68c7 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs @@ -349,8 +349,8 @@ namespace Mono.Security.Protocol.Tls this.inputBuffer = new BufferedStream(new MemoryStream()); this.innerStream = stream; this.ownsStream = ownsStream; - this.read = new object (); - this.write = new object (); + this.read = String.Empty; + this.write = String.Empty; this.protocol = new ClientRecordProtocol(innerStream, context); } @@ -821,4 +821,4 @@ namespace Mono.Security.Protocol.Tls #endregion } -} +}
\ No newline at end of file diff --git a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs index f2786f7554b..53b3d095def 100644 --- a/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs +++ b/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslServerStream.cs @@ -306,8 +306,8 @@ namespace Mono.Security.Protocol.Tls this.inputBuffer = new BufferedStream(new MemoryStream()); this.innerStream = stream; this.ownsStream = ownsStream; - this.read = new object (); - this.write = new object (); + this.read = String.Empty; + this.write = String.Empty; this.protocol = new ServerRecordProtocol(innerStream, context); } diff --git a/mcs/class/Mono.Security/Mono.Security.X509.Extensions/ChangeLog b/mcs/class/Mono.Security/Mono.Security.X509.Extensions/ChangeLog index b8d2dc9942e..f00dcacd041 100644 --- a/mcs/class/Mono.Security/Mono.Security.X509.Extensions/ChangeLog +++ b/mcs/class/Mono.Security/Mono.Security.X509.Extensions/ChangeLog @@ -1,8 +1,3 @@ -2004-07-15 Sebastien Pouliot <sebastien@ximian.com> - - * KeyUsageExtension.cs: Added Encode to extension so it can be used - by makecert. Fix bug # 61240. Patch provided by Ianier Munoz. - 2004-04-28 Sebastien Pouliot <sebastien@ximian.com> * KeyUsageExtension.cs: Added missing INSIDE_CORLIB to enum. diff --git a/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs b/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs index 0c5d3b0cf38..a8c5553ed58 100644 --- a/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs +++ b/mcs/class/Mono.Security/Mono.Security.X509.Extensions/KeyUsageExtension.cs @@ -86,11 +86,6 @@ namespace Mono.Security.X509.Extensions { public KeyUsageExtension (X509Extension extension) : base (extension) {} - public KeyUsageExtension () : base () - { - extnOid = "2.5.29.15"; - } - protected override void Decode () { ASN1 bitString = new ASN1 (extnValue.Value); @@ -101,18 +96,6 @@ namespace Mono.Security.X509.Extensions { kubits = (kubits << 8) + bitString.Value [i++]; } - protected override void Encode () - { - if (extnValue == null) { - extnValue = new ASN1 (0x03, new byte[] { 0x00, (byte)kubits }); - } - } - - public KeyUsages KeyUsage { - get { return (KeyUsages) kubits; } - set { kubits = Convert.ToInt32 (value, CultureInfo.InvariantCulture); } - } - public override string Name { get { return "Key Usage"; } } diff --git a/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog b/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog index fc6c1b3b64b..14d6852db71 100644 --- a/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog +++ b/mcs/class/Mono.Security/Mono.Security.X509/ChangeLog @@ -1,14 +1,3 @@ -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. - * X520Attributes.cs: Added X520.EmailAddress. - Both patches fix bug #61241 and were contributed by Ianier Munoz. - 2004-05-27 Sebastien Pouliot <sebastien@ximian.com> * X509Certificate.cs: Rethrow original exception when parsing X.509 diff --git a/mcs/class/Mono.Security/Mono.Security.X509/X501Name.cs b/mcs/class/Mono.Security/Mono.Security.X509/X501Name.cs index 22e3ea30169..515e24c0b9b 100644 --- a/mcs/class/Mono.Security/Mono.Security.X509/X501Name.cs +++ b/mcs/class/Mono.Security/Mono.Security.X509/X501Name.cs @@ -162,8 +162,6 @@ namespace Mono.Security.X509 { case "S": // Microsoft case "ST": // RFC2253 return new X520.StateOrProvinceName (); - case "E": // NOTE: Not part of RFC2253 - return new X520.EmailAddress (); case "DC": // return streetAddress; case "UID": diff --git a/mcs/class/Mono.Security/Mono.Security.X509/X509Chain.cs b/mcs/class/Mono.Security/Mono.Security.X509/X509Chain.cs index f8035e6c661..254ff1b70fa 100755 --- a/mcs/class/Mono.Security/Mono.Security.X509/X509Chain.cs +++ b/mcs/class/Mono.Security/Mono.Security.X509/X509Chain.cs @@ -9,7 +9,9 @@ // Sebastien Pouliot <sebastien@ximian.com> // // (C) 2003 Motus Technologies Inc. (http://www.motus.com) -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// (C) 2004 Novell (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 @@ -132,7 +134,7 @@ namespace Mono.Security.X509 { tmp = FindCertificateParent (x); if (x != null) { _chain.Add (x); - x = tmp; // last valid + tmp = x; // last valid } } // find a trusted root @@ -189,8 +191,7 @@ namespace Mono.Security.X509 { _status = X509ChainStatusFlags.NoError; roots = null; // this force a reload certs.Clear (); - if (_chain != null) - _chain.Clear (); + _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 aa27a4a7dfd..81db71b5c75 100755 --- a/mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs +++ b/mcs/class/Mono.Security/Mono.Security.X509/X509Store.cs @@ -4,7 +4,9 @@ // Author: // Sebastien Pouliot <sebastien@ximian.com> // -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// (C) 2004 Novell (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 @@ -104,7 +106,9 @@ namespace Mono.Security.X509 { public void Import (X509Certificate certificate) { - CheckStore (_storePath, true); + if (!Directory.Exists (_storePath)) { + Directory.CreateDirectory (_storePath); + } string filename = Path.Combine (_storePath, GetUniqueName (certificate)); if (!File.Exists (filename)) { @@ -179,28 +183,14 @@ namespace Mono.Security.X509 { return crl; } - private bool CheckStore (string path, bool throwException) + private X509CertificateCollection BuildCertificatesCollection (string storeName) { - try { - if (Directory.Exists (path)) - return true; + string path = Path.Combine (_storePath, storeName); + if (!Directory.Exists (path)) { 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) { @@ -223,9 +213,6 @@ 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.X509/X520Attributes.cs b/mcs/class/Mono.Security/Mono.Security.X509/X520Attributes.cs index b8feb6a2db6..54a8af9ba23 100644 --- a/mcs/class/Mono.Security/Mono.Security.X509/X520Attributes.cs +++ b/mcs/class/Mono.Security/Mono.Security.X509/X520Attributes.cs @@ -101,10 +101,6 @@ namespace Mono.Security.X509 { // PRINTABLESTRING asn1.Add (new ASN1 (0x13, Encoding.ASCII.GetBytes (attrValue))); break; - case 0x16: - // IA5STRING - asn1.Add (new ASN1 (0x16, Encoding.ASCII.GetBytes (attrValue))); - break; case 0x1E: // BMPSTRING asn1.Add (new ASN1 (0x1E, Encoding.BigEndianUnicode.GetBytes (attrValue))); @@ -180,14 +176,6 @@ namespace Mono.Security.X509 { } } - // NOTE: Not part of RFC2253 - public class EmailAddress : AttributeTypeAndValue - { - public EmailAddress () : base ("1.2.840.113549.1.9.1", 128, 0x16) - { - } - } - /* -- Naming attributes of type X520Title * id-at-title AttributeType ::= { id-at 12 } * diff --git a/mcs/class/Mono.Security/Mono.Security_test.dll.sources b/mcs/class/Mono.Security/Mono.Security_test.dll.sources index 41e1458d054..2e75e37c1e4 100644 --- a/mcs/class/Mono.Security/Mono.Security_test.dll.sources +++ b/mcs/class/Mono.Security/Mono.Security_test.dll.sources @@ -9,7 +9,6 @@ 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 deleted file mode 100644 index fa708c3d6a8..00000000000 --- a/mcs/class/Mono.Security/Test/Mono.Security.Authenticode/AuthenticodeDeformatterTest.cs +++ /dev/null @@ -1,724 +0,0 @@ -ďťż// -// 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 46672ff6427..eee740f04a6 100644 --- a/mcs/class/Mono.Security/Test/Mono.Security.Authenticode/ChangeLog +++ b/mcs/class/Mono.Security/Test/Mono.Security.Authenticode/ChangeLog @@ -1,7 +1,3 @@ -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/Mono.Data.SqlExpressions/ChangeLog b/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog index f633f97c624..e4266e2d3cd 100644 --- a/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog +++ b/mcs/class/System.Data/Mono.Data.SqlExpressions/ChangeLog @@ -1,6 +1,3 @@ -2004-07-12 Umadevi S <sumadevi@novell.com> - * Tokenizer.cs - read an Int64 from the text instead of Int32. Resolves bug 61203 - 2004-06-17 Boris Kirzner <borisk@mainsoft.com> * Comparison.cs - use 'as' to avoid NullReferenceExeption in casting. diff --git a/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs b/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs index c3b4eb1faf8..a9b427d1bf0 100644 --- a/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs +++ b/mcs/class/System.Data/Mono.Data.SqlExpressions/Tokenizer.cs @@ -122,7 +122,7 @@ namespace Mono.Data.SqlExpressions { string str = sb.ToString (); if (str.IndexOf(".") == -1) - return Int64.Parse (str); + return int.Parse (str); else return double.Parse (str); } diff --git a/mcs/class/System.Data/System.Data.Common/ChangeLog b/mcs/class/System.Data/System.Data.Common/ChangeLog index 6af8fca9b77..0db883a625e 100755 --- a/mcs/class/System.Data/System.Data.Common/ChangeLog +++ b/mcs/class/System.Data/System.Data.Common/ChangeLog @@ -1,11 +1,5 @@ -2004-07-21 Umadevi S <sumadevi@novell.com> - * DbDataRecord.cs - Fix for bug 58163. Return DBNull instead of null - -2004-07-07 Umadevi S <sumadevi@novell.com> - * DataContainer.cs :CheckedforNull before calling the relavant setmethods in each of the - SetItemForDataRecord method for the DateTimeClass - 2004-06-24 Atsushi Enomoto <atsushi@ximian.com> + * DataColumnMappingCollection.cs : fixed typo. * DbDataAdapter.cs : column mappings were not filled. diff --git a/mcs/class/System.Data/System.Data.Common/DataContainer.cs b/mcs/class/System.Data/System.Data.Common/DataContainer.cs index de0d64bc598..5b627d7d8ba 100644 --- a/mcs/class/System.Data/System.Data.Common/DataContainer.cs +++ b/mcs/class/System.Data/System.Data.Common/DataContainer.cs @@ -1098,8 +1098,8 @@ namespace System.Data.Common { // if exception thrown, it should be caught // in the caller method - if (!CheckAndSetNull(index,record,field)) - base.SetValue(index,record.GetDateTime(field)); + base.SetValue(index,record.GetDateTime(field)); + base.SetItemFromDataRecord(index,record,field); } internal override int CompareValues(int index1, int index2) diff --git a/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs b/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs index 69a2013f64d..0a6fa0e868d 100644 --- a/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs +++ b/mcs/class/System.Data/System.Data.Common/DbDataRecord.cs @@ -340,7 +340,7 @@ namespace System.Data.Common { public bool IsDBNull (int i) { - return GetValue (i) == DBNull.Value; + return GetValue (i) == null; } #if NET_2_0 public virtual bool IsSetAsDefault (int i) diff --git a/mcs/class/System.Data/System.Data.Odbc/ChangeLog b/mcs/class/System.Data/System.Data.Odbc/ChangeLog index e633dabdd9d..d8581c1975b 100644 --- a/mcs/class/System.Data/System.Data.Odbc/ChangeLog +++ b/mcs/class/System.Data/System.Data.Odbc/ChangeLog @@ -1,47 +1,3 @@ -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 - -2004-08-04 Umadevi S (sumadevi@novell.com) - * OdbcDataReader.cs - Fixed bug 61832 - Column names were not filled, due to which name based lookup of columns failed. - -2004-08-04 Umadevi S (sumadevi@novell.com) - * OdbcDataReader.cs - Fixed bug 61405 - Handling smallint column type. - -2004-07-30 Sureshkumar T (tsureshkumar@novell.com) - * OdbcCommand.cs: ExecuteNonQuery Closed statement handle to fix memory leak - * OdbcDataReader.cs: Closed statement handle to fix memory leak - Removed SQLState login in GetBytes coz OdbcError provides the same. - -2004-07-29 Umadevi S (sumadevi@novell.com) - * OdbcCommand.cs - Fixed bug 62046. ExecuteNonQuery implemented correctly - -2004-07-28 Umadevi S (sumadevi@novell.com) - * OdbcParameter.cs - fixed bug 61968. String values passed with quotes - -2004-07-07 Umadevi S (sumadevi@novell.com) - * OdbcConnection.cs - Allowed Close to be called multiple times - - Implementation of Dispose method - -2004-07-07 Umadevi S (sumadevi@novell.com) - * OdbcCommand.cs : fixed set method for Transaction - -2004-07-01 Sureshkumar T (tsureshkumar@novell.com) - * OdbcCommand.cs : fixed reader problem with ExecuteScalar - 2004-06-23 Sureshkumar T (tsureshkumar@novell.com) * OdbcConnection.cs: Fix: Moved env allocation to Open method. Disconnection & freeing handles are done in Close diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcCommand.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcCommand.cs index 64c4fcfe661..fe242f3bf8f 100644 --- a/mcs/class/System.Data/System.Data.Odbc/OdbcCommand.cs +++ b/mcs/class/System.Data/System.Data.Odbc/OdbcCommand.cs @@ -223,14 +223,7 @@ namespace System.Data.Odbc return (IDbTransaction) Transaction;
}
set {
- if (value is OdbcTransaction) - { - Transaction = (OdbcTransaction)value; - } - else - { - throw new ArgumentException (); - } + throw new NotImplementedException ();
}
}
@@ -292,12 +285,6 @@ namespace System.Data.Odbc public int ExecuteNonQuery ()
{
- return ExecuteNonQuery (true); - }
-
- private int ExecuteNonQuery (bool freeHandle) - { - int records = 0; if (connection == null)
throw new InvalidOperationException ();
if (connection.State == ConnectionState.Closed)
@@ -305,29 +292,12 @@ namespace System.Data.Odbc // FIXME: a third check is mentioned in .NET docs
ExecSQL(CommandText);
- - // .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)) { - - int numrows = 0; - OdbcReturn ret = libodbc.SQLRowCount(hstmt,ref numrows); - records = numrows; - } - else - records = -1; -
- if (freeHandle && !prepared) {
- OdbcReturn ret = libodbc.SQLFreeHandle( (ushort) OdbcHandleType.Stmt, hstmt);
- if ((ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo))
- throw new OdbcException(new OdbcError("SQLFreeHandle",OdbcHandleType.Stmt,hstmt));
- } - return records;
- } - +
+// if (!prepared)
+// libodbc.SQLFreeHandle( (ushort) OdbcHandleType.Stmt, hstmt);
+ return 0;
+ }
+
public void Prepare()
{
OdbcReturn ret=libodbc.SQLAllocHandle(OdbcHandleType.Stmt, Connection.hDbc, ref hstmt);
@@ -360,7 +330,7 @@ namespace System.Data.Odbc public OdbcDataReader ExecuteReader (CommandBehavior behavior)
{
- ExecuteNonQuery(false);
+ ExecuteNonQuery();
dataReader=new OdbcDataReader(this,behavior);
return dataReader;
}
@@ -372,12 +342,11 @@ namespace System.Data.Odbc public object ExecuteScalar ()
{
- object val = null;
+ object val;
OdbcDataReader reader=ExecuteReader();
try
{
- if (reader.Read ())
- val=reader[0];
+ val=reader[0];
}
finally
{
diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs index b40eb86c8d2..e6bd6ff0441 100644 --- a/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs +++ b/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs @@ -46,7 +46,6 @@ namespace System.Data.Odbc int connectionTimeout; internal OdbcTransaction transaction; IntPtr henv=IntPtr.Zero, hdbc=IntPtr.Zero; - bool disposed = false; #endregion @@ -198,25 +197,27 @@ namespace System.Data.Odbc // disconnect ret = libodbc.SQLDisconnect (hdbc); if ( (ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo)) - throw new OdbcException (new OdbcError ("SQLDisconnect", OdbcHandleType.Dbc,hdbc)); + throw new OdbcException (new OdbcError ("SQLConnect", OdbcHandleType.Dbc,hdbc)); // free handles if (hdbc != IntPtr.Zero) { ret = libodbc.SQLFreeHandle ( (ushort) OdbcHandleType.Dbc, hdbc); if ( (ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo)) - throw new OdbcException (new OdbcError ("SQLFreeHandle", OdbcHandleType.Dbc,hdbc)); + throw new OdbcException (new OdbcError ("SQLConnect", OdbcHandleType.Dbc,hdbc)); } hdbc = IntPtr.Zero; if (henv != IntPtr.Zero) { ret = libodbc.SQLFreeHandle ( (ushort) OdbcHandleType.Env, henv); if ( (ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo)) - throw new OdbcException (new OdbcError ("SQLFreeHandle", OdbcHandleType.Env,henv)); + throw new OdbcException (new OdbcError ("SQLConnect", OdbcHandleType.Dbc,hdbc)); } henv = IntPtr.Zero; transaction = null; } + else + throw new InvalidOperationException (); } public OdbcCommand CreateCommand () @@ -230,23 +231,10 @@ namespace System.Data.Odbc throw new NotImplementedException (); } + [MonoTODO] protected override void Dispose (bool disposing) - { - if (!this.disposed) { - try - { - // release the native unmananged resources - this.Close(); - this.disposed = true; - } - finally - { - // call Dispose on the base class - base.Dispose(disposing); - } - } - } - + { + } [MonoTODO] object ICloneable.Clone () diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs index 61b49d55481..394963734f0 100644 --- a/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs +++ b/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs @@ -167,8 +167,25 @@ namespace System.Data.Odbc return cols[ordinal]; } + private string GetSQLState (IntPtr hstmt, ushort recNo) + { + OdbcReturn ret = OdbcReturn.Error; + short bufLength=256, txtLength=0; + int nativeError = 1; + string sqlState = "", sqlMsg = ""; + byte [] msgtxtBuffer = new byte [bufLength]; + byte [] sqlStateBuffer = new byte [bufLength]; + ret = libodbc.SQLGetDiagRec (OdbcHandleType.Stmt, hstmt, recNo, + sqlStateBuffer, ref nativeError, msgtxtBuffer, + bufLength, ref txtLength); + sqlState = Encoding.Default.GetString (sqlStateBuffer).Replace ( + (char) 0, ' ').Trim (); + return sqlState; + } + public void Close () { + // libodbc.SQLFreeHandle((ushort) OdbcHandleType.Stmt, hstmt); OdbcReturn ret=libodbc.SQLCloseCursor(hstmt); if ((ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo)) @@ -179,9 +196,6 @@ namespace System.Data.Odbc if ((behavior & CommandBehavior.CloseConnection)==CommandBehavior.CloseConnection) this.command.Connection.Close(); - ret = libodbc.SQLFreeHandle( (ushort) OdbcHandleType.Stmt, hstmt);
- if ((ret!=OdbcReturn.Success) && (ret!=OdbcReturn.SuccessWithInfo)) - throw new OdbcException(new OdbcError("SQLFreeHandle",OdbcHandleType.Stmt,hstmt)); } ~OdbcDataReader () @@ -217,10 +231,6 @@ namespace System.Data.Odbc if ( (ret != OdbcReturn.Success) && (ret != OdbcReturn.SuccessWithInfo)) throw new OdbcException (new OdbcError ("SQLGetData", OdbcHandleType.Stmt, hstmt)); - OdbcError odbcErr = null; - if ( (ret == OdbcReturn.SuccessWithInfo)) - odbcErr = new OdbcError ("SQLGetData", OdbcHandleType.Stmt, hstmt); - if (buffer == null) return outsize; //if buffer is null,return length of the field @@ -231,10 +241,11 @@ namespace System.Data.Odbc copyBuffer = false; returnVal = -1; } else { - string sqlstate = odbcErr.SQLState; + string sqlstate = GetSQLState (hstmt, 1); //SQLState: String Data, Right truncated if (sqlstate != libodbc.SQLSTATE_RIGHT_TRUNC) - throw new OdbcException ( odbcErr); + throw new OdbcException (new OdbcError ("SQLGetData", + OdbcHandleType.Stmt, hstmt)); copyBuffer = true; } } else { @@ -389,6 +400,7 @@ namespace System.Data.Odbc for (int i = 0; i < cols.Length; i += 1 ) { OdbcColumn col=GetColumn(i); + //Console.WriteLine("{0}:{1}:{2}",col.ColumnName,col.DataType,col.OdbcType); schemaRow = dataTableSchema.NewRow (); dataTableSchema.Rows.Add (schemaRow); @@ -473,23 +485,14 @@ 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(temp)); + DataValue=Decimal.Parse(System.Text.Encoding.Default.GetString(buffer)); break; case OdbcType.TinyInt: short short_data=0; ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.TinyInt, ref short_data, 0, ref outsize); - DataValue = System.Convert.ToByte (short_data); + DataValue=short_data; break; - case OdbcType.SmallInt: - short sint_data=0; - ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.SmallInt, ref sint_data, 0, ref outsize); - DataValue=sint_data; - break; case OdbcType.Int: int int_data=0; ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.Int, ref int_data, 0, ref outsize); @@ -521,17 +524,8 @@ namespace System.Data.Odbc break; case OdbcType.Timestamp: case OdbcType.DateTime: - case OdbcType.Date: - case OdbcType.Time: OdbcTimestamp ts_data=new OdbcTimestamp(); - 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); + 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)); @@ -540,11 +534,12 @@ namespace System.Data.Odbc case OdbcType.Image : bufsize = col.MaxLength + 1; buffer = new byte [bufsize]; - long read = GetBytes (ordinal, 0, buffer, 0, bufsize); + long read = GetBytes (ColIndex, 0, buffer, 0, bufsize); ret = OdbcReturn.Success; DataValue = buffer; break; default: + //Console.WriteLine("Fetching unsupported data type as string: "+col.OdbcType.ToString()); bufsize=255; buffer=new byte[bufsize]; ret=libodbc.SQLGetData(hstmt, ColIndex, OdbcType.Char, buffer, bufsize, ref outsize); @@ -617,8 +612,6 @@ namespace System.Data.Odbc currentRow=-1; else currentRow++; - GetSchemaTable(); - // Clear cached values from last record foreach (OdbcColumn col in cols) { diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs index 11153197ca7..51df821d86f 100644 --- a/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs +++ b/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs @@ -261,9 +261,6 @@ namespace System.Data.Odbc string paramValueString = ParamValue.ToString();
// Treat everything else as a string
// Init string buffer
- if (ParamValue is String) - paramValueString = "\'"+paramValueString+"\'"; - if (buffer == null || buffer.Length < ((size > 20) ? size : 20))
buffer = new byte[(size > 20) ? size : 20];
else
diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcType.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcType.cs index 6e7c3169bee..fed8035a7e6 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 + public enum OdbcType : short
{
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 8cbc2916c38..5576c7f7c6b 100755 --- a/mcs/class/System.Data/System.Data.SqlClient/ChangeLog +++ b/mcs/class/System.Data/System.Data.SqlClient/ChangeLog @@ -1,10 +1,6 @@ -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 +2004-06-30 Umadevi S <sumadevi@novell.com> + * SqlCommand.cs : In the Execute Method the commandbehavior parameters were ignored correct +these 2004-06-22 Atsushi Enomoto <atsushi@ximian.com> diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs index a5ada9fd053..21978c14cf2 100644 --- a/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs +++ b/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs @@ -268,8 +268,8 @@ namespace System.Data.SqlClient { { TdsMetaParameterCollection parms = Parameters.MetaParameters; if (preparedStatement == null) { - bool schemaOnly = ((CommandBehavior & CommandBehavior.SchemaOnly) > 0); - bool keyInfo = ((CommandBehavior & CommandBehavior.KeyInfo) > 0); + bool schemaOnly = ((behavior & CommandBehavior.SchemaOnly) > 0); + bool keyInfo = ((behavior & CommandBehavior.KeyInfo) > 0); StringBuilder sql1 = new StringBuilder (); StringBuilder sql2 = new StringBuilder (); @@ -310,19 +310,16 @@ namespace System.Data.SqlClient { try { Execute (CommandBehavior.Default, false); - 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)) + // .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; - } + else + result = -1; + } catch (TdsTimeoutException e) { throw SqlException.FromTdsInternalException ((TdsInternalException) e); diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs index abe23c3aebf..52b6a0a589a 100644 --- a/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs +++ b/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs @@ -131,9 +131,6 @@ namespace System.Data.SqlClient { public void Close () { - // skip to end & read output parameters - while (NextResult ()) - ; isClosed = true; command.Connection.DataReader = null; command.CloseDataReader (moreResults); diff --git a/mcs/class/System.Data/System.Data/ChangeLog b/mcs/class/System.Data/System.Data/ChangeLog index 78cc45ac101..5477819e402 100644 --- a/mcs/class/System.Data/System.Data/ChangeLog +++ b/mcs/class/System.Data/System.Data/ChangeLog @@ -1,18 +1,3 @@ -2004-08-06 Atsushi Enomoto <atsushi@ximian.com> - - * DataSet.cs : DataSet's ExtendedProperties were not XmlConverted. - -2004-08-05 Atsushi Enomoto <atsushi@ximian.com> - - * XmlConstants.cs : Added constants for "msprop" support. - * DataSet.cs : ExtendedProperties should be written in the schema. - This fixes bug #61233. - -2004-07-27 Atsushi Enomoto <atsushi@ximian.com> - - * DataSet.cs : on serialization to XmlWriter, XmlConvert should be - used. There were also some culture dependency problems to write int. - 2004-06-27 Atsushi Enomoto <atsushi@ximian.com> * XmlDataInferenceLoader.cs : It was not always filling relation diff --git a/mcs/class/System.Data/System.Data/DataSet.cs b/mcs/class/System.Data/System.Data/DataSet.cs index 8ac4d34836b..34f9f8f4c80 100644 --- a/mcs/class/System.Data/System.Data/DataSet.cs +++ b/mcs/class/System.Data/System.Data/DataSet.cs @@ -1270,7 +1270,7 @@ namespace System.Data { private void WriteColumnAsAttribute (XmlWriter writer, XmlWriteMode mode, DataColumn col, DataRow row, DataRowVersion version) { - WriteAttributeString (writer, mode, col.Namespace, col.Prefix, XmlConvert.EncodeLocalName (col.ColumnName), WriteObjectXml (row[col, version])); + WriteAttributeString (writer, mode, col.Namespace, col.Prefix, XmlConvert.EncodeLocalName (col.ColumnName), row[col, version].ToString ()); } private void WriteTableElement (XmlWriter writer, XmlWriteMode mode, DataTable table, DataRow row, DataRowVersion version) @@ -1282,7 +1282,7 @@ namespace System.Data { if (mode == XmlWriteMode.DiffGram) { WriteAttributeString (writer, mode, XmlConstants.DiffgrNamespace, XmlConstants.DiffgrPrefix, "id", table.TableName + (row.XmlRowID + 1)); - WriteAttributeString (writer, mode, XmlConstants.MsdataNamespace, XmlConstants.MsdataPrefix, "rowOrder", XmlConvert.ToString (row.XmlRowID)); + WriteAttributeString (writer, mode, XmlConstants.MsdataNamespace, XmlConstants.MsdataPrefix, "rowOrder", row.XmlRowID.ToString()); string modeName = null; if (row.RowState == DataRowState.Modified) modeName = "modified"; @@ -1390,8 +1390,6 @@ namespace System.Data { nsmgr.AddNamespace (XmlConstants.TnsPrefix, Namespace); nsmgr.AddNamespace (String.Empty, Namespace); } - if (CheckExtendedPropertyExists ()) - nsmgr.AddNamespace (XmlConstants.MspropPrefix, XmlConstants.MspropNamespace); if (atts.Count > 0) schema.UnhandledAttributes = atts.ToArray (typeof (XmlAttribute)) as XmlAttribute []; @@ -1418,8 +1416,6 @@ namespace System.Data { elem.UnhandledAttributes = atts.ToArray (typeof (XmlAttribute)) as XmlAttribute []; - AddExtendedPropertyAttributes (elem, ExtendedProperties, doc); - XmlSchemaComplexType complex = new XmlSchemaComplexType (); elem.SchemaType = complex; @@ -1450,7 +1446,7 @@ namespace System.Data { schema.Items.Add (elem); - AddConstraintsToSchema (elem, constraintPrefix, tables, relations, doc); + AddConstraintsToSchema (elem, constraintPrefix, tables, relations); foreach (string prefix in nsmgr) { string ns = nsmgr.LookupNamespace (nsmgr.NameTable.Get (prefix)); if (prefix != "xmlns" && prefix != "xml" && ns != null && ns != String.Empty) @@ -1459,48 +1455,29 @@ namespace System.Data { return schema; } - private bool CheckExtendedPropertyExists () - { - if (ExtendedProperties.Count > 0) - return true; - foreach (DataTable dt in Tables) { - if (dt.ExtendedProperties.Count > 0) - return true; - foreach (DataColumn col in dt.Columns) - if (col.ExtendedProperties.Count > 0) - return true; - foreach (Constraint c in dt.Constraints) - if (c.ExtendedProperties.Count > 0) - return true; - } - foreach (DataRelation rel in Relations) - if (rel.ExtendedProperties.Count > 0) - return true; - return false; - } - // Add all constraints in all tables to the schema. - private void AddConstraintsToSchema (XmlSchemaElement elem, string constraintPrefix, DataTableCollection tables, DataRelationCollection relations, XmlDocument doc) + private void AddConstraintsToSchema (XmlSchemaElement elem, string constraintPrefix, DataTableCollection tables, DataRelationCollection relations) { // first add all unique constraints. - Hashtable uniqueNames = AddUniqueConstraints (elem, constraintPrefix, tables, doc); + Hashtable uniqueNames = AddUniqueConstraints (elem, constraintPrefix, tables); // Add all foriegn key constraints. - AddForeignKeys (uniqueNames, elem, constraintPrefix, relations, doc); + AddForeignKeys (uniqueNames, elem, constraintPrefix, relations); } // Add unique constaraints to the schema. // return hashtable with the names of all XmlSchemaUnique elements we created. - private Hashtable AddUniqueConstraints (XmlSchemaElement elem, string constraintPrefix, DataTableCollection tables, XmlDocument doc) + private Hashtable AddUniqueConstraints (XmlSchemaElement elem, string constraintPrefix, DataTableCollection tables) { + XmlDocument doc = new XmlDocument(); Hashtable uniqueNames = new Hashtable(); foreach (DataTable table in tables) { - foreach (Constraint constraint in table.Constraints) { + foreach (Constraint constaint in table.Constraints) { - if (constraint is UniqueConstraint) { + if (constaint is UniqueConstraint) { ArrayList attrs = new ArrayList (); XmlAttribute attrib; - UniqueConstraint uqConst = (UniqueConstraint) constraint; + UniqueConstraint uqConst = (UniqueConstraint)constaint; XmlSchemaUnique uniq = new XmlSchemaUnique (); // if column of the constraint is hidden do not write the constraint. @@ -1543,8 +1520,6 @@ namespace System.Data { uniq.Fields.Add(field); } - AddExtendedPropertyAttributes (uniq, constraint.ExtendedProperties, doc); - elem.Constraints.Add (uniq); uniqueNames.Add (uniq.Name, null); } @@ -1554,10 +1529,11 @@ namespace System.Data { } // Add the foriegn keys to the schema. - private void AddForeignKeys (Hashtable uniqueNames, XmlSchemaElement elem, string constraintPrefix, DataRelationCollection relations, XmlDocument doc) + private void AddForeignKeys (Hashtable uniqueNames, XmlSchemaElement elem, string constraintPrefix, DataRelationCollection relations) { if (relations == null) return; + XmlDocument doc = new XmlDocument(); foreach (DataRelation rel in relations) { if (rel.ParentKeyConstraint == null || rel.ChildKeyConstraint == null) @@ -1609,10 +1585,7 @@ namespace System.Data { field.XPath = constraintPrefix+column.ColumnName; keyRef.Fields.Add(field); } - keyRef.UnhandledAttributes = (XmlAttribute[])attrs.ToArray (typeof (XmlAttribute)); - AddExtendedPropertyAttributes (keyRef, rel.ExtendedProperties, doc); - elem.Constraints.Add (keyRef); } } @@ -1645,7 +1618,7 @@ namespace System.Data { // add ordinal attribute xlmAttrs[1] = doc.CreateAttribute (XmlConstants.MsdataPrefix, XmlConstants.Ordinal, XmlConstants.MsdataNamespace); - xlmAttrs[1].Value = XmlConvert.ToString (simple.Ordinal); + xlmAttrs[1].Value = simple.Ordinal.ToString(); simpleContent.UnhandledAttributes = xlmAttrs; @@ -1682,12 +1655,12 @@ namespace System.Data { if (col.AutoIncrementSeed != 0) { xattr = doc.CreateAttribute (XmlConstants.MsdataPrefix, XmlConstants.AutoIncrementSeed, XmlConstants.MsdataNamespace); - xattr.Value = XmlConvert.ToString (col.AutoIncrementSeed); + xattr.Value = col.AutoIncrementSeed.ToString(); xattrs.Add (xattr); } if (col.DefaultValue.ToString () != String.Empty) - colElem.DefaultValue = WriteObjectXml (col.DefaultValue); + colElem.DefaultValue = col.DefaultValue.ToString (); if (col.MaxLength < 0) colElem.SchemaTypeName = MapType (col.DataType); @@ -1714,7 +1687,6 @@ namespace System.Data { } colElem.UnhandledAttributes = (XmlAttribute[])xattrs.ToArray(typeof (XmlAttribute)); - AddExtendedPropertyAttributes (colElem, col.ExtendedProperties, doc); seq.Items.Add (colElem); } @@ -1754,33 +1726,12 @@ namespace System.Data { schemaToAdd.Namespaces.Add (prefix, col.Namespace); } att.SchemaTypeName = MapType (col.DataType); - // FIXME: what happens if extended properties are set on attribute columns?? schemaAttributes.Add (att); } - AddExtendedPropertyAttributes (elem, table.ExtendedProperties, doc); - return elem; } - private void AddExtendedPropertyAttributes (XmlSchemaAnnotated xsobj, PropertyCollection props, XmlDocument doc) - { - ArrayList attList = new ArrayList (); - XmlAttribute xmlAttr; - - if (xsobj.UnhandledAttributes != null) - attList.AddRange (xsobj.UnhandledAttributes); - - // add extended properties to xs:element - foreach (DictionaryEntry de in props) { - xmlAttr = doc.CreateAttribute (XmlConstants.MspropPrefix, XmlConvert.EncodeName (de.Key.ToString ()), XmlConstants.MspropNamespace); - xmlAttr.Value = de.Value != null ? WriteObjectXml (de.Value) : String.Empty; - attList.Add (xmlAttr); - } - if (attList.Count > 0) - xsobj.UnhandledAttributes = attList.ToArray (typeof (XmlAttribute)) as XmlAttribute []; - } - private string SafeNS (string ns) { return ns != null ? ns : String.Empty; diff --git a/mcs/class/System.Data/System.Data/XmlConstants.cs b/mcs/class/System.Data/System.Data/XmlConstants.cs index 1d459157606..b50a80bc6d5 100755 --- a/mcs/class/System.Data/System.Data/XmlConstants.cs +++ b/mcs/class/System.Data/System.Data/XmlConstants.cs @@ -83,8 +83,6 @@ internal class XmlConstants //ms schema objects public const string MsdataPrefix = "msdata"; public const string MsdataNamespace = "urn:schemas-microsoft-com:xml-msdata"; - public const string MspropPrefix = "msprop"; - public const string MspropNamespace = "urn:schemas-microsoft-com:xml-msprop"; public const string DiffgrPrefix = "diffgr"; public const string DiffgrNamespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; public const string TnsPrefix = "mstns"; diff --git a/mcs/class/System.Data/Test/ChangeLog b/mcs/class/System.Data/Test/ChangeLog index 65c8719353a..49630c2d5d8 100644 --- a/mcs/class/System.Data/Test/ChangeLog +++ b/mcs/class/System.Data/Test/ChangeLog @@ -1,13 +1,3 @@ -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 - * New File - MSSqlTestBed.cs - Base class for MSSql testing - (similar to the mysqltestbed) - 2004-06-16 Sureshkumar T <TSureshkumar@novell.com> * Added standalone NUnit test cases for MySql db related tests. * Created sub-directory for System.Data.Odbc diff --git a/mcs/class/System.Data/Test/MSSqlTestBed.cs b/mcs/class/System.Data/Test/MSSqlTestBed.cs deleted file mode 100644 index bb2ed3bd160..00000000000 --- a/mcs/class/System.Data/Test/MSSqlTestBed.cs +++ /dev/null @@ -1,100 +0,0 @@ -// -// MSSqlTestBed.cs : This is base class which manages the connections to -// MSSql database. This serves as a base class for all -// MSSql database dependant tests. -// -// To run : -// -// * compile using following command -// mcs /r:System.Data.dll,nunit.framework.dll /t:library /debug -// /out:MSSqlTestBed.dll MSSqlTestBed.cs System.Data.Common/*.cs -// * To run the tests -// mono /usr/local/bin/nunit-console.exe MSSqlTestBed.dll -// -// 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 System.Collections.Specialized; - -namespace MonoTests.System.Data -{ - public class MSSqlTestClient - { - #region protected members - protected string connectionString = null; - protected SqlConnection conn = null; - protected bool isConnAlive = false; - #endregion - - public MSSqlTestClient () - { - connectionString = - "Server=164.99.168.131;" + - "Database=Northwind;" + - "User ID=sa;" + - "Password=novell"; - conn = new SqlConnection(connectionString); - } - - protected void OpenConnection () - { - conn.ConnectionString = connectionString; - conn.Open (); - // run tests only if the connection is open, - // otherwise make it fail, to setup with correct - // database settings - if (conn != null && conn.State != ConnectionState.Closed) - isConnAlive = true; - } - - protected void CloseConnection () - { - if (conn != null && conn.State != ConnectionState.Closed) { - conn.Close (); - isConnAlive = false; - } - } - - internal void ExecuteQuery (string query) - { - SqlCommand cmd = new SqlCommand (); - cmd.Connection = conn; - cmd.CommandText = query; - try { - int recordsAff = cmd.ExecuteNonQuery (); - } catch (Exception e) { - Console.WriteLine("exception"); - Console.WriteLine(e.StackTrace); - } - } - - - } -} diff --git a/mcs/class/System.Data/Test/MySqlTestBed.cs b/mcs/class/System.Data/Test/MySqlTestBed.cs index 1f8fef70c89..a923c0d326d 100644 --- a/mcs/class/System.Data/Test/MySqlTestBed.cs +++ b/mcs/class/System.Data/Test/MySqlTestBed.cs @@ -95,26 +95,23 @@ namespace MonoTests.System.Data "pk_tint TINYINT NOT NULL PRIMARY KEY," + "col_char CHAR(20)," + "col_int INT," + - "col_blob TINYBLOB," + - "col_datetime DATETIME," + - "col_date DATE," + - "col_time TIME" + + "col_blob TINYBLOB" + ");"; ExecuteQuery (createQuery); createQuery = "INSERT INTO test VALUES (1, 'mono test" + - "#1', 255, 127123645917568585638457243856234985, '2004-08-22', '2004-08-22', '12:00:00' );" ; + "#1', 255, 127123645917568585638457243856234985 );" ; ExecuteQuery (createQuery); createQuery = "INSERT INTO test VALUES (2, 'mono test" + - "#2', 256, NULL, NULL, NULL, NULL );"; + "#2', 256, NULL );" ; ExecuteQuery (createQuery); createQuery = "INSERT INTO test VALUES (3, 'mono test" + - "#3', 257 , 127123645917568585638457243856234985, '2004-08-22', '2004-08-22', '12:00:00');" ; + "#3', 257 , 127123645917568585638457243856234985);" ; ExecuteQuery (createQuery); createQuery = "INSERT INTO test VALUES (4, 'mono test" + - "#4', 258 , 127123645917568585638457243856234985, '2004-08-22', '2004-08-22', '12:00:00');" ; + "#4', 258 , 127123645917568585638457243856234985);" ; ExecuteQuery (createQuery); createQuery = "INSERT INTO test VALUES (5, 'mono test" + - "#5', 259, 127123645917568585638457243856234985, '2004-08-22', '2004-08-22', '12:00:00' );" ; + "#5', 259, 127123645917568585638457243856234985 );" ; ExecuteQuery (createQuery); } diff --git a/mcs/class/System.Data/Test/System.Data.Common/ChangeLog b/mcs/class/System.Data/Test/System.Data.Common/ChangeLog index 351489466c7..af4575be732 100644 --- a/mcs/class/System.Data/Test/System.Data.Common/ChangeLog +++ b/mcs/class/System.Data/Test/System.Data.Common/ChangeLog @@ -1,6 +1,3 @@ -2004-08-13 Umadevi S <sumadevi@novell.com> - * Added File DataContainerTest - 2004-06-10 Umadevi S <sumadevi@novell.com> * Corrected GetTableMappingBySchemaAction for DataTableMappingCollectionTest diff --git a/mcs/class/System.Data/Test/System.Data.Common/DataContainerTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DataContainerTest.cs deleted file mode 100644 index 32e6cfd878c..00000000000 --- a/mcs/class/System.Data/Test/System.Data.Common/DataContainerTest.cs +++ /dev/null @@ -1,104 +0,0 @@ -//
-// DataContainerTest.cs - NUnit Test Cases for testing the
-// DataContainer 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.Common
-{
-
- [TestFixture]
- public class DataContainerTest : MSSqlTestClient {
-
- [SetUp]
- public void GetReady () {
- OpenConnection ();
- CreateTestSetup (); // create test database & tables
- }
-
- [TearDown]
- public void Clean () {
- CleanTestSetup (); // clean test database
- CloseConnection ();
- } - - private void CreateTestSetup() - { - if (!isConnAlive) - return ; - // Create test database & tables - string createQuery = "DROP TABLE datetimetest;" ; - ExecuteQuery (createQuery); - createQuery = "CREATE TABLE datetimetest (" + - "col_char CHAR(20)," + - "col_date DATETIME );"; - ExecuteQuery (createQuery); - createQuery = "INSERT INTO datetimetest VALUES ('one', '4/12/2004 4:59:00');" ; - ExecuteQuery (createQuery); - createQuery = "INSERT INTO datetimetest VALUES ('two',null);" ; - ExecuteQuery (createQuery); - createQuery = "INSERT INTO datetimetest (col_char) VALUES ('three');" ; - ExecuteQuery (createQuery); - - - } - - private void CleanTestSetup() - { - if (!isConnAlive) - return; - // delete test database - string dropQuery = "DROP table datetimetest"; - ExecuteQuery(dropQuery); - - } -
-
- [Test]
- public void DateTimeTest () {
- try { - - SqlDataAdapter myadapter = new SqlDataAdapter("select * from datetimetest;",conn); - - DataTable dt = new DataTable(); - myadapter.Fill(dt); - Assertion.AssertEquals ("Row count must be three", 3, dt.Rows.Count ); - }
- - finally { // try/catch is necessary to gracefully close connections
- CleanTestSetup (); // clean test database
- CloseConnection ();
- }
- }
- }
-}
diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog b/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog index 7ecb34c9d29..bd7b77d4f19 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog +++ b/mcs/class/System.Data/Test/System.Data.Odbc/ChangeLog @@ -1,24 +1,3 @@ -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 - -2004-07-28 Umadevi S <sumadevi@novell.com> - * OdbcCommandTest.cs - Added testcase for bug 61968. String values passed with quotes - -2004-07-01 Sureshkumar T <tsureshkumar@novell.com> - * Added test case for OdbcCommand.ExecuteScalar Method - * New files: - OdbcCommandTest.cs - test suite for OdbcCommand class. - 2004-06-23 Sureshkumar T <TSureshkumar@novell.com> * Added test to check whether the OdbcConnection.Close method closes all the handles. diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs deleted file mode 100644 index f46cf29c6c7..00000000000 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs +++ /dev/null @@ -1,113 +0,0 @@ -//
-// OdbcCommandTest.cs - NUnit Test Cases for testing the
-// OdbcCommand class
-//
-// Authors:
-// Sureshkumar T (TSureshkumar@novell.com)
-// 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.Odbc;
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data.Odbc
-{
-
- [TestFixture]
- public class OdbcCommandTest : MySqlOdbcBaseClient
- {
-
- [SetUp]
- public void GetReady () {
- OpenConnection ();
- CreateTestSetup (); // create database & test tables
- }
-
- [TearDown]
- public void Clean () {
- CleanTestSetup (); // clean test database;
- CloseConnection ();
- }
-
- /// <summary>
- /// Test Execute Scalar Method
- /// </summary>
- [Test]
- public void ExecuteScalarTest ()
- {
- OdbcCommand cmd = conn.CreateCommand ();
- string query = "select count(*) from test order by col_int;";
- cmd.CommandText = query;
- object objCount = cmd.ExecuteScalar ();
- Assertion.AssertEquals( "ExecuteScalar does not return int type", 5, Convert.ToInt32(objCount));
- }
-
- /// <summary>
- /// Test String parameters to ODBC Command
- /// </summary>
- [Test]
- public void ExecuteStringParameterTest()
- {
-
- OdbcCommand dbcmd = new OdbcCommand();
- dbcmd.Connection = conn;
- dbcmd.CommandType = CommandType.Text;
- dbcmd.CommandText = "select count(*) from test where col_char=?;";
- string colvalue = "mono test#1";
- dbcmd.Parameters.Add("@un",colvalue);
- Object obj = dbcmd.ExecuteScalar();
- Assertion.AssertEquals( "String parameter not passed correctly",1,Convert.ToInt32(obj));
-
-
- }
-
- /// <summary>
- /// Test ExecuteNonQuery
- /// </summary>
- [Test]
- public void ExecuteNonQueryTest ()
- {
-
- OdbcCommand dbcmd = new OdbcCommand();
- dbcmd.Connection = conn;
- dbcmd.CommandType = CommandType.Text;
- dbcmd.CommandText = "select count(*) from test where col_char=?;";
- string colvalue = "mono test";
- dbcmd.Parameters.Add("@un",colvalue);
- int ret = dbcmd.ExecuteNonQuery();
- Assertion.AssertEquals( "ExecuteNonQuery not working",-1, ret);
- dbcmd = new OdbcCommand();
- dbcmd.Connection = conn;
- dbcmd.CommandType = CommandType.Text;
- dbcmd.CommandText = "delete from test where (col_int >257);";
- ret = dbcmd.ExecuteNonQuery();
- 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 b8ceeafbbbb..0017b818681 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataReaderTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataReaderTest.cs @@ -231,106 +231,5 @@ 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 & 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 deleted file mode 100644 index 9d58e4c977a..00000000000 --- a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandTest.cs +++ /dev/null @@ -1,99 +0,0 @@ -//
-// 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..941f5db4a6c 100644 --- a/mcs/class/System.Drawing/System.Drawing/ChangeLog +++ b/mcs/class/System.Drawing/System.Drawing/ChangeLog @@ -1,7 +1,3 @@ -2004-07-02 Jordi Mas i Hernandez <jordi@ximian.com> - - * gdipFunctions.cs: fixes bug 61050 - 2004-06-24 Sanjay Gupta <gsanjay@novell.com> * ImageAnimator.cs: Rewrote complete implementation. diff --git a/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs b/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs index 5244cd50235..8db7223a85c 100644 --- a/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs +++ b/mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs @@ -1418,11 +1418,7 @@ namespace System.Drawing { public Stream stream; - public GdiPlusStreamHelper (Stream s) - { - stream = s; - stream.Seek(0, SeekOrigin.Begin); - } + public GdiPlusStreamHelper (Stream s) { stream = s; } public int StreamGetBytesImpl (IntPtr buf, int bufsz, bool peek) { diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog index a638962017f..42d69cb17d6 100644 --- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog +++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog @@ -1,8 +1,3 @@ -2004-07-15 Lluis Sanchez Gual <lluis@novell.com> - - * TcpServerChannel.cs: Set channel name from the provided properties. - This fixes bug #61592. - 2004-05-13 Lluis Sanchez Gual <lluis@ximian.com> * TcpChannel.cs: Made Init private. diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs index 6e3aba6f960..945dff1e278 100644 --- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs +++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs @@ -106,9 +106,6 @@ namespace System.Runtime.Remoting.Channels.Tcp {
switch((string)property.Key)
{
- case "name": - name = property.Value.ToString(); - break; case "port":
port = Convert.ToInt32(property.Value); break;
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/ChangeLog b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/ChangeLog index 47d41efa66e..c2ea35962b2 100644 --- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/ChangeLog +++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/ChangeLog @@ -1,14 +1,3 @@ -2004-07-26 Lluis Sanchez Gual <lluis@ximian.com> - - * SoapMessageFormater.cs: In BuildSoapMessageFromMethodResponse, add the - return value to the SoapMessage even if it is null. This fixes bug #61837. - -2004-07-06 Lluis Sanchez Gual <lluis@ximian.com> - - * SoapMessageFormatter.cs: In BuildMethodCallFromSoapMessage, set get the - parameters from the SoapMessage by position, not by name, since names - may be different. This fixes bug #60427. - 2004-06-16 Lluis Sanchez Gual <lluis@ximian.com> * SoapServerFormatterSink.cs: Removed unneded method. diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs index 2de868c9bee..e0508f1cb82 100644 --- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs +++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs @@ -222,21 +222,21 @@ namespace System.Runtime.Remoting.Channels { // have to add them here
_methodCallParameters = _methodCallInfo.GetParameters();
object[] args = new object[_methodCallParameters.Length];
- int sn = 0;
- for (int n=0; n<_methodCallParameters.Length; n++)
+
+ foreach(ParameterInfo paramInfo in _methodCallParameters)
{
- ParameterInfo paramInfo = _methodCallParameters [n];
Type paramType = (paramInfo.ParameterType.IsByRef ? paramInfo.ParameterType.GetElementType() : paramInfo.ParameterType);
if (paramInfo.IsOut && paramInfo.ParameterType.IsByRef) {
- args [n] = GetNullValue (paramType);
+ args [paramInfo.Position] = GetNullValue (paramType);
}
else{
- object val = soapMessage.ParamValues[sn++];
- if(val is IConvertible)
- args [n] = Convert.ChangeType (val, paramType);
- else
- args [n] = val;
+ int index = Array.IndexOf(soapMessage.ParamNames, paramInfo.Name);
+ if(soapMessage.ParamValues[index] is IConvertible)
+ soapMessage.ParamValues[index] = Convert.ChangeType(
+ soapMessage.ParamValues[index],
+ paramType);
+ args [paramInfo.Position] = soapMessage.ParamValues[index];
}
}
@@ -267,16 +267,10 @@ namespace System.Runtime.Remoting.Channels { ArrayList paramValues = new ArrayList();
ArrayList paramTypes = new ArrayList();
soapMessage.MethodName = mrm.MethodName+"Response";
-
- Type retType = ((MethodInfo)mrm.MethodBase).ReturnType;
-
- if(retType != typeof(void)) {
+ if(mrm.ReturnValue != null && mrm.ReturnValue.GetType() != typeof(void)) {
paramNames.Add("return");
paramValues.Add(mrm.ReturnValue);
- if (mrm.ReturnValue != null)
- paramTypes.Add(mrm.ReturnValue.GetType());
- else
- paramTypes.Add(retType);
+ paramTypes.Add(mrm.ReturnValue.GetType());
}
for(int i = 0; i < mrm.OutArgCount; i++){
diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog b/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog index 4fbb13a002a..a0b692b21d0 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/ChangeLog @@ -1,8 +1,3 @@ -2004-07-20 Atsushi Enomoto <atsushi@ximian.com> - - * Signature.cs : Fixed NextElementPos() that incorrectly examined - node matching. - 2004-06-17 Sebastien Pouliot <sebastien@ximian.com> * KeyInfoX509Data.cs: Removed old internal IssuerSerial for the diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs index 9aab99f8386..72e5088ed38 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/Signature.cs @@ -192,14 +192,13 @@ namespace System.Security.Cryptography.Xml { { while (pos < nl.Count) { if (nl [pos].NodeType == XmlNodeType.Element) { - if (nl [pos].LocalName != name || nl [pos].NamespaceURI != ns) { + if (nl [pos].LocalName != name && nl [pos].NamespaceURI != ns) { if (required) throw new CryptographicException ("Malformed element " + name); else return -2; } - else - return pos; + return pos; } else pos++; 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 9e52d2feea5..0ef4271cdd8 100755 --- a/mcs/class/System.Web.Services/System.Web.Services.Discovery/ChangeLog +++ b/mcs/class/System.Web.Services/System.Web.Services.Discovery/ChangeLog @@ -1,8 +1,3 @@ -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 75fb86b5685..54b2225e8c7 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 (url, stream);
+ XmlTextReader reader = new XmlTextReader (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 21fc58e63cb..e24e2f10c43 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 (url, stream);
+ XmlTextReader reader = new XmlTextReader (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 (url, stream);
+ XmlTextReader reader = new XmlTextReader (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 8b0776c0c38..01f02c69e94 100644 --- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog +++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog @@ -1,13 +1,3 @@ -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 - getting the response, do not wait for the next request to do it. - 2004-06-22 Lluis Sanchez Gual <lluis@ximian.com> * XmlReturnReader.cs, XmlReturnWriter.cs: Generate the serializer with 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 6d03900b5b1..eae97b4a743 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,6 +335,11 @@ 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/HttpWebClientProtocol.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpWebClientProtocol.cs index 722f1d2a681..3be915cfbc8 100644 --- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpWebClientProtocol.cs +++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpWebClientProtocol.cs @@ -45,6 +45,7 @@ namespace System.Web.Services.Protocols { CookieContainer cookieContainer;
IWebProxy proxy;
string userAgent;
+ CookieCollection prevCookies;
#if NET_1_1
bool _unsafeAuthenticated;
@@ -116,25 +117,41 @@ namespace System.Web.Services.Protocols { #region Methods
- internal virtual void CheckForCookies (HttpWebResponse response)
+ internal virtual void AddCookies (Uri uri)
{
- CookieCollection cookies = response.Cookies;
- if (cookieContainer == null || cookies.Count == 0)
+ if (cookieContainer == null)
+ cookieContainer = new CookieContainer ();
+
+ if (prevCookies == null || prevCookies.Count == 0)
return;
CookieCollection coll = cookieContainer.GetCookies (uri);
- foreach (Cookie c in cookies) {
- bool add = true;
- foreach (Cookie prev in coll) {
+ foreach (Cookie prev in prevCookies) {
+ bool dont = false;
+ foreach (Cookie c in coll) {
if (c.Equals (prev)) {
- add = false;
+ dont = true;
break;
}
}
- if (add)
- cookieContainer.Add (c);
+
+ if (dont == false)
+ cookieContainer.Add (prev);
}
}
+
+ internal virtual void CheckForCookies (HttpWebResponse response)
+ {
+ CookieCollection cookies = response.Cookies;
+ if (cookies.Count == 0)
+ return;
+
+ if (prevCookies == null)
+ prevCookies = new CookieCollection ();
+
+ foreach (Cookie c in cookies)
+ prevCookies.Add (c);
+ }
protected override WebRequest GetWebRequest (Uri uri)
{
@@ -147,6 +164,7 @@ namespace System.Web.Services.Protocols { if (clientCertificates != null)
request.ClientCertificates.AddRange (clientCertificates);
+ AddCookies (uri);
request.CookieContainer = cookieContainer;
if (proxy != null)
request.Proxy = proxy;
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 8727e6f2724..a3b82b8eb1a 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,7 +78,13 @@ namespace System.Web.Services.Protocols protected object CreateServerInstance () { - return Activator.CreateInstance (ServiceType); + object ws = Activator.CreateInstance (ServiceType); + WebService wsi = ws as WebService; + if (wsi != null) { + wsi.SetContext (_context); + } + + return ws; } } } diff --git a/mcs/class/System.Web.Services/System.Web.Services/ChangeLog b/mcs/class/System.Web.Services/System.Web.Services/ChangeLog index 019a79b25a1..5bf15ba35e5 100644 --- a/mcs/class/System.Web.Services/System.Web.Services/ChangeLog +++ b/mcs/class/System.Web.Services/System.Web.Services/ChangeLog @@ -1,9 +1,3 @@ -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 b6fc1313056..e6d0db150d1 100644 --- a/mcs/class/System.Web.Services/System.Web.Services/WebService.cs +++ b/mcs/class/System.Web.Services/System.Web.Services/WebService.cs @@ -46,13 +46,17 @@ 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 c05f9a58129..0622988e0fb 100644 --- a/mcs/class/System.Web.Services/Test/standalone/ChangeLog +++ b/mcs/class/System.Web.Services/Test/standalone/ChangeLog @@ -1,7 +1,3 @@ -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 50c8befc415..640f1bdf044 100644 --- a/mcs/class/System.Web.Services/Test/standalone/server/SessionCounter.asmx +++ b/mcs/class/System.Web.Services/Test/standalone/server/SessionCounter.asmx @@ -8,12 +8,6 @@ { 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 a24439fc10b..4a2cb6502af 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,7 +138,6 @@ namespace System.Web.Compilation bool inScript, javascript; ILocation location; bool isApplication; - StringBuilder tagInnerText = new StringBuilder (); static Hashtable emptyHash = new Hashtable (); public AspGenerator (TemplateParser tparser) @@ -320,8 +319,8 @@ namespace System.Web.Compilation if (isvirtual) { file = tparser.MapPath (file); - } else { - file = GetIncludeFilePath (tparser.BaseDir, file); + } else if (!Path.IsPathRooted (file)) { + file = UrlUtils.Combine (tparser.BaseVirtualDir, file); } InitParser (file); @@ -333,14 +332,6 @@ namespace System.Web.Compilation //PrintLocation (location); } - static string GetIncludeFilePath (string basedir, string filename) - { - if (Path.DirectorySeparatorChar == '/') - filename = filename.Replace ("\\", "/"); - - return Path.GetFullPath (Path.Combine (basedir, filename)); - } - void TextParsed (ILocation location, string text) { if (text.IndexOf ("<%") != -1 && !inScript) { @@ -368,11 +359,7 @@ namespace System.Web.Compilation if (tparser.DefaultDirectiveName == "application" && t.Trim () != "") throw new ParseException (location, "Content not valid for application file."); - ControlBuilder current = stack.Builder; - current.AppendLiteralString (t); - if (current.NeedsTagInnerText ()) { - tagInnerText.Append (t); - } + stack.Builder.AppendLiteralString (t); } bool ProcessTag (string tagid, TagAttributes atts, TagType tagtype) @@ -498,16 +485,6 @@ 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/AspParser.cs b/mcs/class/System.Web/System.Web.Compilation/AspParser.cs index 28c357ce3c5..8f199c12de8 100644 --- a/mcs/class/System.Web/System.Web.Compilation/AspParser.cs +++ b/mcs/class/System.Web/System.Web.Compilation/AspParser.cs @@ -184,15 +184,12 @@ namespace System.Web.Compilation str = str.Substring (2).Trim (); int len = str.Length; int lastQuote = str.LastIndexOf ('"'); - if (len < 10 || lastQuote != len - 1) - return false; - - if (!str.ToLower ().StartsWith ("#include ")) + if (len < 10 || lastQuote != len - 1 || !str.StartsWith ("#include ")) return false; str = str.Substring (9).Trim (); - bool isfile = (str.ToLower ().StartsWith ("file")); - if (!isfile && !str.ToLower ().StartsWith ("virtual")) + bool isfile = (str.StartsWith ("file")); + if (!isfile && !str.StartsWith ("virtual")) return false; pathType = (isfile) ? "file" : "virtual"; diff --git a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs index 07578009be5..5036f5db094 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); + Type type = CachingCompiler.GetTypeFromCache (parser.InputFile, parser.ClassName); if (type != null) return type; @@ -309,7 +309,7 @@ namespace System.Web.Compilation bool keepFiles = (Environment.GetEnvironmentVariable ("MONO_ASPNET_NODELETE") != null); TempFileCollection tempcoll = new TempFileCollection (config.TempDirectory, keepFiles); compilerParameters.TempFiles = tempcoll; - string dllfilename = Path.GetFileName (tempcoll.AddExtension ("dll", true)); + string dllfilename = tempcoll.AddExtension ("dll", true); if (!Directory.Exists (dynamicBase)) Directory.CreateDirectory (dynamicBase); diff --git a/mcs/class/System.Web/System.Web.Compilation/BuildProviderResultFlags.cs b/mcs/class/System.Web/System.Web.Compilation/BuildProviderResultFlags.cs deleted file mode 100644 index 3cd3ea5723a..00000000000 --- a/mcs/class/System.Web/System.Web.Compilation/BuildProviderResultFlags.cs +++ /dev/null @@ -1,41 +0,0 @@ -// -// System.Web.Compilation.BuildProviderResultFlags.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 -{ - [Serializable, Flags] - public enum BuildProviderResultFlags - { - Default = 0, - ShutdownAppDomainOnChange = 1 - } -} -#endif diff --git a/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs index 0e6f7d12bbf..bda584c306b 100644 --- a/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs +++ b/mcs/class/System.Web/System.Web.Compilation/CachingCompiler.cs @@ -32,7 +32,6 @@ 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; @@ -44,20 +43,21 @@ namespace System.Web.Compilation { static object compilationLock = new object (); const string cachePrefix = "@@Assembly"; - const string cacheTypePrefix = "@@@Type"; - public static void InsertType (Type type, string filename) + public static Type GetTypeFromCache (string filename, string typename) { - string [] cacheKeys = new string [] { cachePrefix + filename }; - CacheDependency dep = new CacheDependency (null, cacheKeys); - HttpRuntime.Cache.Insert (cacheTypePrefix + filename, type, dep); - } + string key = CachingCompiler.cachePrefix + filename; + CompilerResults results = (CompilerResults) HttpRuntime.Cache [key]; + if (results == null) + return null; - public static Type GetTypeFromCache (string filename) - { - return (Type) HttpRuntime.Cache [cacheTypePrefix + filename]; - } + Assembly a = results.CompiledAssembly; + if (a == null) + return null; + return a.GetType (typename, false); + } + public static CompilerResults Compile (BaseCompiler compiler) { Cache cache = HttpRuntime.Cache; @@ -139,39 +139,12 @@ namespace System.Web.Compilation ICodeCompiler compiler = provider.CreateCompiler (); CompilerParameters options = GetOptions (assemblies); results = compiler.CompileAssemblyFromFile (options, file); - 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)); + string [] deps = (string []) assemblies.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 80c8ae1ffbf..1bd493966e2 100644 --- a/mcs/class/System.Web/System.Web.Compilation/ChangeLog +++ b/mcs/class/System.Web/System.Web.Compilation/ChangeLog @@ -1,42 +1,3 @@ -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 - physical. Fixes bug #61524. - -2004-07-16 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * AspParser.cs: fixed case-sensitivity issues with #include and its - attributes. Closes #61429. - -2004-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * BaseCompiler.cs: - * WebServiceCompiler.cs: really create the dlls under DynamicBase - 2004-06-19 Gonzalo Paniagua Javier <gonzalo@ximian.com> * TemplateControlCompiler.cs: for system colors, use SystemColors class 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 4a57b8055ac..e4a0cb775a1 100644 --- a/mcs/class/System.Web/System.Web.Compilation/Location.cs +++ b/mcs/class/System.Web/System.Web.Compilation/Location.cs @@ -65,27 +65,22 @@ 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 4df2b6b9a94..20b87415730 100644 --- a/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs +++ b/mcs/class/System.Web/System.Web.Compilation/WebServiceCompiler.cs @@ -59,15 +59,12 @@ namespace System.Web.Compilation public override Type GetCompiledType () { - Type type = CachingCompiler.GetTypeFromCache (parser.PhysicalPath); + Type type = CachingCompiler.GetTypeFromCache (parser.PhysicalPath, parser.ClassName); if (type != null) return type; - if (parser.Program.Trim () == "") { - type = parser.GetTypeFromBin (parser.ClassName); - CachingCompiler.InsertType (type, parser.PhysicalPath); - return type; - } + if (parser.Program.Trim () == "") + return parser.GetTypeFromBin (parser.ClassName); string lang = parser.Language; CompilationConfiguration config; @@ -96,7 +93,7 @@ namespace System.Web.Compilation sw.WriteLine (parser.Program); sw.Close (); - string dllfilename = Path.GetFileName (tempcoll.AddExtension ("dll", true)); + string dllfilename = tempcoll.AddExtension ("dll", true); if (!Directory.Exists (dynamicBase)) Directory.CreateDirectory (dynamicBase); @@ -109,9 +106,7 @@ namespace System.Web.Compilation "No assembly returned after compilation!?"); results.TempFiles.Delete (); - type = results.CompiledAssembly.GetType (parser.ClassName, true); - CachingCompiler.InsertType (type, parser.PhysicalPath); - return type; + return results.CompiledAssembly.GetType (parser.ClassName, true); } void CheckCompilerErrors (CompilerResults results) diff --git a/mcs/class/System.Web/System.Web.Configuration/ChangeLog b/mcs/class/System.Web/System.Web.Configuration/ChangeLog index 1347030a0e7..2f67b0fee83 100644 --- a/mcs/class/System.Web/System.Web.Configuration/ChangeLog +++ b/mcs/class/System.Web/System.Web.Configuration/ChangeLog @@ -1,8 +1,3 @@ -2004-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * WebConfigurationSettings.cs: fix bug when processing empty location - tags. Closes bug #63001. - 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com> * AuthorizationConfig.cs: really fix bug #60482. Thanks David! diff --git a/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs b/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs index ee47037cbfa..e00c1921978 100644 --- a/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs +++ b/mcs/class/System.Web/System.Web.Configuration/WebConfigurationSettings.cs @@ -791,13 +791,16 @@ namespace System.Web.Configuration void StoreLocation (string name, XmlTextReader reader) { + if (locations == null) { + locations = new Hashtable (); + } + string path = null; bool haveAllow = false; bool allowOverride = true; - string att = null; while (reader.MoveToNextAttribute ()) { - att = reader.Name; + string att = reader.Name; if (att == "path") { if (path != null) @@ -827,13 +830,8 @@ namespace System.Web.Configuration ThrowException ("Unrecognized attribute.", reader); } - if (att == null) - return; // empty location tag - Location loc = new Location (this, path, allowOverride); - if (locations == null) - locations = new Hashtable (); - else if (locations.ContainsKey (loc.Path)) + if (locations.ContainsKey (loc.Path)) ThrowException ("Duplicated location path: " + loc.Path, reader); reader.MoveToElement (); diff --git a/mcs/class/System.Web/System.Web.Handlers/ChangeLog b/mcs/class/System.Web/System.Web.Handlers/ChangeLog index 50459bd9024..ebddbc1e4ba 100644 --- a/mcs/class/System.Web/System.Web.Handlers/ChangeLog +++ b/mcs/class/System.Web/System.Web.Handlers/ChangeLog @@ -1,7 +1,3 @@ -2004-07-02 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * TraceHandler.cs: check that trace is enabled or throw. - 2004-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com> * TraceHandler.cs: Added protected missing members and attributes. diff --git a/mcs/class/System.Web/System.Web.Handlers/TraceHandler.cs b/mcs/class/System.Web/System.Web.Handlers/TraceHandler.cs index 343aa5957a7..33385dbf5fb 100644 --- a/mcs/class/System.Web/System.Web.Handlers/TraceHandler.cs +++ b/mcs/class/System.Web/System.Web.Handlers/TraceHandler.cs @@ -39,27 +39,16 @@ using System.Web.UI.WebControls; namespace System.Web.Handlers { -#if NET_2_0 - [Serializable] -#endif - class TraceNotAvailableException : HttpException - { - public TraceNotAvailableException () : - base ("Trace Error") {} - - internal override string Description { - get { return "Trace.axd is not enabled in the configuration file for this application."; } - } - } - public class TraceHandler : IHttpHandler { void IHttpHandler.ProcessRequest (HttpContext context) { TraceManager manager = HttpRuntime.TraceManager; - if (!manager.Enabled || manager.LocalOnly && !context.Request.IsLocal) { - throw new TraceNotAvailableException (); + if (manager.LocalOnly && !context.Request.IsLocal) { + // Need to figure out the error message that goes here + // but I only have cassini for testing + return; } HtmlTextWriter output = new HtmlTextWriter (context.Response.Output); diff --git a/mcs/class/System.Web/System.Web.Mail/ChangeLog b/mcs/class/System.Web/System.Web.Mail/ChangeLog index ff65aaa23c4..21478e29bdf 100644 --- a/mcs/class/System.Web/System.Web.Mail/ChangeLog +++ b/mcs/class/System.Web/System.Web.Mail/ChangeLog @@ -1,16 +1,3 @@ -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 - the one used for single part mails instead of being forced to - "text/plain". - 2004-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com> * MailMessage.cs: patch by John Luke that initialized the fields in diff --git a/mcs/class/System.Web/System.Web.Mail/MailMessage.cs b/mcs/class/System.Web/System.Web.Mail/MailMessage.cs index fea1d167846..6531a6d6156 100644 --- a/mcs/class/System.Web/System.Web.Mail/MailMessage.cs +++ b/mcs/class/System.Web/System.Web.Mail/MailMessage.cs @@ -51,6 +51,7 @@ namespace System.Web.Mail private string to;
private string urlContentBase;
private string urlContentLocation; + private Hashtable fields;
// Constructor
public MailMessage ()
@@ -58,9 +59,7 @@ namespace System.Web.Mail attachments = new ArrayList (8);
headers = new ListDictionary ();
bodyEncoding = Encoding.Default; -#if NET_1_1 fields = new Hashtable ();
-#endif }
// Properties
@@ -128,8 +127,6 @@ 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 270892aab93..17bd581675b 100644 --- a/mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs +++ b/mcs/class/System.Web/System.Web.Mail/MailMessageWrapper.cs @@ -227,19 +227,6 @@ 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 d77652c1384..25569cfc074 100644 --- a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs +++ b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs @@ -140,7 +140,6 @@ namespace System.Web.Mail { string boundary = MailUtil.GenerateBoundary(); // set the Content-Type header to multipart/mixed - string bodyContentType = msg.Header.ContentType; msg.Header.ContentType = String.Format( "multipart/mixed;\r\n boundary={0}" , boundary ); @@ -152,13 +151,7 @@ namespace System.Web.Mail { smtp.WriteBoundary( boundary ); 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 + partHeader.ContentType = "text/plain"; smtp.WriteHeader( partHeader ); diff --git a/mcs/class/System.Web/System.Web.Security/ChangeLog b/mcs/class/System.Web/System.Web.Security/ChangeLog index 17865abd5bc..cf7612e3ae3 100644 --- a/mcs/class/System.Web/System.Web.Security/ChangeLog +++ b/mcs/class/System.Web/System.Web.Security/ChangeLog @@ -1,12 +1,3 @@ -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 - the cookie if SlidingExpiration is set. Thanks to Jim Pease. - 2004-06-12 Pedro Martínez Juliá <yoros@wanadoo.es> * FormsAuthentication.cs: Undo last change. diff --git a/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs b/mcs/class/System.Web/System.Web.Security/FormsAuthentication.cs index 451cb0dc260..bee8998e76a 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 + (tOld.Expiration - tOld.IssueDate)); + tNew.SetDates (now, now - toExpiration + toIssue); return tNew; } diff --git a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs index ac9f3c31327..f46923ad5b8 100644 --- a/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs +++ b/mcs/class/System.Web/System.Web.Security/FormsAuthenticationModule.cs @@ -82,12 +82,7 @@ namespace System.Web.Security return; FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt (cookie.Value); - if (ticket == null || ticket.Expired) - return; - - if (config.SlidingExpiration) - ticket = FormsAuthentication.RenewTicketIfOld (ticket); - + ticket = FormsAuthentication.RenewTicketIfOld (ticket); context.User = new GenericPrincipal (new FormsIdentity (ticket), new string [0]); cookie.Value = FormsAuthentication.Encrypt (ticket); diff --git a/mcs/class/System.Web/System.Web.SessionState/ChangeLog b/mcs/class/System.Web/System.Web.SessionState/ChangeLog index 3e70b628dc9..58135e9f7d0 100644 --- a/mcs/class/System.Web/System.Web.SessionState/ChangeLog +++ b/mcs/class/System.Web/System.Web.SessionState/ChangeLog @@ -1,8 +1,3 @@ -2004-07-07 Juraj Skripsky <juraj@hotfeet.ch> - - * SessionStateModule.cs: set path in session cookie to application - path. - 2004-06-18 Gert Driesen <drieseng@users.sourceforge.net> * IStateRuntime.cs: added missing marshalling attributes diff --git a/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs b/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs index cbee9af88f8..70c4a566129 100644 --- a/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs +++ b/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs @@ -158,7 +158,7 @@ namespace System.Web.SessionState } else if (isNew) { string id = context.Session.SessionID; HttpCookie cookie = new HttpCookie (CookieName, id); - cookie.Path = UrlUtils.GetDirectory (context.Request.ApplicationPath); + cookie.Path = UrlUtils.GetDirectory (context.Request.Path); context.Response.AppendCookie (cookie); } } diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs b/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs index b003e315524..26a081dc3e0 100755 --- a/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs @@ -192,9 +192,7 @@ namespace System.Web.UI.WebControls if(!Visible || (Visible && !Enabled)) { IsValid = true; - return; } - Control ctrl = Parent; while(ctrl != null) { diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog index aada87a6c2d..cb282d6377a 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog +++ b/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog @@ -1,27 +1,6 @@ -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 - bug #62726. - -2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * BaseValidator.cs: in Validate(), when the control is not visible or - enabled, return inmediately after setting IsValid to true. Fixes bug - #61831. - 2004-06-10 Alon Gazit <along@mainsoft.com> - * WebControl.cs: fixed LoadViewState(). - Creates new attributes state bag only when the current is null. + * WebControl.cs: fixed LoadViewState(). + Creates new attributes state bag only when the current is null. 2004-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com> 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 e2bca533f8f..7cdb7e4fea8 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 documentContent; + return String.Empty; } set { document = null; @@ -189,6 +189,7 @@ namespace System.Web.UI.WebControls GetType().Name)); } + [MonoTODO("security")] private void LoadXpathDoc () { if (documentContent != null && documentContent.Length > 0) { @@ -197,11 +198,12 @@ namespace System.Web.UI.WebControls } if (documentSource != null && documentSource.Length != 0) { - xpathDoc = new XPathDocument (MapPathSecure (documentSource)); + xpathDoc = new XPathDocument (documentSource); return; } } + [MonoTODO("security")] private void LoadTransform () { if (transform != null) 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 445e87143d2..4aaa88a7580 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.cs @@ -2,10 +2,8 @@ // System.Web.UI.WebControls.XmlBuilder.cs // // Author: -// Andreas Nahr (ClassDevelopment@A-SoftTech.com) -// Gonzalo Paniagua Javier (gonzalo@novell.com) +// Andreas Nahr (ClassDevelopment@A-SoftTech.com) // -// Copyright (c) 2004 Novell, Inc. (http://www.novell.com) // // @@ -31,16 +29,14 @@ using System; using System.Collections; -using System.Web.Compilation; using System.Web.UI; -using System.Xml; namespace System.Web.UI.WebControls { - class XmlBuilder : ControlBuilder + internal class XmlBuilder : ControlBuilder { public override void AppendLiteralString (string s) - { + { } public override Type GetChildControlType (string tagName, IDictionary attribs) @@ -53,26 +49,10 @@ namespace System.Web.UI.WebControls return true; } + [MonoTODO ("find out what this does and implement")] public override void SetTagInnerText (string text) { - 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); + throw new NotImplementedException (); } } } - diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog index 6337d82a2c2..07d62fd2c33 100644 --- a/mcs/class/System.Web/System.Web.UI/ChangeLog +++ b/mcs/class/System.Web/System.Web.UI/ChangeLog @@ -1,35 +1,3 @@ -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 - auto-attaching events. Fixes bug 61569. - -2004-07-08 Pablo Baena <pbaena@gmail.com> - - * Page.cs: added workaround for __doPostBack script on Netscape 4.xx - -2004-07-02 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * Page.cs: added additional checks for saving/displaying trace data. - - * PageParser.cs: removed checks for trace enabled in configuration - files. - 2004-06-29 Gonzalo Paniagua Javier <gonzalo@ximian.com> * ControlCollection.cs: when clearing the control collection, tell the diff --git a/mcs/class/System.Web/System.Web.UI/Control.cs b/mcs/class/System.Web/System.Web.UI/Control.cs index b2d3ada71f2..97ec7f757fc 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; + private EventHandlerList _events = new EventHandlerList(); 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 93002f71467..9d469ee5f10 100644 --- a/mcs/class/System.Web/System.Web.UI/LiteralControl.cs +++ b/mcs/class/System.Web/System.Web.UI/LiteralControl.cs @@ -1,13 +1,11 @@ -// -// 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) -// +//
+// System.Web.UI.LiteralControl.cs
+//
+// Author:
+// Bob Smith <bob@thestuff.net>
+//
+// (C) Bob Smith
+//
// // Permission is hereby granted, free of charge, to any person obtaining @@ -29,43 +27,41 @@ // 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 - { - 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); - } - } -} - +
+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);
+ }
+ }
+}
diff --git a/mcs/class/System.Web/System.Web.UI/Page.cs b/mcs/class/System.Web/System.Web.UI/Page.cs index 53b89d28854..3887c9c35e0 100755 --- a/mcs/class/System.Web/System.Web.UI/Page.cs +++ b/mcs/class/System.Web/System.Web.UI/Page.cs @@ -526,12 +526,7 @@ public class Page : TemplateControl, IHttpHandler writer.WriteLine ("<script language=\"javascript\">"); writer.WriteLine ("<!--"); writer.WriteLine ("\tfunction __doPostBack(eventTarget, eventArgument) {"); - - if (Request.Browser.Browser == ("Netscape") && Request.Browser.MajorVersion == 4) - writer.WriteLine ("\t\tvar theform = document.{0};", formUniqueID); - else - writer.WriteLine ("\t\tvar theform = document.getElementById ('{0}');", formUniqueID); - + writer.WriteLine ("\t\tvar theform = document.getElementById ('{0}');", formUniqueID); writer.WriteLine ("\t\ttheform.{0}.value = eventTarget;", postEventSourceID); writer.WriteLine ("\t\ttheform.{0}.value = eventArgument;", postEventArgumentID); writer.WriteLine ("\t\ttheform.submit();"); @@ -774,18 +769,11 @@ public class Page : TemplateControl, IHttpHandler private void RenderTrace (HtmlTextWriter output) { - TraceManager traceManager = HttpRuntime.TraceManager; - - if (Trace.HaveTrace && !Trace.IsEnabled || !Trace.HaveTrace && !traceManager.Enabled) + if (!Trace.IsEnabled) return; Trace.SaveData (); - - if (!Trace.HaveTrace && traceManager.Enabled && !traceManager.PageOutput) - return; - - if (!traceManager.LocalOnly || Context.Request.IsLocal) - Trace.Render (output); + Trace.Render (output); } internal void RaisePostBackEvents () diff --git a/mcs/class/System.Web/System.Web.UI/PageParser.cs b/mcs/class/System.Web/System.Web.UI/PageParser.cs index 571edf2997a..816d83c0bc8 100644 --- a/mcs/class/System.Web/System.Web.UI/PageParser.cs +++ b/mcs/class/System.Web/System.Web.UI/PageParser.cs @@ -199,6 +199,13 @@ namespace System.Web.UI } } + TraceConfig traceConfig = (TraceConfig) Context.GetConfig ("system.web/trace"); + if (traceConfig != null) { + trace = traceConfig.Enabled; + if (trace) + haveTrace = true; + } + string tracestr = GetString (atts, "Trace", null); if (tracestr != null) { haveTrace = true; @@ -220,6 +227,13 @@ namespace System.Web.UI "one of the following values: SortByTime, SortByCategory."); } + if (traceConfig != null) { + if (traceConfig.LocalOnly && !Context.Request.IsLocal) { + haveTrace = false; + trace = false; + } + } + errorPage = GetString (atts, "ErrorPage", null); validateRequest = GetBool (atts, "ValidateRequest", PagesConfig.ValidateRequest); clientTarget = GetString (atts, "ClientTarget", null); diff --git a/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs b/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs index d075d404a5c..4c200a93568 100644 --- a/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs +++ b/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.cs @@ -64,10 +64,6 @@ 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; @@ -108,7 +104,8 @@ namespace System.Web.UI ParseDirective (trimmed); directiveFound = true; if (gotDefault) { - cachedType = CachingCompiler.GetTypeFromCache (physPath); + cachedType = CachingCompiler.GetTypeFromCache (physPath, + className); if (cachedType != null) break; } diff --git a/mcs/class/System.Web/System.Web.UI/TemplateControl.cs b/mcs/class/System.Web/System.Web.UI/TemplateControl.cs index 1014c3792f9..7b1e85f94fb 100755 --- a/mcs/class/System.Web/System.Web.UI/TemplateControl.cs +++ b/mcs/class/System.Web/System.Web.UI/TemplateControl.cs @@ -106,12 +106,6 @@ namespace System.Web.UI { if (method == null) continue; - if (method.DeclaringType != type) { - if (!method.IsPublic && !method.IsFamilyOrAssembly && - !method.IsFamilyAndAssembly && !method.IsFamily) - continue; - } - if (method.ReturnType != typeof (void)) continue; diff --git a/mcs/class/System.Web/System.Web.UI/TemplateParser.cs b/mcs/class/System.Web/System.Web.UI/TemplateParser.cs index 55d98c7cb6b..ebceb6394fe 100755 --- a/mcs/class/System.Web/System.Web.UI/TemplateParser.cs +++ b/mcs/class/System.Web/System.Web.UI/TemplateParser.cs @@ -435,6 +435,7 @@ 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.Util/ChangeLog b/mcs/class/System.Web/System.Web.Util/ChangeLog index f293a48cb13..4d57c166561 100644 --- a/mcs/class/System.Web/System.Web.Util/ChangeLog +++ b/mcs/class/System.Web/System.Web.Util/ChangeLog @@ -1,8 +1,3 @@ -2004-07-20 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * UrlUtils.cs: don't pass double slash when the path begins with a - tilde. Fixes bug #61654. - 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com> * UrlUtils.cs: diff --git a/mcs/class/System.Web/System.Web.Util/UrlUtils.cs b/mcs/class/System.Web/System.Web.Util/UrlUtils.cs index a8f60ff3159..955c8d9a17b 100644 --- a/mcs/class/System.Web/System.Web.Util/UrlUtils.cs +++ b/mcs/class/System.Web/System.Web.Util/UrlUtils.cs @@ -154,11 +154,7 @@ namespace System.Web.Util slash = "/"; } - string appvpath = HttpRuntime.AppDomainAppVirtualPath; - if (appvpath.EndsWith ("/")) - slash = ""; - - return Reduce (appvpath + slash + relPath); + return Reduce (HttpRuntime.AppDomainAppVirtualPath + slash + relPath); } return Reduce (basePath + slash + relPath); diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog index 6991c65dbe1..93cc846bb86 100644 --- a/mcs/class/System.Web/System.Web/ChangeLog +++ b/mcs/class/System.Web/System.Web/ChangeLog @@ -1,66 +1,3 @@ -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 - request being executed. - -2004-07-21 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpApplication.cs: the file not found might be a dependency. - -2004-07-20 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpCookie.cs: use invariant when formatting expires date. Fixes bug - #61690. - -2004-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpApplication.cs: don't keep the session around if we got it from - the context. Fixes bug #61232. - -2004-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpUtility.cs: fixed stupid bug in UrlDecode from bytes. Closes bug - #61181. - -2004-07-02 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * TraceContext.cs: added internal HaveTrace property whose - value is true when the page has a Trace attribute. - 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com> * TraceData.cs: fixed <br> output. Closes bug #60181. diff --git a/mcs/class/System.Web/System.Web/HttpApplication.cs b/mcs/class/System.Web/System.Web/HttpApplication.cs index 37599a8e1f0..0f8aaa3759b 100644 --- a/mcs/class/System.Web/System.Web/HttpApplication.cs +++ b/mcs/class/System.Web/System.Web/HttpApplication.cs @@ -639,7 +639,6 @@ namespace System.Web { bool ready_sync = false; IStateHandler handler; - bool timeoutPossible = false; lock (_app) { _app.OnStateExecuteEnter (); @@ -663,10 +662,6 @@ 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++; @@ -675,9 +670,6 @@ namespace System.Web if (null != lasterror) _app.HandleError (lasterror); } finally { - if (timeoutPossible) - HttpRuntime.TimeoutManager.Remove (_app.Context); - _app.OnStateExecuteLeave (); } } @@ -813,12 +805,7 @@ namespace System.Web return ret; } catch (DirectoryNotFoundException) { throw new HttpException (404, "Cannot find '" + file + "'."); - } catch (FileNotFoundException fnf) { - string fname = fnf.FileName; - if (fname != null && fname != "") { - file = Path.GetFileName (fname); - } - + } catch (FileNotFoundException) { throw new HttpException (404, "Cannot find '" + file + "'."); } } @@ -901,12 +888,14 @@ 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 (); } @@ -1156,8 +1145,10 @@ namespace System.Web if (null != _Session) return _Session; - if (null != _Context && null != _Context.Session) - return _Context.Session; + if (null != _Context && null != _Context.Session) { + _Session = _Context.Session; + return _Session; + } throw new HttpException ("Failed to get session object"); } diff --git a/mcs/class/System.Web/System.Web/HttpCookie.cs b/mcs/class/System.Web/System.Web/HttpCookie.cs index c121772be1b..32fdf84261b 100644 --- a/mcs/class/System.Web/System.Web/HttpCookie.cs +++ b/mcs/class/System.Web/System.Web/HttpCookie.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // using System; -using System.Globalization; using System.Text; using System.Web; using System.Collections.Specialized; @@ -99,9 +98,7 @@ namespace System.Web if (_ExpiresSet && _Expires != DateTime.MinValue) { oSetCookie.Append ("; expires="); - DateTime ut = _Expires.ToUniversalTime (); - oSetCookie.Append (ut.ToString ("ddd, dd-MMM-yyyy HH':'mm':'ss 'GMT'", - DateTimeFormatInfo.InvariantInfo)); + oSetCookie.Append (_Expires.ToUniversalTime ().ToString ("ddd, dd-MMM-yyyy HH':'mm':'ss '+0000'")); } if (_Secure) diff --git a/mcs/class/System.Web/System.Web/HttpRuntime.cs b/mcs/class/System.Web/System.Web/HttpRuntime.cs index 9ebbf381c93..f48797c3815 100644 --- a/mcs/class/System.Web/System.Web/HttpRuntime.cs +++ b/mcs/class/System.Web/System.Web/HttpRuntime.cs @@ -76,6 +76,12 @@ namespace System.Web { static HttpRuntime () { + appPathDiscoveryStackWalk = null; + ctrlPrincipalStackWalk = null; + sensitiveInfoStackWalk = null; + unmgdCodeStackWalk = null; + unrestrictedStackWalk = null; + _runtime = new HttpRuntime (); _runtime.Init(); } @@ -179,8 +185,6 @@ namespace System.Web { context.Response.FinalFlush (); } - /* - * This is not being used. OnFirstRequestEnd is empty. if (!_firstRequestExecuted) { lock (this) { if (!_firstRequestExecuted) { @@ -189,7 +193,6 @@ namespace System.Web { } } } - */ Interlocked.Decrement(ref _activeRequests); @@ -234,7 +237,6 @@ 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); } @@ -277,10 +279,10 @@ namespace System.Web { if (!_firstRequestStarted) { lock (this) { if (!_firstRequestStarted) { + _firstRequestStarted = true; _firstRequestStartTime = DateTime.Now; OnFirstRequestStart(context); - _firstRequestStarted = true; - } + } } } @@ -315,32 +317,37 @@ 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; + } - HttpWorkerRequest wr = queueManager.GetNextRequest (null); - if (wr == null) + if (queueManager == 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"); - - QueueManager mgr = _runtime.queueManager; - if (_runtime._firstRequestStarted && mgr != null) { - request = mgr.GetNextRequest (request); - // We're busy, return immediately - if (request == null) - return; - } + if (Request == null) + throw new ArgumentNullException ("Request"); - _runtime.InternalExecuteRequest (request); + if (!_runtime._firstRequestExecuted || _runtime.queueManager.CanExecuteRequest (false)) { + _runtime.InternalExecuteRequest (Request); + } else { + _runtime.queueManager.Queue (Request); + } } #if NET_1_1 @@ -500,7 +507,7 @@ namespace System.Web { [MonoTODO ("GetResourceStringFromResourceManager (string)")] private string GetResourceStringFromResourceManager (string key) { - return key; + return "String returned by HttpRuntime.GetResourceStringFromResourceManager"; } #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..5fb510baf46 100644 --- a/mcs/class/System.Web/System.Web/HttpServerUtility.cs +++ b/mcs/class/System.Web/System.Web/HttpServerUtility.cs @@ -46,7 +46,6 @@ using System.Collections.Specialized; using System.IO; using System.Text; using System.Web.Hosting; -using System.Web.Util; namespace System.Web { @@ -200,7 +199,7 @@ namespace System.Web HttpRequest request = _Context.Request; string oldFilePath = request.FilePath; - request.SetFilePath (UrlUtils.Combine (_Context.Request.BaseVirtualDir, path)); + request.SetFilePath (path); string oldQuery = request.QueryStringRaw; if (!preserveQuery) request.QueryStringRaw = query; diff --git a/mcs/class/System.Web/System.Web/HttpUtility.cs b/mcs/class/System.Web/System.Web/HttpUtility.cs index d1a2d0dbb07..d70b32d8f92 100644 --- a/mcs/class/System.Web/System.Web/HttpUtility.cs +++ b/mcs/class/System.Web/System.Web/HttpUtility.cs @@ -444,7 +444,7 @@ namespace System.Web { int value = 0;
int end = length + offset;
for (int i = offset; i < end; i++)
- value = (value << 4) + GetInt (bytes [i]);
+ value = (value << 4) + GetInt (bytes [offset]);
return (char) value;
}
@@ -474,10 +474,10 @@ namespace System.Web { output.Append (GetChars (acc, e));
acc.SetLength (0);
}
- output.Append (GetChar (bytes, i + 2, 4));
+ output.Append (GetChar (bytes, offset + 2, 4));
i += 5;
} else {
- acc.WriteByte ((byte) GetChar (bytes, i + 1, 2));
+ acc.WriteByte ((byte) GetChar (bytes, offset + 1, 2));
i += 2;
}
continue;
diff --git a/mcs/class/System.Web/System.Web/HttpValueCollection.cs b/mcs/class/System.Web/System.Web/HttpValueCollection.cs index e8ba4e3a0db..946b8542d46 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 (); } - public override string ToString () + virtual new public 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 29ec8a91cc4..a3f8f621d90 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,2004 Novell, Inc (http://www.novell.com) +// (C) 2003 Novell, Inc (http://www.novell.com) // // @@ -53,57 +53,35 @@ namespace System.Web queue = new Queue (queueLimit); } - // TODO: handle local connections, just check for 127.0.0.1 - bool CanExecuteRequest () + // TODO: handle local connections + public bool CanExecuteRequest (bool local) { 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 HttpWorkerRequest GetNextRequest (HttpWorkerRequest req) + + public void Queue (HttpWorkerRequest wr) { - if (!CanExecuteRequest ()) { - if (req != null) { - lock (queue) { - Queue (req); - } - } - - return null; - } - - HttpWorkerRequest result; lock (queue) { - result = Dequeue (); - if (result != null) { - if (req != null) - Queue (req); - } else { - result = req; + if (queue.Count < queueLimit) { + queue.Enqueue (wr); + return; } } - return result; - } - - void Queue (HttpWorkerRequest wr) - { - if (queue.Count < queueLimit) { - queue.Enqueue (wr); - return; - } - HttpRuntime.FinishUnavailable (wr); } - HttpWorkerRequest Dequeue () + public HttpWorkerRequest Dequeue () { - if (queue.Count > 0) - return (HttpWorkerRequest) queue.Dequeue (); + lock (queue) { + if (queue.Count > 0) + return (HttpWorkerRequest) queue.Dequeue (); + } return null; } @@ -115,7 +93,7 @@ namespace System.Web disposing = true; HttpWorkerRequest wr; - while ((wr = GetNextRequest (null)) != null) + while ((wr = Dequeue ()) != 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 f4ad22af99d..6d7a7c68608 100644 --- a/mcs/class/System.Web/System.Web/TraceContext.cs +++ b/mcs/class/System.Web/System.Web/TraceContext.cs @@ -42,31 +42,20 @@ namespace System.Web { private TraceMode _Mode;
private TraceData data;
private bool data_saved;
- private bool _haveTrace; public TraceContext(HttpContext Context) {
_Context = Context;
_Enabled = false;
}
- - - internal bool HaveTrace { - get { - return _haveTrace; - } - } public bool IsEnabled {
get {
- if (!_haveTrace) - return HttpRuntime.TraceManager.Enabled; return _Enabled;
}
set {
if (value && data == null)
data = new TraceData ();
- _haveTrace = true; _Enabled = value;
}
}
@@ -106,7 +95,7 @@ namespace System.Web { }
private void Write(string category, string msg, Exception error, bool Warning) {
- if (!IsEnabled)
+ if (!_Enabled)
return;
if (data == null)
data = new TraceData ();
diff --git a/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog b/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog index c7d9e126328..053dc02ede2 100644 --- a/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog +++ b/mcs/class/System.XML/Mono.Xml.XPath/ChangeLog @@ -1,10 +1,3 @@ -2004-07-30 Atsushi Enomoto <atsushi@ximian.com> - - * DTMXPathNavigator.cs : - Fixed IsSamePosition(). currentAttr is not always the same as - that of other when current is not attribute. Ditto for currentNS - (when current is not namespace). - 2004-06-06 Atsushi Enomoto <atsushi@ximian.com> * DTMXPathDocumentBuilder.cs : Close XmlTextReader strictly. It might diff --git a/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs b/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs index 6bd8a339a0e..abd904bc987 100644 --- a/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs +++ b/mcs/class/System.XML/Mono.Xml.XPath/DTMXPathNavigator.cs @@ -366,16 +366,11 @@ namespace Mono.Xml.XPath if (another == null || another.document != this.document) return false; - if (this.currentNode != another.currentNode || - this.currentIsAttr != another.currentIsAttr || - this.currentIsNode != another.currentIsNode) - return false; - - if (currentIsAttr) - return this.currentAttr == another.currentAttr; - else if (!currentIsNode) - return this.currentNs == another.currentNs; - return true; + return this.currentNode == another.currentNode && + this.currentAttr == another.currentAttr && + this.currentIsAttr == another.currentIsAttr && + this.currentIsNode == another.currentIsNode && + this.currentNs == another.currentNs; } public override bool MoveTo (XPathNavigator other) diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog index f8ba6ca28e1..ece4b875d31 100644 --- a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog +++ b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog @@ -1,8 +1,3 @@ - -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 87438fa2bb0..0a5d72ed4cb 100755 --- a/mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs +++ b/mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs @@ -216,6 +216,12 @@ 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"; @@ -225,17 +231,9 @@ end namespace this.DefaultCompilerOptions = "/t:library /r:Microsoft.VisualBasic.dll"; } - 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 CodeDomProvider CodeDomProvider {
+ get { return (CodeDomProvider) Activator.CreateInstance (providerType); }
+ }
public override string Extension { get { return ".js"; } diff --git a/mcs/class/System.XML/System.Xml.Schema/ChangeLog b/mcs/class/System.XML/System.Xml.Schema/ChangeLog index c16cf1a9f1f..14dd692e892 100755 --- a/mcs/class/System.XML/System.Xml.Schema/ChangeLog +++ b/mcs/class/System.XML/System.Xml.Schema/ChangeLog @@ -1,8 +1,3 @@ -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/XmlSchema.cs b/mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs index 6e37d9f3be6..59e28520089 100755 --- a/mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs +++ b/mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs @@ -369,10 +369,7 @@ namespace System.Xml.Schema if (resolver != null) {
url = GetResolvedUri (resolver, ext.SchemaLocation);
if (schemaLocationStack.Contains (url)) {
- // Just skip nested inclusion.
- // The spec is "carefully written"
- // not to handle it as an error.
- // error (handler, "Nested inclusion was found: " + url);
+ 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 ded7e921c04..f98edd97e7f 100755 --- a/mcs/class/System.XML/System.Xml.Serialization/ChangeLog +++ b/mcs/class/System.XML/System.Xml.Serialization/ChangeLog @@ -1,14 +1,3 @@ -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 - xsd type is not part of the last schema specification, but the google api - uses it and ms.net accepts it. - 2004-06-22 Lluis Sanchez Gual <lluis@ximian.com> * ReflectionHelper.cs: Correctly detect private types. diff --git a/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs b/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs index fc71eeea981..cffcb1567a1 100644 --- a/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs +++ b/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs @@ -106,7 +106,6 @@ namespace System.Xml.Serialization primitiveTypes.Add ("token", new TypeData (typeof (string), "token", true)); primitiveTypes.Add ("normalizedString", new TypeData (typeof (string), "normalizedString", true)); primitiveTypes.Add ("anyURI", new TypeData (typeof (string), "anyURI", true)); - primitiveTypes.Add ("base64", new TypeData (typeof (byte[]), "base64", true)); } public static TypeData GetTypeData (Type type) diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs index 60b4f282cab..17514268a90 100644 --- a/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs +++ b/mcs/class/System.XML/System.Xml.Serialization/XmlCustomFormatter.cs @@ -195,7 +195,6 @@ namespace System.Xml.Serialization { case "unsignedInt": return XmlConvert.ToString ((UInt32)value); case "unsignedLong": return XmlConvert.ToString ((UInt64)value); case "guid": return XmlConvert.ToString ((Guid)value); - case "base64": case "base64Binary": return Convert.ToBase64String ((byte[])value); default: return value is IFormattable ? ((IFormattable) value).ToString (null, CultureInfo.InvariantCulture) : value.ToString (); } @@ -224,7 +223,6 @@ namespace System.Xml.Serialization { case "unsignedInt": return XmlConvert.ToUInt32 (value); case "unsignedLong": return XmlConvert.ToUInt64 (value); case "guid": return XmlConvert.ToGuid (value); - case "base64": case "base64Binary": return Convert.FromBase64String (value); default: if (type.Type != null) @@ -255,7 +253,6 @@ namespace System.Xml.Serialization { case "unsignedInt": return value + ".ToString(CultureInfo.InvariantCulture)"; case "unsignedLong": return value + ".ToString(CultureInfo.InvariantCulture)"; case "guid": return "XmlConvert.ToString (" + value + ")"; - case "base64": case "base64Binary": return "Convert.ToBase64String (" + value + ")"; case "NMTOKEN": case "Name": @@ -293,7 +290,6 @@ namespace System.Xml.Serialization { case "unsignedInt": return "UInt32.Parse (" + value + ", CultureInfo.InvariantCulture)"; case "unsignedLong": return "UInt64.Parse (" + value + ", CultureInfo.InvariantCulture)"; case "guid": return "XmlConvert.ToGuid (" + value + ")"; - case "base64:": case "base64Binary": return "Convert.FromBase64String (" + value + ")"; default: return value; } diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs index aa57189fb34..d5efa65c1d3 100644 --- a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs +++ b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs @@ -251,14 +251,12 @@ 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 6da24f7f434..04516da68e3 100644 --- a/mcs/class/System.XML/System.Xml/ChangeLog +++ b/mcs/class/System.XML/System.Xml/ChangeLog @@ -1,57 +1,3 @@ -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. - This fixes bug #63574. - -2004-08-20 Atsushi Enomoto <atsushi@ximian.com> - - ResetState() now throws InvalidOperationException() as MS.NET does. - -2004-08-20 Atsushi Enomoto <atsushi@ximian.com> - - * XmlTextReader.cs : Fixed EOF not to return true when it is just - closed. Element and EndElement location is now adjusted to be the - same as MS.NET does. This fixes bug #63505 and #63507. - -2004-07-28 Lluis Sanchez Gual <lluis@novell.com> - - * XmlTextReader.cs: Stop parsing when a null character is found. - -2004-07-20 Atsushi Enomoto <atsushi@ximian.com> - - * XmlNode.cs : When the argument node being inserted is the existing - document element, it should not result in an error (since it should - be first removed from document, thus no error should happen). - -2004-07-16 Atsushi Enomoto <atsushi@ximian.com> - - * XmlTextReader.cs : Fixed several problems on ReadBase64(); - Whitespaces should be ignored, and '=' was not skipped correctly. - It caused "unexpected end of document" error at immediate close tag. - 2004-06-18 Atsushi Enomoto <atsushi@ximian.com> * DTDObjectModel.cs, DTDReader.cs, XmlConvert.cs, XmlDocument.cs, diff --git a/mcs/class/System.XML/System.Xml/XmlAttribute.cs b/mcs/class/System.XML/System.Xml/XmlAttribute.cs index d02dee88e5c..f5bfcc958a0 100644 --- a/mcs/class/System.XML/System.Xml/XmlAttribute.cs +++ b/mcs/class/System.XML/System.Xml/XmlAttribute.cs @@ -104,7 +104,9 @@ namespace System.Xml #region Properties public override string BaseURI { - get { return OwnerElement != null ? OwnerElement.BaseURI : String.Empty; } + get { + return OwnerElement.BaseURI; + } } public override string InnerText { @@ -173,7 +175,9 @@ namespace System.Xml } public virtual XmlElement OwnerElement { - get { return ownerElement; } + get { + return ownerElement; + } } public override XmlNode ParentNode { @@ -244,11 +248,11 @@ namespace System.Xml } internal override string XmlLang { - get { return OwnerElement != null ? OwnerElement.XmlLang : String.Empty; } + get { return OwnerElement.XmlLang; } } internal override XmlSpace XmlSpace { - get { return OwnerElement != null ? OwnerElement.XmlSpace : XmlSpace.None; } + get { return OwnerElement.XmlSpace; } } #endregion @@ -294,9 +298,6 @@ 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/XmlElement.cs b/mcs/class/System.XML/System.Xml/XmlElement.cs index f506853124d..a74d801671c 100644 --- a/mcs/class/System.XML/System.Xml/XmlElement.cs +++ b/mcs/class/System.XML/System.Xml/XmlElement.cs @@ -115,11 +115,13 @@ namespace System.Xml } set { // Why its behavior (of MS FCL) is different from InnerXml...? - if (ChildNodes != null && ChildNodes.Count == 1 && FirstChild.NodeType == XmlNodeType.Text) + if (FirstChild != null && FirstChild.NodeType == XmlNodeType.Text) FirstChild.Value = value; else { - while (FirstChild != null) - this.RemoveChild (FirstChild); + if (FirstChild != null) { + for (int i = 0; i < ChildNodes.Count; i++) + this.RemoveChild (ChildNodes [i]); + } // creates new Text node AppendChild (OwnerDocument.CreateTextNode (value)); } diff --git a/mcs/class/System.XML/System.Xml/XmlNode.cs b/mcs/class/System.XML/System.Xml/XmlNode.cs index ef1ec861a31..52c6b21c794 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 : String.Empty; + return (ParentNode != null) ? ParentNode.BaseURI : OwnerDocument.BaseURI; } } @@ -524,7 +524,7 @@ namespace System.Xml throw new ArgumentException ("The reference node is not a child of this node."); } - if(this == ownerDoc && ownerDoc.DocumentElement != null && (newChild is XmlElement) && newChild != ownerDoc.DocumentElement) + if(this == ownerDoc && ownerDoc.DocumentElement != null && (newChild is XmlElement)) throw new XmlException ("multiple document element not allowed."); // checking validity finished. then appending... diff --git a/mcs/class/System.XML/System.Xml/XmlTextReader.cs b/mcs/class/System.XML/System.Xml/XmlTextReader.cs index 221541167bf..ea3b4e9cd51 100644 --- a/mcs/class/System.XML/System.Xml/XmlTextReader.cs +++ b/mcs/class/System.XML/System.Xml/XmlTextReader.cs @@ -176,8 +176,14 @@ namespace System.Xml } #endif - public override bool EOF { - get { return readState == ReadState.EndOfFile; } + public override bool EOF + { + get + { + return + readState == ReadState.EndOfFile || + readState == ReadState.Closed; + } } #if NET_2_0 @@ -525,14 +531,6 @@ namespace System.Xml return false; } - private int SkipIgnorableBase64Chars (char [] chars, int charsLength, int i) - { - while (chars [i] == '=' || XmlChar.IsWhitespace (chars [i])) - if (charsLength == ++i) - break; - return i; - } - public int ReadBase64 (byte [] buffer, int offset, int length) { if (offset < 0) @@ -569,9 +567,7 @@ namespace System.Xml byte b = 0; byte work = 0; - for (int i = 0; i < charsLength - 3; i++) { - if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength) - break; + for (int i = 0; i < charsLength - 3; i += 4) { b = (byte) (GetBase64Byte (chars [i]) << 2); if (bufIndex < bufLast) buffer [bufIndex] = b; @@ -581,11 +577,9 @@ namespace System.Xml base64Cache [0] = b; } // charsLength mod 4 might not equals to 0. - if (++i == charsLength) + if (i + 1 == charsLength) break; - if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength) - break; - b = GetBase64Byte (chars [i]); + b = GetBase64Byte (chars [i + 1]); work = (byte) (b >> 4); if (bufIndex < bufLast) { buffer [bufIndex] += work; @@ -604,11 +598,9 @@ namespace System.Xml base64Cache [1] = work; } - if (++i == charsLength) - break; - if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength) + if (i + 2 == charsLength) break; - b = GetBase64Byte (chars [i]); + b = GetBase64Byte (chars [i + 2]); work = (byte) (b >> 2); if (bufIndex < bufLast) { buffer [bufIndex] += work; @@ -625,11 +617,9 @@ namespace System.Xml base64CacheStartsAt = 2; base64Cache [2] = work; } - if (++i == charsLength) + if (i + 3 == charsLength) break; - if ((i = SkipIgnorableBase64Chars (chars, charsLength, i)) == charsLength) - break; - work = GetBase64Byte (chars [i]); + work = GetBase64Byte (chars [i + 3]); if (bufIndex < bufLast) { buffer [bufIndex] += work; bufIndex++; @@ -682,7 +672,7 @@ namespace System.Xml public void ResetState () { - throw new InvalidOperationException ("Cannot call ResetState when parsing an XML fragment."); + Init (); } public override void ResolveEntity () @@ -1140,11 +1130,8 @@ namespace System.Xml return -1; return PeekChar (); } - else { - char c = peekChars [peekCharsIndex]; - if (c != 0) return c; - else return -1; - } + else + return peekChars [peekCharsIndex]; } private int ReadChar () @@ -1161,8 +1148,6 @@ namespace System.Xml if (ch == '\n') { line++; column = 1; - } else if (ch == 0) { - return -1; } else { column++; } @@ -1298,9 +1283,6 @@ namespace System.Xml "Multiple document element was detected."); currentState = XmlNodeType.Element; - currentLinkedNodeLineNumber = line; - currentLinkedNodeLinePosition = column; - parserContext.NamespaceManager.PushScope (); string name = ReadName (); @@ -1403,9 +1385,6 @@ namespace System.Xml throw new XmlException (this as IXmlLineInfo, "End tag cannot appear in this state."); - currentLinkedNodeLineNumber = line; - currentLinkedNodeLinePosition = column; - string name = ReadName (); if (elementNameStackPos == 0) throw new XmlException (this as IXmlLineInfo,"closing element without matching opening element"); @@ -1548,14 +1527,8 @@ namespace System.Xml ch = ReadReference (false); if (returnEntityReference) // Returns -1 if char validation should not be done break; - } 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 { + } + else { if (XmlChar.IsInvalid (ch)) throw new XmlException (this, "Not allowed character was found."); ch = ReadChar (); @@ -2148,18 +2121,8 @@ namespace System.Xml skip = true; } } - 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."); - } + if (normalization && XmlChar.IsInvalid (ch)) + throw new XmlException (this, "Invalid character was found."); AppendValueChar (ch); } @@ -2585,8 +2548,6 @@ namespace System.Xml return; } - // Since ReadBase64() is processed for every 4 chars, it does - // not handle '=' here. private byte GetBase64Byte (char ch) { switch (ch) { @@ -2594,6 +2555,8 @@ namespace System.Xml return 62; case '/': return 63; + case '=': + return 0; default: if (ch >= 'A' && ch <= 'Z') return (byte) (ch - 'A'); @@ -2614,6 +2577,8 @@ namespace System.Xml return 0; } + shouldSkipUntilEndTag = true; + if (offset < 0) throw new ArgumentOutOfRangeException ("offset", offset, "Offset must be non-negative integer."); else if (length < 0) @@ -2624,8 +2589,6 @@ namespace System.Xml if (NodeType != XmlNodeType.Element) return 0; - shouldSkipUntilEndTag = true; - int bufIndex = offset; for (int i = 0; i < length; i++) { int c = PeekChar (); @@ -2644,9 +2607,9 @@ namespace System.Xml depth++; depthUp = false; } - ReadEndTag (); + ReadEndTag(); shouldSkipUntilEndTag = false; - Read (); // move to the next node + Read (); return i; default: ReadChar (); diff --git a/mcs/class/System.XML/System.Xml/XmlTextWriter.cs b/mcs/class/System.XML/System.Xml/XmlTextWriter.cs index 8e10329bf68..af19e18dc6b 100644 --- a/mcs/class/System.XML/System.Xml/XmlTextWriter.cs +++ b/mcs/class/System.XML/System.Xml/XmlTextWriter.cs @@ -277,9 +277,13 @@ 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 = null; + indentFormatting = ""; documentStarted = true; } @@ -337,7 +341,9 @@ openElements [openElementCount - 1]).IndentingOverriden; private void UpdateIndentChars () { - indentChars = new string (indentChar, indentation); + indentChars = ""; + for (int i = 0; i < indentation; i++) + indentChars += indentChar; } public override void WriteBase64 (byte[] buffer, int index, int count) @@ -529,15 +535,6 @@ 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) @@ -556,7 +553,7 @@ openElements [openElementCount - 1]).IndentingOverriden; if (fullEndElement) { w.Write ('>'); if (!ParentIndentingOverriden) - WriteIndent (); + w.Write (indentFormatting); w.Write ("</"); XmlTextWriterOpenElement el = (XmlTextWriterOpenElement) openElements [openElementCount - 1]; if (el.Prefix != String.Empty) { @@ -571,7 +568,7 @@ openElements [openElementCount - 1]).IndentingOverriden; openElementCount--; openStartElement = false; } else { - WriteIndent (); + w.Write (indentFormatting); w.Write ("</"); XmlTextWriterOpenElement el = (XmlTextWriterOpenElement) openElements [openElementCount - 1]; openElementCount--; @@ -629,7 +626,7 @@ openElements [openElementCount - 1]).IndentingOverriden; CheckState (); CloseStartElement (); - WriteIndent (); + w.Write (indentFormatting); w.Write ("<?"); w.Write (name); w.Write (' '); @@ -837,7 +834,7 @@ openElements [openElementCount - 1]).IndentingOverriden; if (prefix == null) prefix = String.Empty; - WriteIndent (); + w.Write (indentFormatting); 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 7e4fb8d6b28..4f69abaf378 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: - break; // Do nothing, nor reporting errors. + return; // Do nothing, nor reporting errors. default: throw new XmlException ("Unexpected node " + reader.Name + " of type " + reader.NodeType); } diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs index edc8da68872..a09a812bedc 100644 --- a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs +++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs @@ -97,7 +97,7 @@ namespace Mono.CSharp StringCollection assemblies = options.ReferencedAssemblies; foreach (CodeCompileUnit e in ea) { - fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, i.ToString () + ".cs"); + fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, "cs"); FileStream f=new FileStream(fileNames[i],FileMode.OpenOrCreate); StreamWriter s=new StreamWriter(f, Encoding.UTF8); if (e.ReferencedAssemblies != null) { @@ -183,7 +183,7 @@ namespace Mono.CSharp string[] fileNames=new string[sources.Length]; int i=0; foreach (string source in sources) { - fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, i.ToString () + ".cs"); + fileNames [i] = GetTempFileNameWithExtension (options.TempFiles, "cs"); FileStream f=new FileStream(fileNames[i],FileMode.OpenOrCreate); StreamWriter s=new StreamWriter(f); s.Write(source); diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs index c22c8fc653d..4be6da4cf77 100644 --- a/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs +++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeGenerator.cs @@ -503,10 +503,7 @@ namespace Mono.CSharp OutputMemberAccessModifier( attributes ); OutputFieldScopeModifier( attributes ); - if (IsCurrentEnum) - Output.Write(field.Name); - else - OutputTypeNamePair( field.Type, GetSafeName (field.Name) ); + OutputTypeNamePair( field.Type, GetSafeName (field.Name) ); CodeExpression initExpression = field.InitExpression; if ( initExpression != null ) { diff --git a/mcs/class/System/Microsoft.CSharp/ChangeLog b/mcs/class/System/Microsoft.CSharp/ChangeLog index 6fbed3e9cc0..b9e06652430 100644 --- a/mcs/class/System/Microsoft.CSharp/ChangeLog +++ b/mcs/class/System/Microsoft.CSharp/ChangeLog @@ -1,13 +1,3 @@ -2004-07-13 Peter Williams <peter@newton.cx> - - * CSharpCodeCompiler.cs (CompileAssemblyFromDomBatch): Include - counter in the extension so that batch compilations work. - (CompileAssemblyFromSourceBatch): Same. - -2004-07-12 Fawad Halim <fawad@fawad.net> - - * CSharpCodeGenerator.cs : Have GenerateField generate field sans the type for enums. - 2004-06-28 Atsushi Enomoto <atsushi@ximian.com> * CSharpCodeCompiler.cs : (only for windows) First check mcs.bat, then diff --git a/mcs/class/System/System.CodeDom.Compiler/ChangeLog b/mcs/class/System/System.CodeDom.Compiler/ChangeLog index a2f6ee391a4..a91f5c6b3f9 100755 --- a/mcs/class/System/System.CodeDom.Compiler/ChangeLog +++ b/mcs/class/System/System.CodeDom.Compiler/ChangeLog @@ -1,14 +1,3 @@ -2004-08-09 Atsushi Enomoto <atsushi@ximian.com> - - * CodeGenerator.cs : - Don't initialize output more than once. TextWriter is wrapped twice. - -2004-07-15 Peter Williams <peter@newton.cx> - - * CodeGenerator.cs: Have the basic generator create line pragmas - for NamespaceImports, SnippetCompileUnits, and TypeMembers, all of - which had LinePragma members which were going unused. - 2004-06-17 Jackson Harper <jackson@ximian.com> * CompilerError.cs: diff --git a/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs b/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs index b3f563211bb..7d42931b6d1 100755 --- a/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs +++ b/mcs/class/System/System.CodeDom.Compiler/CodeGenerator.cs @@ -392,16 +392,9 @@ namespace System.CodeDom.Compiler { GenerateNamespaceStart (ns); - foreach (CodeNamespaceImport import in ns.Imports) { - if (import.LinePragma != null) - GenerateLinePragmaStart (import.LinePragma); - + foreach (CodeNamespaceImport import in ns.Imports) GenerateNamespaceImport (import); - if (import.LinePragma != null) - GenerateLinePragmaEnd (import.LinePragma); - } - output.WriteLine(); foreach (CodeTypeDeclaration type in ns.Types) { @@ -417,15 +410,8 @@ namespace System.CodeDom.Compiler { protected abstract void GenerateNamespaceImport (CodeNamespaceImport i); protected void GenerateNamespaceImports (CodeNamespace e) { - foreach (CodeNamespaceImport import in e.Imports) { - if (import.LinePragma != null) - GenerateLinePragmaStart (import.LinePragma); - + foreach (CodeNamespaceImport import in e.Imports) GenerateNamespaceImport (import); - - if (import.LinePragma != null) - GenerateLinePragmaEnd (import.LinePragma); - } } protected void GenerateNamespaces (CodeCompileUnit e) @@ -486,14 +472,7 @@ namespace System.CodeDom.Compiler { protected virtual void GenerateSnippetCompileUnit (CodeSnippetCompileUnit e) { - if (e.LinePragma != null) - GenerateLinePragmaStart (e.LinePragma); - output.WriteLine (e.Value); - - if (e.LinePragma != null) - GenerateLinePragmaEnd (e.LinePragma); - } protected abstract void GenerateSnippetExpression (CodeSnippetExpression e); @@ -990,17 +969,11 @@ namespace System.CodeDom.Compiler { private void GenerateType (CodeTypeDeclaration type) { - if (type.LinePragma != null) - GenerateLinePragmaStart (type.LinePragma); - CodeTypeDelegate del = type as CodeTypeDelegate; if (del != null) GenerateDelegate (del); else GenerateNonDelegateType (type); - - if (type.LinePragma != null) - GenerateLinePragmaEnd (type.LinePragma); } private void GenerateDelegate (CodeTypeDelegate type) @@ -1008,6 +981,8 @@ namespace System.CodeDom.Compiler { CodeTypeDeclaration prevType = this.currentType; this.currentType = type; + InitOutput (output, options); + foreach (CodeCommentStatement statement in type.Comments) GenerateCommentStatement (statement); @@ -1024,6 +999,8 @@ namespace System.CodeDom.Compiler { CodeTypeDeclaration prevType = this.currentType; this.currentType = type; + InitOutput (output, options); + foreach (CodeCommentStatement statement in type.Comments) GenerateCommentStatement (statement); @@ -1047,18 +1024,12 @@ namespace System.CodeDom.Compiler { CodeTypeMember prevMember = this.currentMember; this.currentMember = member; - if (prevMember != null && prevMember.LinePragma != null) - GenerateLinePragmaEnd (prevMember.LinePragma); - if (options.BlankLinesBetweenMembers) output.WriteLine (); foreach (CodeCommentStatement statement in member.Comments) GenerateCommentStatement (statement); - if (member.LinePragma != null) - GenerateLinePragmaStart (member.LinePragma); - CodeMemberEvent eventm = member as CodeMemberEvent; if (eventm != null) { @@ -1116,9 +1087,6 @@ namespace System.CodeDom.Compiler { this.currentMember = prevMember; } - - if (currentMember != null && currentMember.LinePragma != null) - GenerateLinePragmaEnd (currentMember.LinePragma); GenerateTypeEnd (type); this.currentType = prevType; diff --git a/mcs/class/System/System.CodeDom/ChangeLog b/mcs/class/System/System.CodeDom/ChangeLog index 4db765c3319..2c818373f8c 100644 --- a/mcs/class/System/System.CodeDom/ChangeLog +++ b/mcs/class/System/System.CodeDom/ChangeLog @@ -1,8 +1,3 @@ -2004-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * CodeEntryPointMethod.cs: patch by Fawad Halim that makes the entry - point method public. - 2004-02-04 Jackson Harper <jackson@ximian.com> * CodeTypeMember.cs: Name is String.Empty if not set. diff --git a/mcs/class/System/System.CodeDom/CodeEntryPointMethod.cs b/mcs/class/System/System.CodeDom/CodeEntryPointMethod.cs index 5a46d2a2a08..4b3b477eb7e 100644 --- a/mcs/class/System/System.CodeDom/CodeEntryPointMethod.cs +++ b/mcs/class/System/System.CodeDom/CodeEntryPointMethod.cs @@ -38,9 +38,5 @@ namespace System.CodeDom public class CodeEntryPointMethod : CodeMemberMethod { - public CodeEntryPointMethod () - { - Attributes = MemberAttributes.Public | MemberAttributes.Static; - } } } diff --git a/mcs/class/System/System.Diagnostics/ChangeLog b/mcs/class/System/System.Diagnostics/ChangeLog index 7496fda092e..392c500d5fc 100644 --- a/mcs/class/System/System.Diagnostics/ChangeLog +++ b/mcs/class/System/System.Diagnostics/ChangeLog @@ -1,17 +1,3 @@ -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 e46ab5b0730..66e22f14b75 100755 --- a/mcs/class/System/System.Diagnostics/Process.cs +++ b/mcs/class/System/System.Diagnostics/Process.cs @@ -50,11 +50,6 @@ 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; @@ -460,10 +455,6 @@ 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); } } @@ -474,10 +465,6 @@ 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); } } @@ -488,10 +475,6 @@ 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); } } @@ -751,9 +734,6 @@ 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 @@ -766,9 +746,6 @@ 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; @@ -777,9 +754,6 @@ 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; @@ -927,7 +901,7 @@ namespace System.Diagnostics { protected override void Dispose(bool disposing) { // Check to see if Dispose has already been called. - if(this.disposed == false) { + if(this.disposed) { this.disposed=true; // If this is a call to Dispose, // dispose all managed resources. @@ -943,21 +917,6 @@ 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 9096cb03094..085d366180a 100755 --- a/mcs/class/System/System.IO/ChangeLog +++ b/mcs/class/System/System.IO/ChangeLog @@ -1,13 +1,3 @@ -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 146411b8e91..21e9bfeaff6 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 ("libfam.so.0")] + [DllImport ("fam")] extern static int FAMOpen (out FAMConnection fc); - [DllImport ("libfam.so.0")] + [DllImport ("fam")] extern static int FAMClose (ref FAMConnection fc); - [DllImport ("libfam.so.0")] + [DllImport ("fam")] extern static int FAMMonitorDirectory (ref FAMConnection fc, string filename, out FAMRequest fr, IntPtr user_data); - [DllImport ("libfam.so.0")] + [DllImport ("fam")] 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 ("libfam.so.0")] + [DllImport ("fam")] 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 deleted file mode 100644 index 56eab5a1eef..00000000000 --- a/mcs/class/System/System.IO/KeventWatcher.cs +++ /dev/null @@ -1,351 +0,0 @@ -// -// 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.Sockets/ChangeLog b/mcs/class/System/System.Net.Sockets/ChangeLog index 7da5dcdae61..3b7aeaf5da9 100644 --- a/mcs/class/System/System.Net.Sockets/ChangeLog +++ b/mcs/class/System/System.Net.Sockets/ChangeLog @@ -1,29 +1,3 @@ -2004-08-04 Dick Porter <dick@ximian.com> - - * Socket.cs: Update Connected state in Select and Poll; this is - when we find out that non-blocking Connects succeed. Fixes bug - 62398. - -2004-07-28 Dick Porter <dick@ximian.com> - - * Socket.cs: ReceiveFrom might not return a valid EndPoint. Patch - by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug 61608. - -2004-07-15 Dick Porter <dick@ximian.com> - - * Socket.cs: Don't try and dereference a null array in Select() - (possible if a descriptor list of length 0 was passed.) Patch by - Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug 61595. - -2004-07-12 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * Socket.cs: if'ed RemoveReferences calls. - -2004-07-09 Dick Porter <dick@ximian.com> - - * Socket.cs: Slight tweak to allow unknown objects to be returned - by GetSocketOption(). - 2004-06-28 Gonzalo Paniagua Javier <gonzalo@ximian.com> * Socket.cs: connect on non-blocking sockets returns EINPROGRESS. Fixes diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs index 88ca77436b5..a7fa184ccae 100644 --- a/mcs/class/System/System.Net.Sockets/Socket.cs +++ b/mcs/class/System/System.Net.Sockets/Socket.cs @@ -422,39 +422,24 @@ namespace System.Net.Sockets throw new SocketException (error); } - /* Make sure the connected state is updated - * for each socket returned from the select; - * for non blocking Connect()s, this is when - * we find out that the connect succeeded. - */ - if(read_list!=null) { read_list.Clear(); - if (read_arr != null) { - for(i=0; i<read_arr.Length; i++) { - read_list.Add(read_arr[i]); - read_arr[i].connected = true; - } + for(i=0; i<read_arr.Length; i++) { + read_list.Add(read_arr[i]); } } if(write_list!=null) { write_list.Clear(); - if (write_arr != null) { - for(i=0; i<write_arr.Length; i++) { - write_list.Add(write_arr[i]); - write_arr[i].connected = true; - } + for(i=0; i<write_arr.Length; i++) { + write_list.Add(write_arr[i]); } } if(err_list!=null) { err_list.Clear(); - if (err_arr != null) { - for(i=0; i<err_arr.Length; i++) { - err_list.Add(err_arr[i]); - err_arr[i].connected = true; - } + for(i=0; i<err_arr.Length; i++) { + err_list.Add(err_arr[i]); } } } @@ -1035,9 +1020,7 @@ namespace System.Net.Sockets if (req == null) throw new ArgumentException ("Invalid IAsyncResult", "result"); - if (supportsAsync && socket_type == SocketType.Stream) - RemoveReference (req); - + RemoveReference (req); if (!result.IsCompleted) result.AsyncWaitHandle.WaitOne(); @@ -1080,9 +1063,7 @@ namespace System.Net.Sockets if (req == null) throw new ArgumentException ("Invalid IAsyncResult", "result"); - if (supportsAsync && socket_type == SocketType.Stream) - RemoveReference (req); - + RemoveReference (req); if (!result.IsCompleted) result.AsyncWaitHandle.WaitOne(); @@ -1150,10 +1131,8 @@ namespace System.Net.Sockets } else if (name==SocketOptionName.AddMembership || name==SocketOptionName.DropMembership) { return((MulticastOption)obj_val); - } else if (obj_val is int) { - return((int)obj_val); } else { - return(obj_val); + return((int)obj_val); } } @@ -1245,15 +1224,6 @@ namespace System.Net.Sockets if (error != 0) throw new SocketException (error); - if (result == true) { - /* Update the connected state; for - * non-blocking Connect()s this is - * when we can find out that the - * connect succeeded. - */ - connected = true; - } - return result; } @@ -1402,17 +1372,10 @@ namespace System.Net.Sockets } connected = true; - - // If sockaddr is null then we're a connection - // oriented protocol and should ignore the - // remote_end parameter (see MSDN - // documentation for Socket.ReceiveFrom(...) ) - if ( sockaddr != null ) { - // Stupidly, EndPoint.Create() is an - // instance method - remote_end = remote_end.Create (sockaddr); - } + // Stupidly, EndPoint.Create() is an + // instance method + remote_end = remote_end.Create (sockaddr); return cnt; } diff --git a/mcs/class/System/System.Net/ChangeLog b/mcs/class/System/System.Net/ChangeLog index 92fa9343ef4..2b470e6423b 100644 --- a/mcs/class/System/System.Net/ChangeLog +++ b/mcs/class/System/System.Net/ChangeLog @@ -1,52 +1,3 @@ -2004-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * Cookie.cs: don't fail when using default constructor. Fixes bug - #62890. - -2004-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpWebResponse.cs: set-cookie and set-cookie2 can be present more - than once and have multiple values. Don't rely on string.split when - parsing cookie values. - - * WebHeaderCollection.cs: same thing for set-cookie and set-cookie2. - Fixed GetValues (it was splitting values that contained a comma) and - changed SetInternal to handle multi-value headers. - - Fixes bug #62744. - -2004-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * WebProxy.cs: fix scheme detection. Patch by Konstantin Triger - (kostat@mainsoft.com). - -2004-07-16 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpWebRequest.cs: detect changes in scheme or port when redirecting. - Fixes las take on bug 61218. - -2004-07-14 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * WebConnection.cs: moved loading of the ssl stream Type to its own - method. Don't create a new ssl stream if we're reusing the connection. - - * WebConnectionStream.cs: ensure the number of bytes copied in ReadAll - is the expected even if the dta from the server has extra bytes. - -2004-07-12 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * WebConnection.cs: - * WebConnectionStream.cs: when the status code is 1xx, 204 or 304, - "responses MUST NOT include a message-body". We tried to read the - stream even when getting those codes and considered the 0 length - read as a failure. - -2004-07-09 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * HttpWebRequest.cs: removed bogus Monitor.Exit. - * WebConnection.cs: use Address instead of RequestUri when checking for - the scheme in order to select the stream type. Fixes bug #61218. - 2004-06-06 Gonzalo Paniagua Javier <gonzalo@ximian.com> * ChunkStream.cs: added ChunkLeft property. diff --git a/mcs/class/System/System.Net/Cookie.cs b/mcs/class/System/System.Net/Cookie.cs index 30ee979fef1..c0235be1f1e 100644 --- a/mcs/class/System/System.Net/Cookie.cs +++ b/mcs/class/System/System.Net/Cookie.cs @@ -57,23 +57,24 @@ namespace System.Net { private static char [] reservedCharsValue = new char [] {';', ','};
private static char [] portSeparators = new char [] {'"', ','};
private static string tspecials = "()<>@,;:\\\"/[]?={} \t"; // from RFC 2965, 2068
- - public Cookie () - { - expires = DateTime.MinValue; - timestamp = DateTime.Now; - domain = ""; - name = ""; - val = ""; - } - - public Cookie (string name, string value) - : this () - { - Name = name; - Value = value; - } - +
+ public Cookie ()
+ : this (String.Empty, String.Empty) {}
+
+ public Cookie (string name, string value)
+ {
+ Name = name;
+ Value = value;
+
+ discard = false;
+ expired = false;
+ secure = false;
+ expires = DateTime.MinValue;
+ timestamp = DateTime.Now;
+ version = 0;
+ domain = "";
+ }
+
public Cookie (string name, string value, string path)
: this (name, value)
{
diff --git a/mcs/class/System/System.Net/HttpWebRequest.cs b/mcs/class/System/System.Net/HttpWebRequest.cs index f20a0747a3f..40dfe26a546 100644 --- a/mcs/class/System/System.Net/HttpWebRequest.cs +++ b/mcs/class/System/System.Net/HttpWebRequest.cs @@ -584,6 +584,7 @@ namespace System.Net initialMethod = method; if (haveRequest) { if (writeStream != null) { + Monitor.Exit (this); asyncWrite.SetCompleted (true, writeStream); asyncWrite.DoCallback (); return asyncWrite; @@ -829,7 +830,7 @@ namespace System.Net throw new WebException ("No Location header found for " + (int) code, WebExceptionStatus.ProtocolError); - Uri prev = actualUri; + string host = actualUri.Host; try { actualUri = new Uri (actualUri, uriString); } catch (Exception) { @@ -838,8 +839,7 @@ namespace System.Net WebExceptionStatus.ProtocolError); } - hostChanged = (actualUri.Scheme != prev.Scheme || actualUri.Host != prev.Host || - actualUri.Port != prev.Port); + hostChanged = (actualUri.Host != host); return true; } diff --git a/mcs/class/System/System.Net/HttpWebResponse.cs b/mcs/class/System/System.Net/HttpWebResponse.cs index 9fcdce33fe3..b38108a1597 100644 --- a/mcs/class/System/System.Net/HttpWebResponse.cs +++ b/mcs/class/System/System.Net/HttpWebResponse.cs @@ -31,7 +31,6 @@ // using System; -using System.Globalization; using System.IO; using System.Net.Sockets; using System.Runtime.Serialization; @@ -316,17 +315,13 @@ namespace System.Net if (webHeaders == null) return; - string [] values = webHeaders.GetValues ("Set-Cookie"); - if (values != null) { - foreach (string va in values) - SetCookie (va); - } + string val = webHeaders ["Set-Cookie"]; + if (val != null && val.Trim () != "") + SetCookie (val); - values = webHeaders.GetValues ("Set-Cookie2"); - if (values != null) { - foreach (string va in values) - SetCookie2 (va); - } + val = webHeaders ["Set-Cookie2"]; + if (val != null && val.Trim () != "") + SetCookie2 (val); } static string [] SplitValue (string input) @@ -343,76 +338,65 @@ namespace System.Net return result; } - void SetCookie (string header) + [MonoTODO ("Parse dates")] + void SetCookie (string cookie_str) { - string [] name_values = header.Trim ().Split (';'); - int length = name_values.Length; + string[] parts = null; + Collections.Queue options = null; Cookie cookie = null; - int pos; - for (int i = 0; i < length; i++) { - pos = 0; - string name_value = name_values [i].Trim (); - string name = GetCookieName (name_value, name_value.Length, ref pos); - string value = GetCookieValue (name_value, name_value.Length, ref pos); - if (cookie == null) { - cookie = new Cookie (name, value); - continue; - } - name = name.ToUpper (); - switch (name) { - case "COMMENT": - if (cookie.Comment == null) - cookie.Comment = value; + options = new Collections.Queue (cookie_str.Split (';')); + parts = SplitValue ((string) options.Dequeue()); // NAME=VALUE must be first + + cookie = new Cookie (parts[0], parts[1]); + + while (options.Count > 0) { + parts = SplitValue ((string) options.Dequeue()); + switch (parts [0]) { + case "COMMENT": + if (cookie.Comment == null) + cookie.Comment = parts[1]; break; - case "COMMENTURL": - if (cookie.CommentUri == null) - cookie.CommentUri = new Uri (value); + case "COMMENTURL": + if (cookie.CommentUri == null) + cookie.CommentUri = new Uri(parts[1]); break; - case "DISCARD": - cookie.Discard = true; + case "DISCARD": + cookie.Discard = true; break; - case "DOMAIN": - if (cookie.Domain == "") - cookie.Domain = value; + case "DOMAIN": + if (cookie.Domain == "") + cookie.Domain = parts[1]; break; - case "MAX-AGE": // RFC Style Set-Cookie2 - if (cookie.Expires == DateTime.MinValue) - cookie.Expires = cookie.TimeStamp.AddSeconds (Int32.Parse (value)); + case "MAX-AGE": // RFC Style Set-Cookie2 + if (cookie.Expires == DateTime.MinValue) + cookie.Expires = cookie.TimeStamp.AddSeconds (Int32.Parse (parts[1])); break; - case "EXPIRES": // Netscape Style Set-Cookie - if (cookie.Expires != DateTime.MinValue) - break; - try { - cookie.Expires = DateTime.ParseExact (value, "r", CultureInfo.InvariantCulture); - } catch { - try { - cookie.Expires = DateTime.ParseExact (value, - "ddd, dd'-'MMM'-'yyyy HH':'mm':'ss 'GMT'", - CultureInfo.InvariantCulture); - } catch { + case "EXPIRES": // Netscape Style Set-Cookie + if (cookie.Expires == DateTime.MinValue) { + //FIXME: Does DateTime parse something like: "Sun, 17-Jan-2038 19:14:07 GMT"? + //cookie.Expires = DateTime.ParseExact (parts[1]); cookie.Expires = DateTime.Now.AddDays (1); } - } break; - case "PATH": - cookie.Path = value; + case "PATH": + cookie.Path = parts[1]; break; - case "PORT": - if (cookie.Port == null) - cookie.Port = value; + case "PORT": + if (cookie.Port == null) + cookie.Port = parts[1]; break; - case "SECURE": - cookie.Secure = true; + case "SECURE": + cookie.Secure = true; break; - case "VERSION": - cookie.Version = Int32.Parse (value); + case "VERSION": + cookie.Version = Int32.Parse (parts[1]); break; - } - } + } // switch + } // while if (cookieCollection == null) - cookieCollection = new CookieCollection (); + cookieCollection = new CookieCollection(); if (cookie.Domain == "") cookie.Domain = uri.Host; @@ -427,40 +411,6 @@ namespace System.Net foreach (string cookie_str in cookies) SetCookie (cookie_str); } - - static string GetCookieValue (string str, int length, ref int i) - { - if (i >= length) - return null; - - int k = i; - while (k < length && Char.IsWhiteSpace (str [k])) - k++; - - int begin = k; - while (k < length && str [k] != ';') - k++; - - i = k; - return str.Substring (begin, i - begin).Trim (); - } - - static string GetCookieName (string str, int length, ref int i) - { - if (i >= length) - return null; - - int k = i; - while (k < length && Char.IsWhiteSpace (str [k])) - k++; - - int begin = k; - while (k < length && str [k] != ';' && str [k] != '=') - k++; - - i = k + 1; - return str.Substring (begin, k - begin).Trim (); - } } } diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs index f3ef1d22076..c4b08a363d1 100644 --- a/mcs/class/System/System.Net/WebConnection.cs +++ b/mcs/class/System/System.Net/WebConnection.cs @@ -71,7 +71,7 @@ namespace System.Net bool ssl; bool certsAvailable; - static object classLock = new object (); + static bool sslCheck; static Type sslStream; static PropertyInfo piClient; static PropertyInfo piServer; @@ -127,48 +127,36 @@ namespace System.Net } } - static void EnsureSSLStreamAvailable () - { - lock (classLock) { - if (sslStream != null) - return; - - // HttpsClientStream is an internal glue class in Mono.Security.dll - sslStream = Type.GetType ("Mono.Security.Protocol.Tls.HttpsClientStream, " + - Consts.AssemblyMono_Security, false); - - if (sslStream == null) { - string msg = "Missing Mono.Security.dll assembly. " + - "Support for SSL/TLS is unavailable."; - - throw new NotSupportedException (msg); - } - piClient = sslStream.GetProperty ("SelectedClientCertificate"); - piServer = sslStream.GetProperty ("ServerCertificate"); - } - } - bool CreateStream (HttpWebRequest request) { try { NetworkStream serverStream = new NetworkStream (socket, false); - if (request.Address.Scheme == Uri.UriSchemeHttps) { + if (request.RequestUri.Scheme == Uri.UriSchemeHttps) { ssl = true; - EnsureSSLStreamAvailable (); - if (!reused || nstream == null || nstream.GetType () != sslStream) { - object[] args = new object [3] { serverStream, - request.ClientCertificates, - request }; - nstream = (Stream) Activator.CreateInstance (sslStream, args); + if (!sslCheck) { + lock (typeof (WebConnection)) { + sslCheck = true; + // HttpsClientStream is an internal glue class in Mono.Security.dll + sslStream = Type.GetType ("Mono.Security.Protocol.Tls.HttpsClientStream, " + Consts.AssemblyMono_Security, false); + if (sslStream != null) { + piClient = sslStream.GetProperty ("SelectedClientCertificate"); + piServer = sslStream.GetProperty ("ServerCertificate"); + } + } } + if (sslStream == null) + throw new NotSupportedException ("Missing Mono.Security.dll assembly. Support for SSL/TLS is unavailable."); + + object[] args = new object [4] { serverStream, request.RequestUri.Host, request.ClientCertificates, request }; + nstream = (Stream) Activator.CreateInstance (sslStream, args); + // we also need to set ServicePoint.Certificate // and ServicePoint.ClientCertificate but this can // only be done later (after handshake - which is // done only after a read operation). - } else { - ssl = false; - nstream = serverStream; } + else + nstream = serverStream; } catch (Exception) { status = WebExceptionStatus.ConnectFailure; return false; @@ -280,9 +268,6 @@ namespace System.Net data.stream = stream; - if (!ExpectContent (data.StatusCode)) - stream.ForceCompletion (); - lock (cnc) { lock (cnc.queue) { if (cnc.queue.Count > 0) { @@ -297,11 +282,6 @@ namespace System.Net data.request.SetResponseData (data); } - static bool ExpectContent (int statusCode) - { - return (statusCode >= 200 && statusCode != 204 && statusCode != 304); - } - internal void GetCertificates () { // here the SSL negotiation have been done diff --git a/mcs/class/System/System.Net/WebConnectionStream.cs b/mcs/class/System/System.Net/WebConnectionStream.cs index c609455f32f..703f35d42b4 100644 --- a/mcs/class/System/System.Net/WebConnectionStream.cs +++ b/mcs/class/System/System.Net/WebConnectionStream.cs @@ -57,7 +57,6 @@ namespace System.Net byte [] headers; bool disposed; bool headersSent; - bool forceCompletion; public WebConnectionStream (WebConnection cnc) { @@ -114,15 +113,9 @@ namespace System.Net get { return (int) writeBuffer.Length; } } - internal void ForceCompletion () - { - forceCompletion = true; - } - internal void CheckComplete () { - bool nrc = nextReadCalled; - if (forceCompletion || (!nrc && readBufferSize - readBufferOffset == contentLength)) { + if (!nextReadCalled && readBufferSize - readBufferOffset == contentLength) { nextReadCalled = true; cnc.NextRead (); } @@ -158,12 +151,8 @@ namespace System.Net } else { new_size = contentLength - totalRead; b = new byte [new_size]; - if (readBuffer != null && diff > 0) { - if (diff > new_size) - diff = new_size; - + if (readBuffer != null && diff > 0) Buffer.BlockCopy (readBuffer, readBufferOffset, b, 0, diff); - } int remaining = new_size - diff; int r = -1; diff --git a/mcs/class/System/System.Net/WebHeaderCollection.cs b/mcs/class/System/System.Net/WebHeaderCollection.cs index f41105bd5bc..e4ea21688c6 100644 --- a/mcs/class/System/System.Net/WebHeaderCollection.cs +++ b/mcs/class/System/System.Net/WebHeaderCollection.cs @@ -96,10 +96,6 @@ namespace System.Net multiValue.Add ("vary", true);
multiValue.Add ("via", true);
multiValue.Add ("warning", true);
- - // Extra - multiValue.Add ("set-cookie", true);
- multiValue.Add ("set-cookie2", true);
}
// Constructors
@@ -155,19 +151,28 @@ namespace System.Net throw new ArgumentException ("invalid header value: " + headerValue, "headerValue");
base.Add (headerName, headerValue);
}
- - public override string [] GetValues (string header) - { - if (header == null) - throw new ArgumentNullException ("header"); - - string [] values = base.GetValues (header); - if (values == null || values.Length == 0) - return null; - - return values; - } - +
+ public override string [] GetValues (string header)
+ {
+ if (header == null)
+ throw new ArgumentNullException ("header");
+ string [] values = base.GetValues (header);
+ if (values == null || values.Length == 0)
+ return null;
+ if (!IsMultiValue (header))
+ return values;
+ StringCollection col = new StringCollection ();
+ for (int i = 0; i < values.Length; i++) {
+ string [] s = values [i].Split (new char [] {','});
+ for (int j = 0; j < s.Length; j++)
+ s [j] = s [j].Trim ();
+ col.AddRange (s);
+ }
+ values = new string [col.Count];
+ col.CopyTo (values, 0);
+ return values;
+ }
+
public static bool IsRestricted (string headerName)
{
if (headerName == null)
@@ -260,12 +265,8 @@ namespace System.Net if (!IsHeaderValue (value))
throw new ArgumentException ("invalid header value");
- if (IsMultiValue (name)) { - base.Add (name, value); - } else { - base.Remove (name);
- base.Set (name, value);
- } + base.Remove (name);
+ base.Set (name, value);
}
internal void RemoveInternal (string name)
diff --git a/mcs/class/System/System.Net/WebProxy.cs b/mcs/class/System/System.Net/WebProxy.cs index df8976c6966..b0299575f60 100644 --- a/mcs/class/System/System.Net/WebProxy.cs +++ b/mcs/class/System/System.Net/WebProxy.cs @@ -208,7 +208,7 @@ namespace System.Net if (address == null)
return null;
- if (address.IndexOf ("://") == -1)
+ if (address.IndexOf (':') == -1)
address = "http://" + address;
return new Uri (address);
diff --git a/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs b/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs index c2d609ecec2..9e5923667b5 100755 --- a/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs +++ b/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeBase.cs @@ -5,6 +5,10 @@ // 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 @@ -56,167 +60,63 @@ namespace Mono.Security.Authenticode { public const string spcIndirectDataContext = "1.3.6.1.4.1.311.2.1.4"; - private byte[] fileblock; - private FileStream fs; - private int blockNo; - private int blockLength; - private int peOffset; - private int dirSecurityOffset; - private int dirSecuritySize; + internal byte[] rawData; public AuthenticodeBase () { - fileblock = new byte [4096]; } - internal void Open (string filename) - { - if (fs != null) - Close (); - fs = new FileStream (filename, FileMode.Open, FileAccess.Read, FileShare.Read); - } - - internal void Close () - { - if (fs != null) { - fs.Close (); - fs = null; - blockNo = 0; - } - } - - internal bool ReadFirstBlock () + protected byte[] HashFile (string fileName, string hashName) { - 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; + 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 (); - // 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; + // MZ - DOS header + if (BitConverterLE.ToUInt16 (file, 0) != 0x5A4D) + return null; - // 2.2. Locate IMAGE_DIRECTORY_ENTRY_SECURITY (offset and size) - dirSecurityOffset = BitConverterLE.ToInt32 (fileblock, peOffset + 152); - dirSecuritySize = BitConverterLE.ToInt32 (fileblock, peOffset + 156); + // find offset of PE header + int peOffset = BitConverterLE.ToInt32 (file, 60); + if (peOffset > file.Length) + return null; - return true; - } + // PE - NT header + if (BitConverterLE.ToUInt16 (file, peOffset) != 0x4550) + return null; - internal byte[] GetSecurityEntry () - { - if (blockNo < 1) - ReadFirstBlock (); + // IMAGE_DIRECTORY_ENTRY_SECURITY + int dirSecurityOffset = BitConverterLE.ToInt32 (file, peOffset + 152); + int dirSecuritySize = BitConverterLE.ToInt32 (file, peOffset + 156); if (dirSecuritySize > 8) { - // 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); + 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 ();*/ } + else + rawData = null; - // Authenticode(r) gymnastics - // Hash from (generally) 0 to 215 (216 bytes) + HashAlgorithm hash = HashAlgorithm.Create (hashName); + // 0 to 215 (216) then skip 4 (checksum) int pe = peOffset + 88; - hash.TransformBlock (fileblock, 0, pe, fileblock, 0); - // then skip 4 for checksum + hash.TransformBlock (file, 0, pe, file, 0); pe += 4; - // 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 + // 220 to 279 (60) then skip 8 (IMAGE_DIRECTORY_ENTRY_SECURITY) + hash.TransformBlock (file, pe, 60, file, pe); 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 ea0bd30e242..803781954f7 100755 --- a/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeDeformatter.cs +++ b/mcs/class/corlib/Mono.Security.Authenticode/AuthenticodeDeformatter.cs @@ -2,9 +2,12 @@ // AuthenticodeDeformatter.cs: Authenticode signature validator // // Author: -// Sebastien Pouliot <sebastien@ximian.com> +// Sebastien Pouliot (spouliot@motus.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 @@ -54,9 +57,6 @@ 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,20 +70,17 @@ namespace Mono.Security.Authenticode { public AuthenticodeDeformatter (string fileName) : this () { - FileName = fileName; + 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 + } } public string FileName { get { return filename; } - set { - Reset (); - try { - CheckSignature (value); - } - catch { - reason = 1; - } - } + set { CheckSignature (value); } } public byte[] Hash { @@ -104,7 +101,7 @@ namespace Mono.Security.Authenticode { public bool IsTrusted () { - if (entry == null) { + if (rawData == null) { reason = 1; return false; } @@ -114,13 +111,13 @@ namespace Mono.Security.Authenticode { return false; } - if ((signerChain.Root == null) || !trustedRoot) { + if (signerChain.Root == null) { reason = 6; return false; } if (timestamp != DateTime.MinValue) { - if ((timestampChain.Root == null) || !trustedTimestampRoot) { + if (timestampChain.Root == null) { reason = 6; return false; } @@ -142,11 +139,7 @@ namespace Mono.Security.Authenticode { } public byte[] Signature { - get { - if (entry == null) - return null; - return (byte[]) entry.Clone (); - } + get { return (byte[]) rawData.Clone (); } } public DateTime Timestamp { @@ -164,58 +157,43 @@ namespace Mono.Security.Authenticode { private bool CheckSignature (string fileName) { filename = fileName; - base.Open (filename); - entry = base.GetSecurityEntry (); - if (entry == null) { - // no signature is present - reason = 1; - base.Close (); + + // 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) return false; - } - PKCS7.ContentInfo ci = new PKCS7.ContentInfo (entry); - if (ci.ContentType != PKCS7.Oid.signedData) { - base.Close (); + PKCS7.ContentInfo ci = new PKCS7.ContentInfo (rawData); + if (ci.ContentType != PKCS7.Oid.signedData) return false; - } PKCS7.SignedData sd = new PKCS7.SignedData (ci.Content); - if (sd.ContentInfo.ContentType != spcIndirectDataContext) { - base.Close (); + if (sd.ContentInfo.ContentType != spcIndirectDataContext) return false; - } coll = sd.Certificates; ASN1 spc = sd.ContentInfo.Content; signedHash = spc [0][1][1]; - - 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; + if (signedHash.Length == 20) { + // seems to be SHA-1, restart hashing + hashName = "SHA1"; + hash = HashFile (filename, hashName); } - base.Close (); if (!signedHash.CompareValue (hash)) return false; // messageDigest is a hash of spcIndirectDataContext (which includes the file hash) byte[] spcIDC = spc [0].Value; - ha.Initialize (); // re-using hash instance + HashAlgorithm ha = HashAlgorithm.Create (hashName); byte[] messageDigest = ha.ComputeHash (spcIDC); - return VerifySignature (sd, messageDigest, ha); + return VerifySignature (sd, messageDigest, hashName); } private bool CompareIssuerSerial (string issuer, byte[] serial, X509Certificate x509) @@ -235,7 +213,7 @@ namespace Mono.Security.Authenticode { } //private bool VerifySignature (ASN1 cs, byte[] calculatedMessageDigest, string hashName) - private bool VerifySignature (PKCS7.SignedData sd, byte[] calculatedMessageDigest, HashAlgorithm ha) + private bool VerifySignature (PKCS7.SignedData sd, byte[] calculatedMessageDigest, string hashName) { string contentType = null; ASN1 messageDigest = null; @@ -264,7 +242,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][0][0].Value); + spcSpOpusInfo = System.Text.Encoding.UTF8.GetString (attr[1][0][1][0].Value); } catch (NullReferenceException) { spcSpOpusInfo = null; @@ -284,13 +262,13 @@ namespace Mono.Security.Authenticode { return false; // verify signature - string hashOID = CryptoConfig.MapNameToOID (ha.ToString ()); + string hashOID = CryptoConfig.MapNameToOID (hashName); // 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); - ha.Initialize (); + HashAlgorithm ha = HashAlgorithm.Create (hashName); byte[] p7hash = ha.ComputeHash (aa.GetBytes ()); byte[] signature = sd.SignerInfo.Signature; @@ -304,9 +282,10 @@ namespace Mono.Security.Authenticode { RSACryptoServiceProvider rsa = (RSACryptoServiceProvider) x509.RSA; if (rsa.VerifyHash (p7hash, hashOID, signature)) { signerChain.LoadCertificates (coll); - trustedRoot = signerChain.Build (x509); - signingCertificate = x509; - break; + if (signerChain.Build (x509)) + signingCertificate = x509; + else + return false; } } } @@ -322,18 +301,17 @@ namespace Mono.Security.Authenticode { // countersignature (1 2 840 113549 1 9 6) // SET { PKCS7.SignerInfo cs = new PKCS7.SignerInfo (attr [1]); - trustedTimestampRoot = VerifyCounterSignature (cs, signature); - break; + return VerifyCounterSignature (cs, signature, hashName); default: // we don't support other unauthenticated attributes break; } } - return (trustedRoot && trustedTimestampRoot); + return true; } - private bool VerifyCounterSignature (PKCS7.SignerInfo cs, byte[] signature) + private bool VerifyCounterSignature (PKCS7.SignerInfo cs, byte[] signature, string hashName) { // SEQUENCE { // INTEGER 1 @@ -380,7 +358,6 @@ 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"; @@ -421,20 +398,5 @@ 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 da0e586a096..7f9398815f2 100755 --- a/mcs/class/corlib/Mono.Security.Authenticode/ChangeLog +++ b/mcs/class/corlib/Mono.Security.Authenticode/ChangeLog @@ -1,8 +1,3 @@ -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 add41ab01a7..5cfdfbd7a78 100644 --- a/mcs/class/corlib/Mono.Security.X509/ChangeLog +++ b/mcs/class/corlib/Mono.Security.X509/ChangeLog @@ -1,7 +1,3 @@ -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 f8035e6c661..0ff5d875ac5 100755 --- a/mcs/class/corlib/Mono.Security.X509/X509Chain.cs +++ b/mcs/class/corlib/Mono.Security.X509/X509Chain.cs @@ -9,6 +9,10 @@ // 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 @@ -132,7 +136,7 @@ namespace Mono.Security.X509 { tmp = FindCertificateParent (x); if (x != null) { _chain.Add (x); - x = tmp; // last valid + tmp = x; // last valid } } // find a trusted root @@ -189,8 +193,7 @@ namespace Mono.Security.X509 { _status = X509ChainStatusFlags.NoError; roots = null; // this force a reload certs.Clear (); - if (_chain != null) - _chain.Clear (); + _chain.Clear (); } // private stuff diff --git a/mcs/class/corlib/System.Collections/ChangeLog b/mcs/class/corlib/System.Collections/ChangeLog index f269e646470..8782bc457f8 100644 --- a/mcs/class/corlib/System.Collections/ChangeLog +++ b/mcs/class/corlib/System.Collections/ChangeLog @@ -1,13 +1,3 @@ -2004-07-21 Geoff Norton <gnorton@customerdna.com> - - * Hashtable.cs: lock the SyncRoot when Cloning a Synchronized hashtable to avoid - a snapshot out of sync error. - -2004-07-21 Duncan Mak <duncan@ximian.com> - - * DictionaryBase.cs: Rename the dictionary field to hashtable, - which causes a serialization interop bug. Fixes bug #61721. - 2004-06-18 Ben Maurer <bmaurer@ximian.com> * IKeyComparer.cs: v2 class diff --git a/mcs/class/corlib/System.Collections/DictionaryBase.cs b/mcs/class/corlib/System.Collections/DictionaryBase.cs index 9e814d1fab9..af6b19f2617 100755 --- a/mcs/class/corlib/System.Collections/DictionaryBase.cs +++ b/mcs/class/corlib/System.Collections/DictionaryBase.cs @@ -51,11 +51,11 @@ namespace System.Collections { [Serializable] public abstract class DictionaryBase : IDictionary, ICollection, IEnumerable { - Hashtable hashtable; + Hashtable dictionary; protected DictionaryBase () { - hashtable = new Hashtable (); + dictionary = new Hashtable (); } /// <summary> @@ -64,7 +64,7 @@ namespace System.Collections { public void Clear () { OnClear (); - hashtable.Clear (); + dictionary.Clear (); OnClearComplete (); } @@ -73,7 +73,7 @@ namespace System.Collections { /// </summary> public int Count { get { - return hashtable.Count; + return dictionary.Count; } } @@ -91,7 +91,7 @@ namespace System.Collections { /// </summary> protected Hashtable InnerHashtable { get { - return hashtable; + return dictionary; } } @@ -129,7 +129,7 @@ namespace System.Collections { /// </summary> private void DoCopy (Array array, int index) { - foreach (DictionaryEntry de in hashtable) + foreach (DictionaryEntry de in dictionary) array.SetValue (de, index++); } @@ -138,7 +138,7 @@ namespace System.Collections { /// </summary> public IDictionaryEnumerator GetEnumerator () { - return hashtable.GetEnumerator (); + return dictionary.GetEnumerator (); } /// <summary> @@ -311,20 +311,20 @@ namespace System.Collections { object IDictionary.this [object key] { get { - OnGet (key, hashtable [key]); - object value = hashtable [key]; + OnGet (key, dictionary[key]); + object value = dictionary [key]; return value; } set { OnValidate (key, value); - object current_value = hashtable [key]; + object current_value = dictionary [key]; OnSet (key, current_value, value); - hashtable [key] = value; + dictionary [key] = value; try { OnSetComplete (key, current_value, value); } catch { - hashtable [key] = current_value; + dictionary [key] = current_value; throw; } } @@ -332,13 +332,13 @@ namespace System.Collections { ICollection IDictionary.Keys { get { - return hashtable.Keys; + return dictionary.Keys; } } ICollection IDictionary.Values { get { - return hashtable.Values; + return dictionary.Values; } } @@ -349,11 +349,11 @@ namespace System.Collections { { OnValidate (key, value); OnInsert (key, value); - hashtable.Add (key, value); + dictionary.Add (key, value); try { OnInsertComplete (key, value); } catch { - hashtable.Remove (key); + dictionary.Remove(key); throw; } } @@ -363,10 +363,10 @@ namespace System.Collections { /// </summary> void IDictionary.Remove (object key) { - object value = hashtable [key]; + object value = dictionary [key]; OnValidate (key, value); OnRemove (key, value); - hashtable.Remove (key); + dictionary.Remove (key); OnRemoveComplete (key, value); } @@ -375,24 +375,24 @@ namespace System.Collections { /// </summary> bool IDictionary.Contains (object key) { - return hashtable.Contains (key); + return dictionary.Contains (key); } bool ICollection.IsSynchronized { get { - return hashtable.IsSynchronized; + return dictionary.IsSynchronized; } } object ICollection.SyncRoot { get { - return hashtable.SyncRoot; + return dictionary.SyncRoot; } } IEnumerator IEnumerable.GetEnumerator () { - return hashtable.GetEnumerator (); + return dictionary.GetEnumerator (); } } } diff --git a/mcs/class/corlib/System.Collections/Hashtable.cs b/mcs/class/corlib/System.Collections/Hashtable.cs index 270bbef13ca..36575c8e024 100644 --- a/mcs/class/corlib/System.Collections/Hashtable.cs +++ b/mcs/class/corlib/System.Collections/Hashtable.cs @@ -1114,9 +1114,8 @@ namespace System.Collections { public override object Clone () { - lock(host.SyncRoot) { - return new SyncHashtable( (Hashtable) host.Clone () ); - } + Hashtable ht = (Hashtable) host.Clone (); + return new SyncHashtable (ht); } } // SyncHashtable diff --git a/mcs/class/corlib/System.Globalization/ChangeLog b/mcs/class/corlib/System.Globalization/ChangeLog index 95392d51e96..533cc9d4dc7 100644 --- a/mcs/class/corlib/System.Globalization/ChangeLog +++ b/mcs/class/corlib/System.Globalization/ChangeLog @@ -1,3 +1,8 @@ + +Wed Jun 30 17:06:43 CEST 2004 Paolo Molaro <lupus@ximian.com> + + * NumberFormatInfo.cs: workaround for bug 55978. + 2004-06-17 Atsushi Enomoto <atsushi@ximian.com> * DateTimeFormatInfo.cs : check if pattern array is empty or not. Now diff --git a/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs b/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs index 169ad6c2f9e..e884daad5a7 100644 --- a/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs +++ b/mcs/class/corlib/System.Globalization/NumberFormatInfo.cs @@ -851,7 +851,10 @@ throw new Exception ("HERE the value was modified"); public object GetFormat (Type formatType) { - return (formatType == typeof (NumberFormatInfo)) ? this : null; + // work around http://bugzilla.ximian.com/show_bug.cgi?id=55978 + // the comparison fails because formatType likely comes from another domain + //return (formatType == typeof (NumberFormatInfo)) ? this : null; + return this; } public object Clone () diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog b/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog index c27c01f582e..2b295ce72fa 100644 --- a/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog +++ b/mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog @@ -1,7 +1,3 @@ -2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * IsolatedStorageInfo.cs: useGetFolderPath instead of getting "HOME". - 2004-06-13 Gert Driesen <drieseng@users.sourceforge.net> * IsolatedStorage.cs: really mark the storage_scope field private diff --git a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageInfo.cs b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageInfo.cs index d1107269a1b..a3a1ae0e8a3 100644 --- a/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageInfo.cs +++ b/mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageInfo.cs @@ -37,7 +37,7 @@ namespace System.IO.IsolatedStorage { [MonoTODO("Unix Specific; generalize for Win32")] internal static string GetIsolatedStorageDirectory () { - string home = Environment.GetFolderPath (Environment.SpecialFolder.Personal); + string home = Environment.GetEnvironmentVariable ("HOME"); if (home == null) home = "~"; diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog index 4412e03bfe9..6818c37ad82 100644 --- a/mcs/class/corlib/System.IO/ChangeLog +++ b/mcs/class/corlib/System.IO/ChangeLog @@ -1,43 +1,3 @@ -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. - Fixes bug 63063, patch by Laurent Debacker (debackerl@yahoo.com). - -2004-08-13 Dick Porter <dick@ximian.com> - - * StreamWriter.cs: Allow FileShare.Read access to the underlying - FileStream, to be compatible with MS. Fixes bug 62152. - -2004-07-06 Dick Porter <dick@ximian.com> - - * MonoIO.cs: Add ERROR_INVALID_PARAMETER to the exception list. - Don't blow away the SetFileTime() error before the caller gets to - see it. Part of the bug fix to 60970. - -2004-07-05 Dick Porter <dick@ximian.com> - - * CheckPermission.cs: - * File.cs: - * FileInfo.cs: - * MonoIO.cs: - * FileStream.cs: Give the filename when throwing - FileNotFoundException. Fixes bug 61120, based on patch from - Carlos Alberto Cesario <carloscesario@gmail.com>. - -2004-07-05 Dick Porter <dick@ximian.com> - - * File.cs: File.Move() should check that the destination doesn't - already exist. Fixes bug 60915, patch based on one from Carlos - Alberto Cesario <carloscesario@gmail.com>. - 2004-06-24 Gonzalo Paniagua Javier <gonzalo@ximian.com> * Directory.cs: implemented GetLogicalDrives. diff --git a/mcs/class/corlib/System.IO/CheckPermission.cs b/mcs/class/corlib/System.IO/CheckPermission.cs index 232b1350af4..2b31cab7e01 100644 --- a/mcs/class/corlib/System.IO/CheckPermission.cs +++ b/mcs/class/corlib/System.IO/CheckPermission.cs @@ -102,7 +102,7 @@ namespace System.IO } else { - throw new FileNotFoundException("File not found", path); + throw new FileNotFoundException(); } #endif } diff --git a/mcs/class/corlib/System.IO/File.cs b/mcs/class/corlib/System.IO/File.cs index 3dcf8213759..c45dea6aecb 100644 --- a/mcs/class/corlib/System.IO/File.cs +++ b/mcs/class/corlib/System.IO/File.cs @@ -70,7 +70,7 @@ namespace System.IO if (dest.Trim () == "" || dest.IndexOfAny (Path.InvalidPathChars) != -1) throw new ArgumentException ("dest"); if (!Exists (src)) - throw new FileNotFoundException (src + " does not exist", src); + throw new FileNotFoundException (src + " does not exist"); if ((GetAttributes(src) & FileAttributes.Directory) == FileAttributes.Directory){ throw new ArgumentException(src + " is a directory"); @@ -261,11 +261,9 @@ namespace System.IO if (dest.Trim () == "" || dest.IndexOfAny (Path.InvalidPathChars) != -1) throw new ArgumentException ("dest"); if (!MonoIO.Exists (src, out error)) - throw new FileNotFoundException (src + " does not exist", src); + throw new FileNotFoundException (src + " does not exist"); if (MonoIO.ExistsDirectory (dest, out error)) throw new IOException (dest + " is a directory"); - if (MonoIO.Exists (dest, out error)) - throw new IOException (dest + " already exists"); string DirName; DirName = Path.GetDirectoryName(src); diff --git a/mcs/class/corlib/System.IO/FileInfo.cs b/mcs/class/corlib/System.IO/FileInfo.cs index 3345f61dc79..c98cf6feaec 100644 --- a/mcs/class/corlib/System.IO/FileInfo.cs +++ b/mcs/class/corlib/System.IO/FileInfo.cs @@ -81,7 +81,7 @@ namespace System.IO { public long Length {
get {
if (!Exists)
- throw new FileNotFoundException ("Could not find file \"" + OriginalPath + "\".", OriginalPath);
+ throw new FileNotFoundException ("Could not find file \"" + OriginalPath + "\".");
return stat.Length;
}
diff --git a/mcs/class/corlib/System.IO/FileStream.cs b/mcs/class/corlib/System.IO/FileStream.cs index 01b726a0b92..3024bf35d04 100644 --- a/mcs/class/corlib/System.IO/FileStream.cs +++ b/mcs/class/corlib/System.IO/FileStream.cs @@ -155,7 +155,7 @@ namespace System.IO if (access == FileAccess.Read && mode != FileMode.Create && mode != FileMode.OpenOrCreate && mode != FileMode.CreateNew && !File.Exists (name)) - throw new FileNotFoundException ("Could not find file \"" + name + "\".", name); + throw new FileNotFoundException ("Could not find file \"" + name + "\"."); if (mode == FileMode.CreateNew) { string dname = Path.GetDirectoryName (name); diff --git a/mcs/class/corlib/System.IO/MonoIO.cs b/mcs/class/corlib/System.IO/MonoIO.cs index a32e6ed5408..47fd104fdc3 100644 --- a/mcs/class/corlib/System.IO/MonoIO.cs +++ b/mcs/class/corlib/System.IO/MonoIO.cs @@ -63,8 +63,7 @@ namespace System.IO // FIXME: add more exception mappings here case MonoIOError.ERROR_FILE_NOT_FOUND: message = String.Format ("Could not find file \"{0}\"", path); - return new FileNotFoundException (message, - path); + return new FileNotFoundException (message); case MonoIOError.ERROR_PATH_NOT_FOUND: message = String.Format ("Could not find a part of the path \"{0}\"", path); @@ -82,10 +81,6 @@ namespace System.IO message = String.Format ("Path is too long. Path: {0}", path); return new PathTooLongException (message); - case MonoIOError.ERROR_INVALID_PARAMETER: - message = String.Format ("Invalid parameter"); - return new IOException (message); - default: message = String.Format ("Win32 IO returned {0}. Path: {1}", error, path); return new IOException (message); @@ -309,9 +304,7 @@ namespace System.IO result = SetFileTime (handle, creation_time, last_access_time, last_write_time, out error); - - MonoIOError ignore_error; - Close (handle, out ignore_error); + Close (handle, out error); return result; } diff --git a/mcs/class/corlib/System.IO/Stream.cs b/mcs/class/corlib/System.IO/Stream.cs index 6623da319a1..04884fb5e3d 100755 --- a/mcs/class/corlib/System.IO/Stream.cs +++ b/mcs/class/corlib/System.IO/Stream.cs @@ -77,6 +77,7 @@ 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 1799d74e6e6..4c51d0269be 100644 --- a/mcs/class/corlib/System.IO/StreamWriter.cs +++ b/mcs/class/corlib/System.IO/StreamWriter.cs @@ -123,7 +123,7 @@ namespace System.IO { else
mode = FileMode.Create;
- internalStream = new FileStream (path, mode, FileAccess.Write, FileShare.Read);
+ internalStream = new FileStream (path, mode, FileAccess.Write);
if (append)
internalStream.Position = internalStream.Length;
@@ -137,16 +137,12 @@ namespace System.IO { get {
return iflush;
}
- set { - if (DisposedAlready) - throw new ObjectDisposedException("StreamWriter"); - iflush = value; - - if (iflush) { - Flush (); - } - } - } + set {
+ if (DisposedAlready)
+ throw new ObjectDisposedException("StreamWriter");
+ iflush = value;
+ }
+ }
public virtual Stream BaseStream {
get {
@@ -249,28 +245,6 @@ 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)
@@ -304,8 +278,7 @@ namespace System.IO { throw new ObjectDisposedException("StreamWriter");
if (value != null)
- LowLevelWrite (value); -
+ LowLevelWrite (value.ToCharArray (), 0, value.Length);
if (iflush)
Flush ();
}
diff --git a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs index 344395be1a3..ebe86410469 100755 --- a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs @@ -131,16 +131,8 @@ namespace System.Reflection.Emit { } if (n.KeyPair != null) { - // full keypair is available (for signing) sn = n.KeyPair.StrongName (); } - else { - // public key is available (for delay-signing) - byte[] pk = n.GetPublicKey (); - if ((pk != null) && (pk.Length > 0)) { - sn = new Mono.Security.StrongName (pk); - } - } basic_init (this); } diff --git a/mcs/class/corlib/System.Reflection.Emit/ChangeLog b/mcs/class/corlib/System.Reflection.Emit/ChangeLog index 8885e3c981a..5aeec6cdae4 100644 --- a/mcs/class/corlib/System.Reflection.Emit/ChangeLog +++ b/mcs/class/corlib/System.Reflection.Emit/ChangeLog @@ -1,19 +1,3 @@ -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 - MCS is used on the MS runtime (other part of the fix is for MCS). - -2004-07-24 Martin Baulig <martin@ximian.com> - - * TypeBuilder.cs (TypeBuilder.UnspecifiedTypeSize): Set this to 0 - and initialize it to 0 everywhere. Thu Jun 24 15:33:04 CEST 2004 Paolo Molaro <lupus@ximian.com> diff --git a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs index eb958b22b7f..a7d4888d6d7 100644 --- a/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/ModuleBuilder.cs @@ -624,8 +624,9 @@ namespace System.Reflection.Emit { internal void Save () { - if (transient && !is_main) + if (transient) 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 edcf429d9cc..1f6884bdc12 100644 --- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs @@ -95,9 +95,8 @@ namespace System.Reflection.Emit { internal TypeBuilder (ModuleBuilder mb, TypeAttributes attr) { this.parent = null; this.attrs = attr; - this.class_size = 0; + this.class_size = -1; fullname = this.tname = "<Module>"; - this.table_idx = 1; this.nspace = ""; pmodule = mb; setup_internal_class (this); @@ -988,7 +987,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.Reflection/ChangeLog b/mcs/class/corlib/System.Reflection/ChangeLog index 2ceab253beb..8a7945e688e 100644 --- a/mcs/class/corlib/System.Reflection/ChangeLog +++ b/mcs/class/corlib/System.Reflection/ChangeLog @@ -1,12 +1,3 @@ - -Sat Jul 10 15:48:34 CEST 2004 Paolo Molaro <lupus@ximian.com> - - * Modulec.s: return just name in ToString (bug #61287). - -2004-07-03 Zoltan Varga <vargaz@freemail.hu> - - * Module.cs: Initialize FilterTypeName[IgnoreCase]. Fixes #61048. - 2004-06-17 Gert Driesen <drieseng@users.sourceforge.net> * Pointer.cs: remove serializable attribute to match MS.NET diff --git a/mcs/class/corlib/System.Reflection/Module.cs b/mcs/class/corlib/System.Reflection/Module.cs index 876967a50c0..01dc55f9be6 100644 --- a/mcs/class/corlib/System.Reflection/Module.cs +++ b/mcs/class/corlib/System.Reflection/Module.cs @@ -55,11 +55,6 @@ namespace System.Reflection { const BindingFlags defaultBindingFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance; - static Module () { - FilterTypeName = new TypeFilter (filter_by_type_name); - FilterTypeNameIgnoreCase = new TypeFilter (filter_by_type_name_ignore_case); - } - internal Module () { } ~Module () { @@ -211,7 +206,7 @@ namespace System.Reflection { public override string ToString () { - return name; + return "Reflection.Module: " + name; } // Mono Extension: returns the GUID of this module @@ -220,22 +215,6 @@ namespace System.Reflection { return new Guid (GetGuidInternal ()); } - private static bool filter_by_type_name (Type m, object filterCriteria) { - string s = (string)filterCriteria; - if (s.EndsWith ("*")) - return m.Name.StartsWith (s.Substring (0, s.Length - 1)); - else - return m.Name == s; - } - - private static bool filter_by_type_name_ignore_case (Type m, object filterCriteria) { - string s = (string)filterCriteria; - if (s.EndsWith ("*")) - return m.Name.ToLower ().StartsWith (s.Substring (0, s.Length - 1).ToLower ()); - else - return String.Compare (m.Name, s, true) == 0; - } - [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern string GetGuidInternal (); diff --git a/mcs/class/corlib/System.Reflection/common.src b/mcs/class/corlib/System.Reflection/common.src new file mode 100644 index 00000000000..022b6768fcc --- /dev/null +++ b/mcs/class/corlib/System.Reflection/common.src @@ -0,0 +1,25 @@ +Assembly.cs +AssemblyNameFlags.cs +BindingFlags.cs +CallingConventions.cs +ConstructorInfo.cs +DefaultMemberAttribute.cs +EventAttributes.cs +EventInfo.cs +FieldAttributes.cs +FieldInfo.cs +ICustomAttributeProvider.cs +MemberFilter.cs +MemberInfo.cs +MemberTypes.cs +MethodAttributes.cs +MethodBase.cs +MethodImplAttributes.cs +MethodInfo.cs +Module.cs +ParameterAttributes.cs +PropertyAttributes.cs +PropertyInfo.cs +ResourceAttributes.cs +ResourceLocation.cs +TypeAttributes.cs diff --git a/mcs/class/corlib/System.Runtime.Remoting.Channels/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting.Channels/ChangeLog index 35352b211ea..aafa83f9899 100644 --- a/mcs/class/corlib/System.Runtime.Remoting.Channels/ChangeLog +++ b/mcs/class/corlib/System.Runtime.Remoting.Channels/ChangeLog @@ -1,8 +1,3 @@ -2004-07-02 Lluis Sanchez Gual <lluis@novell.com> - - * ChannelServices.cs: In RegisterChannel, ignore name colisions if the - channel name is "". This fixes bug #61592. - 2004-06-15 Gert Driesen <drieseng@users.sourceforge.net> * TransportHeaders.cs: added TODO for serialization diff --git a/mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs b/mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs index f2f21baf53e..98629c496f4 100644 --- a/mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs +++ b/mcs/class/corlib/System.Runtime.Remoting.Channels/ChannelServices.cs @@ -254,7 +254,7 @@ namespace System.Runtime.Remoting.Channels { IChannel regc = (IChannel) registeredChannels[n]; - if (regc.ChannelName == chnl.ChannelName && chnl.ChannelName != "") + if (regc.ChannelName == chnl.ChannelName) throw new RemotingException ("Channel " + regc.ChannelName + " already registered"); if (regc.ChannelPriority < chnl.ChannelPriority && pos==-1) diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting.Messaging/ChangeLog index 31b0acd440c..87e4e0902e6 100644 --- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/ChangeLog +++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/ChangeLog @@ -1,8 +1,3 @@ -2004-07-22 Lluis Sanchez Gual <lluis@novell.com> - - * MethodCall.cs: Use RemotingServices.GetMethodBaseFromName to get the - MethodBase from the method name. This fixes bug #61774. - 2004-06-18 Sebastien Pouliot <sebastien@ximian.com> * ReturnMessage.cs: Added IMessage interface to class definition. diff --git a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs index 47dbb9d0beb..9313d3aa0cb 100644 --- a/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs +++ b/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs @@ -288,8 +288,11 @@ namespace System.Runtime.Remoting.Messaging { Type type = RemotingServices.GetServerTypeForUri (_uri); if (type == null) throw new RemotingException ("Requested service not found. No receiver for uri " + _uri); - if (CanCastTo (_typeName, type)) { - _methodBase = RemotingServices.GetMethodBaseFromName (type, _methodName, _methodSignature); + if (CanCastTo (_typeName, type)) + { + BindingFlags bflags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; + if (_methodSignature == null) _methodBase = type.GetMethod (_methodName, bflags); + else _methodBase = type.GetMethod (_methodName, bflags, null, _methodSignature, null); return; } else diff --git a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog index 14aa52173f9..1fc62be042d 100755 --- a/mcs/class/corlib/System.Runtime.Remoting/ChangeLog +++ b/mcs/class/corlib/System.Runtime.Remoting/ChangeLog @@ -1,21 +1,3 @@ -2004-07-22 Lluis Sanchez Gual <lluis@novell.com> - - * ObjRef.cs: Fixed type check in in ObjRef constructor. The requested class - must be the object class or a base class. This fixes bug #61249. - -2004-07-22 Lluis Sanchez Gual <lluis@novell.com> - - * RemotingServices.cs: Changed GetMethodBaseFromMethodMessage so its code - can be reused internally. Also fixed bug when gettting a method from an - interface. - -2004-07-02 Lluis Sanchez Gual <lluis@ximian.com> - - * RemotingConfiguration.cs: Avoid adding "id" and "type" as custom - properties of providers. This fixes bug #60934. - * ServerIdentity.cs, RemotingServices.cs: When disposing an identity, detach - the identity from the object, so it can be safely marshalled again. - 2004-06-15 Gert Driesen <drieseng@users.sourceforge.net> * RemotingTimeoutException.cs: added missing serialization ctor diff --git a/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs b/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs index 30234367827..90db146c267 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs @@ -92,7 +92,7 @@ namespace System.Runtime.Remoting { uri = RemotingServices.GetObjectUri(mbr); typeInfo = new TypeInfo(type); - if (!type.IsAssignableFrom (mbr.GetType())) + if (!typeInfo.CanCastTo(mbr.GetType(), mbr)) throw new RemotingException ("The server object type cannot be cast to the requested type " + type.FullName + "."); UpdateChannelInfo(); diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs index 2cbe62dff51..204bc6b4368 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs @@ -721,9 +721,9 @@ namespace System.Runtime.Remoting if (at == "id" && isTemplate) prov.Id = val; - else if (at == "type") + if (at == "type") prov.Type = val; - else if (at == "ref" && !isTemplate) + if (at == "ref" && !isTemplate) prov.Ref = val; else prov.CustomProperties.Add (at, val); diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs index 6d4b810ed13..aa694cbb3b6 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs @@ -57,7 +57,6 @@ namespace System.Runtime.Remoting internal static string app_id; static int next_id = 1; - static readonly BindingFlags methodBindings = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; static RemotingServices () { @@ -160,10 +159,8 @@ namespace System.Runtime.Remoting else throw new ArgumentException ("The obj parameter is a proxy."); } - else { + else identity = obj.ObjectIdentity; - obj.ObjectIdentity = null; - } if (identity == null || !identity.IsConnected) return false; @@ -291,49 +288,22 @@ namespace System.Runtime.Remoting Type type = Type.GetType (msg.TypeName); if (type == null) throw new RemotingException ("Type '" + msg.TypeName + "' not found."); - - return GetMethodBaseFromName (type, msg.MethodName, (Type[]) msg.MethodSignature); - } - - internal static MethodBase GetMethodBaseFromName (Type type, string methodName, Type[] signature) - { - if (type.IsInterface) { - return FindInterfaceMethod (type, methodName, signature); - } - else { - MethodBase method = null; - if (signature == null) - method = type.GetMethod (methodName, methodBindings); - else - method = type.GetMethod (methodName, methodBindings, null, (Type[]) signature, null); - - if (method != null) - return method; - - if (signature == null) - return type.GetConstructor (methodBindings, null, Type.EmptyTypes, null); - else - return type.GetConstructor (methodBindings, null, signature, null); - } - } - - static MethodBase FindInterfaceMethod (Type type, string methodName, Type[] signature) - { - MethodBase method = null; + + BindingFlags bflags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; - if (signature == null) - method = type.GetMethod (methodName, methodBindings); + MethodBase method; + if (msg.MethodSignature == null) + method = type.GetMethod (msg.MethodName, bflags); else - method = type.GetMethod (methodName, methodBindings, null, signature, null); - - if (method != null) return method; + method = type.GetMethod (msg.MethodName, bflags, null, (Type[]) msg.MethodSignature, null); - foreach (Type t in type.GetInterfaces ()) { - method = FindInterfaceMethod (t, methodName, signature); - if (method != null) return method; - } + if (method != null) + return method; - return null; + if (msg.MethodSignature == null) + return type.GetConstructor (bflags, null, Type.EmptyTypes, null); + else + return type.GetConstructor (bflags, null, (Type[]) msg.MethodSignature, null); } public static void GetObjectData(object obj, SerializationInfo info, StreamingContext context) diff --git a/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs b/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs index 72c025121d0..f5ed96a066b 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/ServerIdentity.cs @@ -136,13 +136,7 @@ namespace System.Runtime.Remoting protected void DisposeServerObject() { - // Detach identity from server object to avoid problems if the - // object is marshalled again. - - if (_serverObject != null) { - _serverObject.ObjectIdentity = null; - _serverObject = null; - } + _serverObject = null; } } diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/ChangeLog b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/ChangeLog index 86be09eef0a..b5a036af423 100644 --- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/ChangeLog +++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/ChangeLog @@ -1,7 +1,3 @@ -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 5d3f9dd8177..af5722f601d 100644 --- a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs +++ b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Certificate.cs @@ -116,26 +116,15 @@ namespace System.Security.Cryptography.X509Certificates { [MonoTODO ("Incomplete - minimal validation in this version")] public static X509Certificate CreateFromSignedFile (string filename) { - 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); - } - + AuthenticodeDeformatter a = new AuthenticodeDeformatter (filename); + if (a.SigningCertificate != null) { + return new X509Certificate (a.SigningCertificate.RawData); + } + else { // 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 @@ -421,4 +410,4 @@ namespace System.Security.Cryptography.X509Certificates { } #endif } -} +}
\ No newline at end of file diff --git a/mcs/class/corlib/System.Security.Cryptography/ChangeLog b/mcs/class/corlib/System.Security.Cryptography/ChangeLog index f087b452504..59642bc66bc 100644 --- a/mcs/class/corlib/System.Security.Cryptography/ChangeLog +++ b/mcs/class/corlib/System.Security.Cryptography/ChangeLog @@ -1,9 +1,3 @@ -2004-07-15 Sebastien Pouliot <sebastien@ximian.com> - - * DES.cs: Fixed FeedbackSizeValue to 8. - * RC2.cs: Fixed FeedbackSizeValue to 8. - * TripleDES.cs: Fixed FeedbackSizeValue to 8. - 2004-06-23 Sebastien Pouliot <sebastien@ximian.com> * CryptoStream.cs: Removed the block reduction. This seems to be done diff --git a/mcs/class/corlib/System.Security.Cryptography/DES.cs b/mcs/class/corlib/System.Security.Cryptography/DES.cs index cb678113d6c..a775477b436 100644 --- a/mcs/class/corlib/System.Security.Cryptography/DES.cs +++ b/mcs/class/corlib/System.Security.Cryptography/DES.cs @@ -6,6 +6,10 @@ // Sebastien Pouliot <sebastien@ximian.com> // // Portions (C) 2002 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 @@ -46,7 +50,7 @@ public abstract class DES : SymmetricAlgorithm { { KeySizeValue = 64; BlockSizeValue = 64; - FeedbackSizeValue = 8; + FeedbackSizeValue = 64; LegalKeySizesValue = new KeySizes[1]; LegalKeySizesValue[0] = new KeySizes(64, 64, 0); diff --git a/mcs/class/corlib/System.Security.Cryptography/RC2.cs b/mcs/class/corlib/System.Security.Cryptography/RC2.cs index 70119078722..58566078d5f 100644 --- a/mcs/class/corlib/System.Security.Cryptography/RC2.cs +++ b/mcs/class/corlib/System.Security.Cryptography/RC2.cs @@ -5,6 +5,10 @@ // Andrew Birkett (andy@nobugs.org) // 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 @@ -73,7 +77,7 @@ namespace System.Security.Cryptography { { KeySizeValue = 128; BlockSizeValue = 64; - FeedbackSizeValue = 8; + FeedbackSizeValue = 64; // The RFC allows keys of 1 to 128 bytes, but MS impl only supports // 40 to 128 bits, sigh. diff --git a/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs b/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs index add883b6ce8..54969879d16 100644 --- a/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs +++ b/mcs/class/corlib/System.Security.Cryptography/TripleDES.cs @@ -5,6 +5,10 @@ // Sebastien Pouliot <sebastien@ximian.com> // // (C) 2002, 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 @@ -47,7 +51,7 @@ public abstract class TripleDES : SymmetricAlgorithm { // from SymmetricAlgorithm KeySizeValue = 192; BlockSizeValue = 64; - FeedbackSizeValue = 8; + FeedbackSizeValue = 64; LegalKeySizesValue = new KeySizes [1]; LegalKeySizesValue [0] = new KeySizes (128, 192, 64); diff --git a/mcs/class/corlib/System.Threading/ChangeLog b/mcs/class/corlib/System.Threading/ChangeLog index d6236617956..ba1a9664f98 100644 --- a/mcs/class/corlib/System.Threading/ChangeLog +++ b/mcs/class/corlib/System.Threading/ChangeLog @@ -1,15 +1,3 @@ -2004-08-04 Gonzalo Paniagua Javier <gonzalo@ximian.com> - - * Timer.cs: don't invoke the callback if the period changes before the - due time. Fixes bug #62421. - -2004-07-15 Dick Porter <dick@ximian.com> - - * Thread.cs: Hold a lock in GetNamedDataSlot. Fixes bug 61582, - based on patch by Sébastien Robitaille - (sebastien.robitaille@croesus.com). Also fix instances of - lock(typeof(Thread)) to lock a private object instead. - 2004-06-24 Dick Porter <dick@ximian.com> * Mutex.cs: Implement the createdNew parameter diff --git a/mcs/class/corlib/System.Threading/Thread.cs b/mcs/class/corlib/System.Threading/Thread.cs index 911fb1dbe12..66826e12d40 100755 --- a/mcs/class/corlib/System.Threading/Thread.cs +++ b/mcs/class/corlib/System.Threading/Thread.cs @@ -157,10 +157,9 @@ namespace System.Threading // Stores a hash keyed by strings of LocalDataStoreSlot objects static Hashtable datastorehash; - private static object datastore_lock = new object (); - + private static void InitDataStoreHash () { - lock (datastore_lock) { + lock (typeof (Thread)) { if (datastorehash == null) { datastorehash = Hashtable.Synchronized(new Hashtable()); } @@ -168,7 +167,7 @@ namespace System.Threading } public static LocalDataStoreSlot AllocateNamedDataSlot(string name) { - lock (datastore_lock) { + lock (typeof (Thread)) { if (datastorehash == null) InitDataStoreHash (); LocalDataStoreSlot slot = (LocalDataStoreSlot)datastorehash[name]; @@ -187,7 +186,7 @@ namespace System.Threading } public static void FreeNamedDataSlot(string name) { - lock (datastore_lock) { + lock (typeof (Thread)) { if (datastorehash == null) InitDataStoreHash (); LocalDataStoreSlot slot=(LocalDataStoreSlot)datastorehash[name]; @@ -211,17 +210,15 @@ namespace System.Threading public extern static int GetDomainID(); public static LocalDataStoreSlot GetNamedDataSlot(string name) { - lock (datastore_lock) { - if (datastorehash == null) - InitDataStoreHash (); - LocalDataStoreSlot slot=(LocalDataStoreSlot)datastorehash[name]; + if (datastorehash == null) + InitDataStoreHash (); + LocalDataStoreSlot slot=(LocalDataStoreSlot)datastorehash[name]; - if(slot==null) { - slot=AllocateNamedDataSlot(name); - } - - return(slot); + if(slot==null) { + slot=AllocateNamedDataSlot(name); } + + return(slot); } [MethodImplAttribute(MethodImplOptions.InternalCall)] diff --git a/mcs/class/corlib/System.Threading/Timer.cs b/mcs/class/corlib/System.Threading/Timer.cs index 1675a5a4be7..164c60ef2ca 100755 --- a/mcs/class/corlib/System.Threading/Timer.cs +++ b/mcs/class/corlib/System.Threading/Timer.cs @@ -195,11 +195,10 @@ namespace System.Threading if (runner == null) return false; - - start_event.Reset (); - runner.Abort (); + runner.DueTime = dueTime; runner.Period = period; + runner.Abort (); start_event.Set (); return true; } diff --git a/mcs/class/corlib/System/Activator.cs b/mcs/class/corlib/System/Activator.cs index 6cb4c24b262..4727251d9e6 100644 --- a/mcs/class/corlib/System/Activator.cs +++ b/mcs/class/corlib/System/Activator.cs @@ -168,10 +168,9 @@ namespace System length = args.Length; Type [] atypes = new Type [length]; - for (int i = 0; i < length; ++i) - if (args [i] != null) - atypes [i] = args [i].GetType (); - + for (int i = 0; i < length; ++i) { + atypes [i] = args [i].GetType (); + } ConstructorInfo ctor = type.GetConstructor (atypes); if (ctor == null) { if (type.IsValueType && atypes.Length == 0) @@ -214,10 +213,9 @@ namespace System length = args.Length; Type[] atypes = new Type [length]; - for (int i = 0; i < length; ++i) - if (args [i] != null) - atypes [i] = args [i].GetType (); - + for (int i = 0; i < length; ++i) { + 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 f9e07458385..b345b93f069 100644 --- a/mcs/class/corlib/System/ChangeLog +++ b/mcs/class/corlib/System/ChangeLog @@ -1,34 +1,3 @@ -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) - allows 12, that should not be accepted (13 is rejected) and - interpreted as 0. This fixes bug 63376. - -2004-08-17 Sebastien Pouliot <sebastien@ximian.com> - - * Version.cs: Fixed Clone so we can use it on versions with only - major/minor or major/minor/build. - -2004-07-07 Geoff Norton <gnorton@customerdna.com> - - * Monotype.cs: Patch for bug #58844. Dont throw exceptions right away; - pass through all the possibly BindingInfo's and keep a bool value as to the type - of exception we might need to throw; - -2004-07-07 Geoff Norton <gnorton@customerdna.com> - - * Patch to fix bug #58973 - 2004-06-25 Ben Maurer <bmaurer@ximian.com> * Environment.cs: GetFolderPath has new behavior. r=miguel diff --git a/mcs/class/corlib/System/DateTime.cs b/mcs/class/corlib/System/DateTime.cs index ca1e1e564f7..cb90d719a98 100644 --- a/mcs/class/corlib/System/DateTime.cs +++ b/mcs/class/corlib/System/DateTime.cs @@ -1007,10 +1007,8 @@ namespace System num = 1; } - if (hour > 12) + if (hour >= 12) return false; - if (hour == 12) - hour = 0; break; case 'H': diff --git a/mcs/class/corlib/System/Double.cs b/mcs/class/corlib/System/Double.cs index 47f0d406531..a52c482792a 100644 --- a/mcs/class/corlib/System/Double.cs +++ b/mcs/class/corlib/System/Double.cs @@ -207,10 +207,6 @@ namespace System { for (; sidx < len; sidx++){ c = s [sidx]; - if (c == '\0') { - sidx = len; - continue; - } switch (state){ case State_AllowSign: if ((style & NumberStyles.AllowLeadingSign) != 0){ diff --git a/mcs/class/corlib/System/Environment.cs b/mcs/class/corlib/System/Environment.cs index c21030f8b35..bf213ff4cb7 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/MonoType.cs b/mcs/class/corlib/System/MonoType.cs index 395332cf459..a04eeb93877 100644 --- a/mcs/class/corlib/System/MonoType.cs +++ b/mcs/class/corlib/System/MonoType.cs @@ -340,26 +340,22 @@ namespace System name = attr.MemberName; } bool ignoreCase = (invokeAttr & BindingFlags.IgnoreCase) != 0; - bool throwMissingMethodException = false; - bool throwMissingFieldException = false; if ((invokeAttr & BindingFlags.InvokeMethod) != 0) { MethodInfo[] methods = GetMethodsByName (name, invokeAttr, ignoreCase, this); object state = null; MethodBase m = binder.BindToMethod (invokeAttr, methods, ref args, modifiers, culture, namedParameters, out state); - if (m == null) { - throwMissingMethodException = true; - } else { - object result = m.Invoke (target, invokeAttr, binder, args, culture); - binder.ReorderArgumentArray (ref args, state); - return result; - } + if (m == null) + throw new MissingMethodException (); + object result = m.Invoke (target, invokeAttr, binder, args, culture); + binder.ReorderArgumentArray (ref args, state); + return result; } if ((invokeAttr & BindingFlags.GetField) != 0) { FieldInfo f = GetField (name, invokeAttr); if (f != null) { return f.GetValue (target); } else if ((invokeAttr & BindingFlags.GetProperty) == 0) { - throwMissingFieldException = true; + throw new MissingFieldException (); } /* try GetProperty */ } else if ((invokeAttr & BindingFlags.SetField) != 0) { @@ -368,7 +364,7 @@ namespace System f.SetValue (target, args [0]); return null; } else if ((invokeAttr & BindingFlags.SetProperty) == 0) { - throwMissingFieldException = true; + throw new MissingFieldException (); } /* try SetProperty */ } @@ -388,13 +384,11 @@ namespace System smethods [count++] = mb; } MethodBase m = binder.BindToMethod (invokeAttr, smethods, ref args, modifiers, culture, namedParameters, out state); - if (m == null) { - throwMissingFieldException = true; - } else { - object result = m.Invoke (target, invokeAttr, binder, args, culture); - binder.ReorderArgumentArray (ref args, state); - return result; - } + if (m == null) + throw new MissingFieldException (); + object result = m.Invoke (target, invokeAttr, binder, args, culture); + binder.ReorderArgumentArray (ref args, state); + return result; } else if ((invokeAttr & BindingFlags.SetProperty) != 0) { PropertyInfo[] properties = GetPropertiesByName (name, invokeAttr, ignoreCase, this); object state = null; @@ -411,19 +405,12 @@ namespace System smethods [count++] = mb; } MethodBase m = binder.BindToMethod (invokeAttr, smethods, ref args, modifiers, culture, namedParameters, out state); - if (m == null) { - throwMissingFieldException = true; - } else { - object result = m.Invoke (target, invokeAttr, binder, args, culture); - binder.ReorderArgumentArray (ref args, state); - return result; - } + if (m == null) + throw new MissingFieldException (); + object result = m.Invoke (target, invokeAttr, binder, args, culture); + binder.ReorderArgumentArray (ref args, state); + return result; } - if (throwMissingMethodException) - throw new MissingMethodException(); - if (throwMissingFieldException) - throw new MissingFieldException(); - return null; } diff --git a/mcs/class/corlib/System/Random.cs b/mcs/class/corlib/System/Random.cs index e730865d76e..3bc3e23498b 100644 --- a/mcs/class/corlib/System/Random.cs +++ b/mcs/class/corlib/System/Random.cs @@ -74,7 +74,7 @@ namespace System } } inext = 0; - inextp = 31; + inextp = 21; } protected virtual double Sample () diff --git a/mcs/class/corlib/System/Version.cs b/mcs/class/corlib/System/Version.cs index adc86fa5568..ea64cde7080 100644 --- a/mcs/class/corlib/System/Version.cs +++ b/mcs/class/corlib/System/Version.cs @@ -152,12 +152,7 @@ namespace System public object Clone () { - if (_Build == -1) - return new Version (_Major, _Minor); - else if (_Revision == -1) - return new Version (_Major, _Minor, _Build); - else - return new Version (_Major, _Minor, _Build, _Revision); + return new Version (_Major, _Minor, _Build, _Revision); } public int CompareTo (object version) diff --git a/mcs/class/corlib/Test/System.Collections/ChangeLog b/mcs/class/corlib/Test/System.Collections/ChangeLog index 885360ab080..5e7760f0fad 100644 --- a/mcs/class/corlib/Test/System.Collections/ChangeLog +++ b/mcs/class/corlib/Test/System.Collections/ChangeLog @@ -1,7 +1,3 @@ -2004-07-28 Dick Porter <dick@ximian.com> - - * ComparerTest.cs: Test for invariant compares (bug 61458.) - 2004-06-14 Sebastien Pouliot <sebastien@ximian.com> * HashtableTest.cs: Added new case to CopyTo(Array,int) an empty diff --git a/mcs/class/corlib/Test/System.Collections/ComparerTest.cs b/mcs/class/corlib/Test/System.Collections/ComparerTest.cs index c1591fc3402..c6353f4ec6a 100644 --- a/mcs/class/corlib/Test/System.Collections/ComparerTest.cs +++ b/mcs/class/corlib/Test/System.Collections/ComparerTest.cs @@ -42,16 +42,7 @@ namespace MonoTests.System.Collections { Assert(c.Compare (3, 2) > 0);
}
- - [Test] - public void Invariant () - { - Comparer c = Comparer.DefaultInvariant; - - Assert (c.Compare ("a", "A") > 0); - } - - +
}
}
diff --git a/mcs/class/corlib/Test/System.Reflection/ChangeLog b/mcs/class/corlib/Test/System.Reflection/ChangeLog index fd367c75537..2c5110a6ee3 100644 --- a/mcs/class/corlib/Test/System.Reflection/ChangeLog +++ b/mcs/class/corlib/Test/System.Reflection/ChangeLog @@ -1,7 +1,3 @@ -2004-07-03 Zoltan Varga <vargaz@freemail.hu> - - * ModuleTest.cs: New tests for FindTypes. - 2004-06-10 Lluis Sanchez <lluis@ximian.com> * AssemblyNameTest.cs: AssertEqualsByteArrays(): don't crash if arrays are diff --git a/mcs/class/corlib/Test/System/ChangeLog b/mcs/class/corlib/Test/System/ChangeLog index 1e1e1931fbe..b271ba154f9 100644 --- a/mcs/class/corlib/Test/System/ChangeLog +++ b/mcs/class/corlib/Test/System/ChangeLog @@ -1,8 +1,3 @@ -2004-08-17 Sebastien Pouliot <sebastien@ximian.com> - - * VersionTest.cs: Added tests when cloning a version with no build and - no revision numbers (-1). - 2004-06-23 Sebastien Pouliot <sebastien@ximian.com> * DoubleFormatterTest.cs: Added a new test for a negative roundtrip diff --git a/mcs/class/corlib/Test/System/VersionTest.cs b/mcs/class/corlib/Test/System/VersionTest.cs index 2467d963a48..635a485cadc 100644 --- a/mcs/class/corlib/Test/System/VersionTest.cs +++ b/mcs/class/corlib/Test/System/VersionTest.cs @@ -135,12 +135,6 @@ public class VersionTest : TestCase Assert ("A1", v1.Equals (v2)); Assert ("A2", !ReferenceEquals (v1, v2)); - - Version v3 = new Version (); // 0.0 - v2 = (Version) v3.Clone (); - - Assert ("A3", v3.Equals (v2)); - Assert ("A4", !ReferenceEquals (v3, v2)); } public void TestCompareTo () |