++2010-04-28 Marek Habersack <mhabersack@novell.com>
++
++ * Makefile (common_dirs): added System.Web.ApplicationServices
++
2010-04-14 Ankit Jain <jankit@novell.com>
* Makefile: Add Moonlight.Build.Tasks to net_2_0_dirs and
Mono.WebBrowser \
Managed.Windows.Forms \
Mono.Data.Sqlite \
++ System.Web.ApplicationServices \
System.Web \
Mono.Web \
System.Web.Services \
++2010-04-28 Marek Habersack <mhabersack@novell.com>
++
++ * Makefile (OTHER_LIB_MCS_FLAGS): added a reference to
++ System.Web.ApplicationServices in the 4.0 profile.
++
2008-03-21 Atsushi Enomoto <atsushi@ximian.com>
* Makefile : added missing EXTRA_DISTFILES.
SUBDIRS =
include ../../build/rules.make
++ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
++OTHER_LIB_MCS_FLAGS = -r:System.Web.ApplicationServices.dll
++endif
++
LIBRARY = System.IdentityModel.dll
LIB_MCS_FLAGS = \
/d:NET_3_0 \
/r:System.Security.dll \
/r:System.Web.dll \
/r:Mono.Security.dll \
-- /r:System.Runtime.Serialization.dll
++ /r:System.Runtime.Serialization.dll \
++ $(OTHER_LIB_MCS_FLAGS)
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
++2010-04-28 Marek Habersack <mhabersack@novell.com>
++
++ * Makefile (LIB_MCS_FLAGS): added a reference to
++ System.Web.ApplicationServices in the 4.0 profile.
++
2010-04-23 Astushi Enomoto <atsushi@ximian.com>
* Http_listener_notes.txt: update comment, as I have fixed one issue
LIB_MCS_FLAGS += /r:System.Net
endif
++ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
++LIB_MCS_FLAGS += /r:System.Web.ApplicationServices.dll
++endif
++
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
TEST_EXTRA_FILES = \
--- /dev/null
--- /dev/null
++//
++// AssemblyInfo.cs
++//
++// Author:
++// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
++//
++// (C) 2003 Ximian, Inc. http://www.ximian.com
++// (C) 2010 Novell, Inc (http://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.Reflection;
++using System.Resources;
++using System.Security;
++using System.Security.Permissions;
++using System.Diagnostics;
++using System.Runtime;
++using System.Runtime.CompilerServices;
++using System.Runtime.InteropServices;
++using System.Runtime.Versioning;
++
++[assembly: AssemblyTitle ("System.Web.ApplicationServices.dll")]
++[assembly: AssemblyDescription ("System.Web.ApplicationServices.dll")]
++[assembly: AssemblyDefaultAlias ("System.Web.ApplicationServices.dll")]
++
++[assembly: AssemblyCompany (Consts.MonoCompany)]
++[assembly: AssemblyProduct (Consts.MonoProduct)]
++[assembly: AssemblyCopyright (Consts.MonoCopyright)]
++[assembly: AssemblyVersion (Consts.FxVersion)]
++[assembly: SatelliteContractVersion (Consts.FxVersion)]
++[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
++[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
++
++[assembly: NeutralResourcesLanguage ("en-US")]
++[assembly: CLSCompliant (true)]
++[assembly: AssemblyDelaySign (true)]
++
++[assembly: ComVisible (false)]
++
++[assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)]
++[assembly: RuntimeCompatibility (WrapNonExceptionThrows = true)]
++[assembly: SecurityPermission (SecurityAction.RequestMinimum, SkipVerification = true)]
++
++[assembly: AssemblyKeyFile ("../msfinal.pub")]
++[assembly: InternalsVisibleTo ("System.Web, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
++
++[assembly: AssemblyTargetedPatchBand ("1.0.21-0")]
++[assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
++[assembly: AllowPartiallyTrustedCallers]
++[assembly: SecurityRules (SecurityRuleSet.Level2, SkipVerificationInFullTrust=true)]
--- /dev/null
--- /dev/null
--- /dev/null
--- /dev/null
--- /dev/null
--- /dev/null
++thisdir = class/System.Web.ApplicationServices
++SUBDIRS =
++include ../../build/rules.make
++
++LIBRARY = System.Web.ApplicationServices.dll
++LIB_MCS_FLAGS = -r:System.dll \
++ -r:System.Configuration.dll \
++ -d:SYSTEM_WEB_APPLICATIONSERVICES
++
++EXTRA_DISTFILES = $(RESOURCE_FILES)
++
++VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
++ifndef VALID_PROFILE
++LIBRARY_NAME = dummy-System.Web.ApplicationServices.dll
++NO_INSTALL = yes
++NO_SIGN_ASSEMBLY = yes
++NO_TEST = yes
++endif
++
++include ../../build/library.make
--- /dev/null
--- /dev/null
++Assembly/AssemblyInfo.cs
++../../build/common/Consts.cs
++../../build/common/Locale.cs
++../../build/common/MonoTODOAttribute.cs
--- /dev/null
--- /dev/null
++//
++// System.Web.Security.MembershipPasswordCompatibilityMode
++//
++// Authors:
++// Marek Habersack <mhabersack@novell.com>
++//
++// Copyright (C) 2010 Novell, Inc (http://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;
++
++namespace System.Web.Configuration
++{
++ public enum MembershipPasswordCompatibilityMode
++ {
++ Framework20,
++ Framework40
++ }
++}
--- /dev/null
--- /dev/null
++//
++// IMembershipHelper.cs
++//
++// Authors:
++// Marek Habersack <mhabersack@novell.com>
++//
++// Copyright (C) 2010 Novell, Inc. (http://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.
++//
++namespace System.Web.Security
++{
++ interface IMembershipHelper
++ {
++ int UserIsOnlineTimeWindow { get; }
++ MembershipProviderCollection Providers { get; }
++ byte [] DecryptPassword (byte [] encodedPassword);
++ byte[] EncryptPassword (byte[] password);
++ }
++}
--- /dev/null
--- /dev/null
++#include System.Web.ApplicationServices.dll.sources
++
++Assembly/AssemblyInfo.cs
++../../build/common/Consts.cs
++../../build/common/Locale.cs
++../../build/common/MonoTODOAttribute.cs
++
++System.Web.Configuration/MembershipPasswordCompatibilityMode.cs
++System.Web.Security/IMembershipHelper.cs
++
++../System.Web/System.Web.UI/KeyedList.cs
++../System.Web/System.Web.UI/KeyedListEnumerator.cs
++../System.Web/System.Web.Security/MembershipCreateStatus.cs
++../System.Web/System.Web.Security/MembershipCreateUserException.cs
++../System.Web/System.Web.Security/MembershipPasswordException.cs
++../System.Web/System.Web.Security/MembershipPasswordFormat.cs
++../System.Web/System.Web.Security/MembershipProviderCollection.cs
++../System.Web/System.Web.Security/MembershipProvider.cs
++../System.Web/System.Web.Security/MembershipUserCollection.cs
++../System.Web/System.Web.Security/MembershipUser.cs
++../System.Web/System.Web.Security/MembershipValidatePasswordEventHandler.cs
++../System.Web/System.Web.Security/RoleProvider.cs
++../System.Web/System.Web.Security/ValidatePasswordEventArgs.cs
++2010-04-28 Marek Habersack <mhabersack@novell.com>
++
++ * Makefile (OTHER_LIB_MCS_FLAGS): added a reference to
++ System.Web.ApplicationServices in the 4.0 profile.
++
2009-12-15 Marek Habersack <mhabersack@novell.com>
* System.Web.Extensions_test.dll.sources: added
$(wildcard ../System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/*.as?x) \
$(wildcard ../System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/*.master)
++ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
++OTHER_LIB_MCS_FLAGS += -r:System.Web.ApplicationServices.dll
++endif
++
LIB_MCS_FLAGS = \
-unsafe \
-define:NET_3_5 \
++2010-04-28 Marek Habersack <mhabersack@novell.com>
++
++ * Makefile (OTHER_LIB_MCS_FLAGS): added a reference to
++ System.Web.ApplicationServices in the 4.0 profile.
++
2010-04-07 Marek Habersack <mhabersack@novell.com>
* Makefile: moved App_* test resources to separate variables -
OTHER_LIB_MCS_FLAGS = -d:INSIDE_SYSTEM_WEB -nowarn:618 -r:System.Configuration.dll -r:Mono.Data.Sqlite.dll
endif
++ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
++OTHER_LIB_MCS_FLAGS += -r:System.Web.ApplicationServices.dll
++endif
++
LIB_MCS_FLAGS = \
-unsafe \
-nowarn:612,618 \
++2010-04-28 Marek Habersack <mhabersack@novell.com>
++
++ * RolePrincipal.cs: class is not sealed in 4.0
++
++ * MembershipUser.cs: type forwarded to
++ System.Web.ApplicationServices in 4.0.
++ In the 4.0 profile, a MembershipHelper instance is created using
++ reflection, so that the Membership class and password
++ encryption/decryption services can be accessed without referencing
++ System.Web
++
++ * MembershipProvider.cs: type forwarded to
++ System.Web.ApplicationServices in 4.0.
++ {Encrypt,Decrypt}Password implementations moved to
++ MembershipHelper.
++ Added new EncryptPassword overload for 4.0
++
++ * MembershipHelper.cs: a helper class to handle password
++ encryption/decryption and to forward requests for certain
++ Membership properties in 4.0. It is used also in 2.0 to keep code
++ cleaner. System.Web.ApplicationServices uses it to access the
++ Membership class without having to reference System.Web
++
++ * MembershipCreateStatus.cs, MembershipCreateUserException.cs,
++ MembershipPasswordException.cs, MembershipPasswordFormat.cs,
++ MembershipProviderCollection.cs, MembershipUserCollection.cs,
++ MembershipValidatePasswordEventHandler.cs, RoleProvider.cs,
++ ValidatePasswordEventArgs.cs:
++ types forwarded to System.Web.ApplicationServices in 4.0
++
++ * FormsIdentity.cs: class is not sealed in 4.0
++
2010-02-11 Marek Habersack <mhabersack@novell.com>
* Roles.cs: IsUserInRole checks if username is null or empty
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
[Serializable]
-- public sealed class FormsIdentity : IIdentity
++#if NET_4_0
++ public
++#else
++ public sealed
++#endif
++ class FormsIdentity : IIdentity
{
FormsAuthenticationTicket ticket;
// 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.Runtime.CompilerServices;
--#if NET_2_0
--namespace System.Web.Security {
--
-- public enum MembershipCreateStatus {
++namespace System.Web.Security
++{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
++ public enum MembershipCreateStatus
++ {
Success,
InvalidUserName,
InvalidPassword,
ProviderError
}
}
--#endif
++
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
--#if NET_2_0
using System;
using System.Runtime.Serialization;
++using System.Runtime.CompilerServices;
namespace System.Web.Security
{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
[Serializable]
public class MembershipCreateUserException : Exception
{
}
}
}
--#endif
++
--- /dev/null
--- /dev/null
++//
++// System.Web.Security.MembershipEncryptionHelper
++//
++// Authors:
++// Ben Maurer (bmaurer@users.sourceforge.net)
++// Lluis Sanchez Gual (lluis@novell.com)
++//
++// (C) 2003 Ben Maurer
++// Copyright (C) 2005-2010 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.Configuration.Provider;
++using System.Security.Cryptography;
++using System.Web.Configuration;
++
++namespace System.Web.Security
++{
++ sealed class MembershipHelper
++#if NET_4_0
++ : IMembershipHelper
++#endif
++ {
++ internal const int SALT_BYTES = 16;
++
++ public int UserIsOnlineTimeWindow {
++ get { return Membership.UserIsOnlineTimeWindow; }
++ }
++
++ public MembershipProviderCollection Providers {
++ get { return Membership.Providers; }
++ }
++
++ static SymmetricAlgorithm GetAlg ()
++ {
++ MachineKeySection section = (MachineKeySection) WebConfigurationManager.GetSection ("system.web/machineKey");
++
++ if (section.DecryptionKey.StartsWith ("AutoGenerate"))
++ throw new ProviderException ("You must explicitly specify a decryption key in the <machineKey> section when using encrypted passwords.");
++
++ string alg_type = section.Decryption;
++ if (alg_type == "Auto")
++ alg_type = "AES";
++
++ SymmetricAlgorithm alg = null;
++ if (alg_type == "AES")
++ alg = Rijndael.Create ();
++ else if (alg_type == "3DES")
++ alg = TripleDES.Create ();
++ else
++ throw new ProviderException (String.Format ("Unsupported decryption attribute '{0}' in <machineKey> configuration section", alg_type));
++
++ alg.Key = MachineKeySectionUtils.DecryptionKey192Bits (section);
++ return alg;
++ }
++
++ public byte [] DecryptPassword (byte [] encodedPassword)
++ {
++ using (SymmetricAlgorithm alg = GetAlg ()) {
++ // alg.Key is set in GetAlg based on web.config
++ // iv is the first part of the encodedPassword
++ byte [] iv = new byte [alg.IV.Length];
++ Array.Copy (encodedPassword, 0, iv, 0, iv.Length);
++ using (ICryptoTransform decryptor = alg.CreateDecryptor (alg.Key, iv)) {
++ return decryptor.TransformFinalBlock (encodedPassword, iv.Length, encodedPassword.Length - iv.Length);
++ }
++ }
++ }
++
++ public byte[] EncryptPassword (byte[] password)
++ {
++ using (SymmetricAlgorithm alg = GetAlg ()) {
++ // alg.Key is set in GetAlg based on web.config
++ // alg.IV is randomly set (default behavior) and perfect for our needs
++ byte [] iv = alg.IV;
++ using (ICryptoTransform encryptor = alg.CreateEncryptor (alg.Key, iv)) {
++ byte [] encrypted = encryptor.TransformFinalBlock (password, 0, password.Length);
++ byte [] output = new byte [iv.Length + encrypted.Length];
++ // note: the IV can be public, however it should not be based on the password
++ Array.Copy (iv, 0, output, 0, iv.Length);
++ Array.Copy (encrypted, 0, output, iv.Length, encrypted.Length);
++ return output;
++ }
++ }
++ }
++ }
++}
+++ /dev/null
--//
--// System.Web.Security.MembershipOnlineStatus
--//
--// Authors:
--// Ben Maurer (bmaurer@users.sourceforge.net)
--//
--// (C) 2003 Ben Maurer
--//
--
--//
--// 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.
--//
--
--#if NET_2_0
--namespace System.Web.Security {
-- public enum MembershipOnlineStatus {
-- All = 0,
-- Online = 1,
-- Offline = 2
-- }
--}
--#endif
--
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
--#if NET_2_0
--
using System;
using System.Runtime.Serialization;
++using System.Runtime.CompilerServices;
namespace System.Web.Security
{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
[Serializable]
public class MembershipPasswordException : Exception
{
}
}
}
--#endif
++
// 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.Runtime.CompilerServices;
--#if NET_2_0
--namespace System.Web.Security {
-- public enum MembershipPasswordFormat {
++namespace System.Web.Security
++{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
++ public enum MembershipPasswordFormat
++ {
Clear = 0,
Hashed = 1,
Encrypted = 2
}
}
--#endif
++
// Lluis Sanchez Gual (lluis@novell.com)
//
// (C) 2003 Ben Maurer
--// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
++// Copyright (C) 2005-2010 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
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
--#if NET_2_0
using System.ComponentModel;
using System.Configuration.Provider;
--using System.Web.Configuration;
++using System.Reflection;
++using System.Runtime.CompilerServices;
using System.Security.Cryptography;
using System.Text;
++using System.Web.Configuration;
namespace System.Web.Security
{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
public abstract class MembershipProvider : ProviderBase
{
-- static readonly object validatingPasswordEvent = new object ();
++#if NET_4_0
++ const string HELPER_TYPE_NAME = "System.Web.Security.MembershipHelper, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
++ internal static IMembershipHelper Helper {
++ get { return helper; }
++ }
++ static IMembershipHelper helper;
++#else
++ static MembershipHelper helper;
++#endif
++
++ static readonly object validatingPasswordEvent = new object ();
++
EventHandlerList events = new EventHandlerList ();
public event MembershipValidatePasswordEventHandler ValidatingPassword {
add { events.AddHandler (validatingPasswordEvent, value); }
remove { events.RemoveHandler (validatingPasswordEvent, value); }
}
--
++
++ static MembershipProvider ()
++ {
++#if NET_4_0
++ Type type = Type.GetType (HELPER_TYPE_NAME, false);
++ if (type == null)
++ return;
++
++ try {
++ helper = Activator.CreateInstance (type) as IMembershipHelper;
++ } catch {
++ // ignore
++ }
++#else
++ helper = new MembershipHelper ();
++#endif
++ }
++
protected MembershipProvider ()
{
}
eh (this, args);
}
-- SymmetricAlgorithm GetAlg ()
-- {
-- MachineKeySection section = (MachineKeySection) WebConfigurationManager.GetSection ("system.web/machineKey");
--
-- if (section.DecryptionKey.StartsWith ("AutoGenerate"))
-- throw new ProviderException ("You must explicitly specify a decryption key in the <machineKey> section when using encrypted passwords.");
--
-- string alg_type = section.Decryption;
-- if (alg_type == "Auto")
-- alg_type = "AES";
--
-- SymmetricAlgorithm alg = null;
-- if (alg_type == "AES")
-- alg = Rijndael.Create ();
-- else if (alg_type == "3DES")
-- alg = TripleDES.Create ();
-- else
-- throw new ProviderException (String.Format ("Unsupported decryption attribute '{0}' in <machineKey> configuration section", alg_type));
--
-- alg.Key = MachineKeySectionUtils.DecryptionKey192Bits (section);
-- return alg;
-- }
--
-- internal const int SALT_BYTES = 16;
protected virtual byte [] DecryptPassword (byte [] encodedPassword)
{
-- using (SymmetricAlgorithm alg = GetAlg ()) {
-- // alg.Key is set in GetAlg based on web.config
-- // iv is the first part of the encodedPassword
-- byte [] iv = new byte [alg.IV.Length];
-- Array.Copy (encodedPassword, 0, iv, 0, iv.Length);
-- using (ICryptoTransform decryptor = alg.CreateDecryptor (alg.Key, iv)) {
-- return decryptor.TransformFinalBlock (encodedPassword, iv.Length, encodedPassword.Length - iv.Length);
-- }
-- }
++#if NET_4_0
++ if (helper == null)
++ throw new PlatformNotSupportedException ("This method is not available.");
++#endif
++ return helper.DecryptPassword (encodedPassword);
}
protected virtual byte[] EncryptPassword (byte[] password)
{
-- using (SymmetricAlgorithm alg = GetAlg ()) {
-- // alg.Key is set in GetAlg based on web.config
-- // alg.IV is randomly set (default behavior) and perfect for our needs
-- byte [] iv = alg.IV;
-- using (ICryptoTransform encryptor = alg.CreateEncryptor (alg.Key, iv)) {
-- byte [] encrypted = encryptor.TransformFinalBlock (password, 0, password.Length);
-- byte [] output = new byte [iv.Length + encrypted.Length];
-- // note: the IV can be public, however it should not be based on the password
-- Array.Copy (iv, 0, output, 0, iv.Length);
-- Array.Copy (encrypted, 0, output, iv.Length, encrypted.Length);
-- return output;
-- }
-- }
++#if NET_4_0
++ return EncryptPassword (password, MembershipPasswordCompatibilityMode.Framework20);
++#else
++ return helper.EncryptPassword (password);
++#endif
++ }
++#if NET_4_0
++ [MonoTODO ("Discover what actually is 4.0 password compatibility mode.")]
++ protected virtual byte[] EncryptPassword (byte[] password, MembershipPasswordCompatibilityMode legacyPasswordCompatibilityMode)
++ {
++ if (helper == null)
++ throw new PlatformNotSupportedException ("This method is not available.");
++
++ if (legacyPasswordCompatibilityMode == MembershipPasswordCompatibilityMode.Framework40)
++ throw new PlatformNotSupportedException ("Framework 4.0 password encryption mode is not supported at this time.");
++
++ return helper.EncryptPassword (password);
}
++#endif
}
}
--#endif
++
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
--
--#if NET_2_0
using System.Configuration.Provider;
++using System.Runtime.CompilerServices;
--namespace System.Web.Security {
--
++namespace System.Web.Security
++{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
public sealed class MembershipProviderCollection : ProviderCollection
{
public override void Add (ProviderBase provider)
}
}
}
--#endif
++
+++ /dev/null
--//
--// System.Web.Security.MembershipSortOptions
--//
--// Authors:
--// Ben Maurer (bmaurer@users.sourceforge.net)
--//
--// (C) 2003 Ben Maurer
--//
--
--//
--// 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.
--//
--
--#if NET_2_0
--namespace System.Web.Security {
-- public enum MembershipSortOptions {
-- UserName = 0,
-- CreationDate = 1,
-- LastActivityDate = 2,
-- LastLoginDate = 3,
-- LastPasswordChangeDate = 4,
-- Email = 5
-- }
--}
--#endif
--
// 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.Reflection;
++using System.Runtime.CompilerServices;
--#if NET_2_0
namespace System.Web.Security
{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
[Serializable]
public class MembershipUser
{
DateTime lastActivityDate;
DateTime lastPasswordChangedDate;
DateTime lastLockoutDate;
--
++
protected MembershipUser ()
{
}
public virtual bool IsLockedOut {
get { return isLockedOut; }
}
--
-- public bool IsOnline {
++
++#if NET_4_0
++ public virtual
++#else
++ public
++#endif
++ bool IsOnline {
get {
-- return LastActivityDate > DateTime.Now - TimeSpan.FromMinutes (Membership.UserIsOnlineTimeWindow);
++ int minutes;
++#if NET_4_0
++ IMembershipHelper helper = MembershipProvider.Helper;
++ if (helper == null)
++ throw new PlatformNotSupportedException ("The method is not available.");
++ minutes = helper.UserIsOnlineTimeWindow;
++#else
++ minutes = Membership.UserIsOnlineTimeWindow;
++#endif
++ return LastActivityDate > DateTime.Now - TimeSpan.FromMinutes (minutes);
}
}
MembershipProvider Provider {
get {
-- MembershipProvider p = Membership.Providers [ProviderName];
-- if (p == null) throw new InvalidOperationException ("Membership provider '" + ProviderName + "' not found.");
++ MembershipProvider p;
++#if NET_4_0
++ IMembershipHelper helper = MembershipProvider.Helper;
++ if (helper == null)
++ throw new PlatformNotSupportedException ("The method is not available.");
++ p = helper.Providers [ProviderName];
++#else
++ p = Membership.Providers [ProviderName];
++#endif
++ if (p == null)
++ throw new InvalidOperationException ("Membership provider '" + ProviderName + "' not found.");
return p;
}
}
}
}
--#endif
++
// Ben Maurer (bmaurer@users.sourceforge.net)
//
// (C) 2003 Ben Maurer
--// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
++// Copyright (C) 2005-2010 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
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
--#if NET_2_0
using System.Collections;
++using System.Runtime.CompilerServices;
using System.Web.UI;
--namespace System.Web.Security {
--
++namespace System.Web.Security
++{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
[Serializable]
-- public sealed class MembershipUserCollection : ICollection {
--
++ public sealed class MembershipUserCollection : ICollection
++ {
public MembershipUserCollection ()
{
}
bool readOnly = false;
}
}
--#endif
++
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
--#if NET_2_0
++using System.Runtime.CompilerServices;
namespace System.Web.Security
{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
public delegate void MembershipValidatePasswordEventHandler (object sender, ValidatePasswordEventArgs e);
}
--#endif
++
// Sebastien Pouliot <sebastien@ximian.com>
//
// (C) 2003 Ben Maurer
--// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
++// Copyright (C) 2005-2010 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
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
--#if NET_2_0
--
using System.Collections.Specialized;
using System.Security.Cryptography;
using System.Security.Permissions;
[Serializable]
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-- public sealed class RolePrincipal : IPrincipal {
++#if NET_4_0
++ public
++#else
++ public sealed
++#endif
++ class RolePrincipal : IPrincipal {
IIdentity _identity;
bool _listChanged;
}
}
}
--#endif
++
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
--
--#if NET_2_0
using System.Configuration.Provider;
++using System.Runtime.CompilerServices;
namespace System.Web.Security
{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
public abstract class RoleProvider : ProviderBase
{
protected RoleProvider ()
public abstract string ApplicationName { get; set; }
}
}
--#endif
++
string passwordSalt = "";
RandomNumberGenerator rng = RandomNumberGenerator.Create ();
-- byte [] salt = new byte [SALT_BYTES];
++ byte [] salt = new byte [MembershipHelper.SALT_BYTES];
rng.GetBytes (salt);
passwordSalt = Convert.ToBase64String (salt);
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
--
--#if NET_2_0
--
using System;
++using System.Runtime.CompilerServices;
namespace System.Web.Security
{
++#if NET_4_0
++ [TypeForwardedFrom ("System.Web, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b03f5f7f11d50a3a")]
++#endif
public sealed class ValidatePasswordEventArgs: EventArgs
{
bool cancel;
}
}
--#endif
++2010-04-28 Marek Habersack <mhabersack@novell.com>
++
++ * KeyedList.cs: do not implement IStateManager in 4.0
++
2010-04-12 Marek Habersack <mhabersack@novell.com>
* PageParser.cs: if EnableViewStateMac option is present in the
namespace System.Web.UI
{
--
-- internal class KeyedList : IOrderedDictionary, IStateManager
++ class KeyedList : IOrderedDictionary
++#if !NET_4_0
++ , IStateManager // why do we implement it at all?
++#endif
{
Hashtable objectTable = new Hashtable ();
{
return new KeyedListEnumerator (objectList);
}
--
++#if !NET_4_0
void IStateManager.LoadViewState (object state)
{
if (state != null)
{
trackViewState = true;
}
--
++#endif
public int Count {
get { return objectList.Count; }
}
get { return this; }
}
++#if !NET_4_0
bool trackViewState;
bool IStateManager.IsTrackingViewState {
get { return trackViewState; }
}
--
++#endif
int IndexOf (object key)
{
for (int i = 0; i < objectList.Count; i++)
System.Web.Security/FormsAuthenticationModule.cs
System.Web.Security/FormsAuthenticationTicket.cs
System.Web.Security/FormsIdentity.cs
--System.Web.Security/MembershipCreateStatus.cs
--System.Web.Security/MembershipCreateUserException.cs
System.Web.Security/Membership.cs
--System.Web.Security/MembershipOnlineStatus.cs
--System.Web.Security/MembershipPasswordException.cs
--System.Web.Security/MembershipPasswordFormat.cs
--System.Web.Security/MembershipProviderCollection.cs
--System.Web.Security/MembershipProvider.cs
--System.Web.Security/MembershipSortOptions.cs
--System.Web.Security/MembershipUserCollection.cs
--System.Web.Security/MembershipUser.cs
--System.Web.Security/MembershipValidatePasswordEventHandler.cs
++System.Web.Security/MembershipHelper.cs
System.Web.Security/PassportAuthenticationEventArgs.cs
System.Web.Security/PassportAuthenticationEventHandler.cs
System.Web.Security/PassportAuthenticationModule.cs
System.Web.Security/RoleManagerModule.cs
System.Web.Security/RolePrincipal.cs
System.Web.Security/RoleProviderCollection.cs
--System.Web.Security/RoleProvider.cs
System.Web.Security/Roles.cs
System.Web.Security/SqliteMembershipProvider.cs
System.Web.Security/SqliteRoleProvider.cs
System.Web.Security/SqlMembershipProvider.cs
System.Web.Security/SqlRoleProvider.cs
System.Web.Security/UrlAuthorizationModule.cs
--System.Web.Security/ValidatePasswordEventArgs.cs
System.Web.Security/WindowsAuthenticationEventArgs.cs
System.Web.Security/WindowsAuthenticationEventHandler.cs
System.Web.Security/WindowsAuthenticationModule.cs
System.Web.UI/IUserControlDesignerAccessor.cs
System.Web.UI/IUserControlTypeResolutionService.cs
System.Web.UI/IValidator.cs
--System.Web.UI/KeyedList.cs
--System.Web.UI/KeyedListEnumerator.cs
System.Web.UI/ListSourceHelper.cs
System.Web.UI/LiteralControl.cs
System.Web.UI/LosFormatter.cs
--- /dev/null
--- /dev/null
++#include System.Web.dll.sources
++
++System.Web.UI/KeyedList.cs
++System.Web.UI/KeyedListEnumerator.cs
++System.Web.Security/MembershipCreateStatus.cs
++System.Web.Security/MembershipCreateUserException.cs
++System.Web.Security/MembershipPasswordException.cs
++System.Web.Security/MembershipPasswordFormat.cs
++System.Web.Security/MembershipProviderCollection.cs
++System.Web.Security/MembershipProvider.cs
++System.Web.Security/MembershipUserCollection.cs
++System.Web.Security/MembershipUser.cs
++System.Web.Security/MembershipValidatePasswordEventHandler.cs
++System.Web.Security/RoleProvider.cs
++System.Web.Security/ValidatePasswordEventArgs.cs