Commit Graph
30 Commits
Author SHA1 Message Date
Rodrigo Kumpera b96d05dac3 Kill the MOONLIGHT define in corlib. 2013-02-11 16:03:28 -05:00
Jb Evain a3f7ce80a7 use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153667
2010-03-16 12:19:11 +00:00
Miguel de Icaza 3c39ac4586 Jumbo patch for NET_2_0, mscorlib is now clean
svn path=/trunk/mcs/; revision=145621
2009-11-06 22:23:59 +00:00
Jb Evain 288e614ea4 bring Mono Security to monotouch
svn path=/trunk/mcs/; revision=141615
2009-09-09 15:34:58 +00:00
Sebastien Pouliot 1957b68645 In System.Security:
2009-04-27  Sebastien Pouliot  <[email protected]>

	* SecurityException.cs: Remove CAS-specific stuff from ToString
	* SecurityManager.cs: Do not include for NET_2_1 build
	* SecurityManager_2_1.cs: Alternate implementation for NET_2_1

In .:
2009-04-27  Sebastien Pouliot  <[email protected]>

	* corlib.dll.sources: Add new specific to 2.1 version of some 
	classes.

In System.Security.Policy:
2009-04-27  Sebastien Pouliot  <[email protected]>

	* Evidence.cs: Custom GetDefaultHostEvidence for NET_2_1
	* Hash.cs: Do not include for NET_2_1 build
	* HashMembershipCondition.cs: Do not include for NET_2_1 build
	* PolicyLevel.cs: Do not include for NET_2_1 build
	* PolicyLevel_2_1.cs: Alternate implementation for NET_2_1
	* Zone.cs: Do not include for NET_2_1 build
	* ZoneMembershipCondition.cs: Do not include for NET_2_1 build


svn path=/trunk/mcs/; revision=132774
2009-04-27 19:07:56 +00:00
Sebastien Pouliot b3b1df1b20 2005-09-25 Sebastien Pouliot <[email protected]>
* ApplicationTrustCollection.cs: RC changed the constructor to non
	public.
	* PolicyLevel.cs: All stuff related to FullyTrustedAssemblies is 
	obsoleted in 2.0 because (a) all permission must be installed into the
	GAC, (b) everything in the GAC gets fulltrust and (c) full trust now
	means even identity permissions (like StrongNameIdentityPermission)
	succeed for unrestricted (even if it doesn't match).


svn path=/trunk/mcs/; revision=50743
2005-09-26 03:12:19 +00:00
Sebastien Pouliot e94b6fc3fa 2005-08-30 Sebastien Pouliot <[email protected]>
* PolicyLevel.cs: Set SecurityManager.ResolvingPolicyLevel to the 
	current policylevel instance if we want to use the FullTrustAssemblies
	collection.


svn path=/trunk/mcs/; revision=49143
2005-08-30 18:49:03 +00:00
Sebastien Pouliot 402e8ca874 2005-06-23 Sebastien Pouliot <[email protected]>
* ApplicationDirectory.cs, CodeConnectAccess.cs, Hash.cs, 
	NetCodeGroup.cs, PermissionRequestEvidence.cs, PolicyLevel.cs,
	Publisher.cs. Site.cs, StrongName.cs, TrustManagerContext.cs. Url.cs:
	better comments on remaining TODO (all 2.0 related) to ease grepping.
	Reduced the number of casts in some Equals methods.


svn path=/trunk/mcs/; revision=46438
2005-06-23 17:12:20 +00:00
Sebastien Pouliot 6ba03dc8d3 2005-06-14 Sebastien Pouliot <[email protected]>
* Evidence.cs: Avoid creating the synchronized array lists unless they
	are needed.
	* PolicyLevel.cs: Fixed System.Drawing public key. IsFullTrustAssembly
	can now executed without a Demand for the AssemblyName. Added the
	UnionCodeGroup in the default policies. Reworked initialization to
	support FullyTrustedAssemblies.


svn path=/trunk/mcs/; revision=45968
2005-06-14 14:14:36 +00:00
Sebastien Pouliot bcecf2e0fd 2005-06-08 Sebastien Pouliot <[email protected]>
* PolicyLevel.cs: Added some missing initialization. More code reuse.


svn path=/trunk/mcs/; revision=45646
2005-06-08 16:35:11 +00:00
Sebastien Pouliot e8a41d0bfa 2005-06-01 Sebastien Pouliot <[email protected]>
* DefaultPolicies.cs: Added a method to create the default FullTrust
	assemblies in the policy configuration files.
	* PolicyLevel.cs: Splitted loading/initializing of PolicyLevel so it's
	now possible to load permissions outside corlib when resolving a 
	policy. However FullTrustAssemblies is still ignored at this stage.


svn path=/trunk/mcs/; revision=45304
2005-06-01 18:52:46 +00:00
Sebastien Pouliot c5e894e378 2005-05-26 Sebastien Pouliot <[email protected]>
* DefaultPolicies.cs: New. Creates the default security policies. 
	Permissions outside corlib are commented due to a bug with CAS when 
	loading them.
	* PolicyLevel.cs: Fixed TODO for Recover method and for reserved names
	in RemoveNamedPermissionSet method. Moved IsReserved method to new 
	DefaultPolicies class.


svn path=/trunk/mcs/; revision=45069
2005-05-26 19:24:44 +00:00
Sebastien Pouliot 06f245b898 2005-04-25 Sebastien Pouliot <[email protected]>
* AllMembershipCondition.cs: Added [ComVisible (true)] in NET_2_0 to
	match beta2.
	* ApplicationDirectory.cs: Added [ComVisible (true)] in NET_2_0 to
	match beta2. Removed FIXME - confirmed as "by design" by MS.
	* ApplicationDirectoryMembershipCondition.cs: Added [ComVisible (true)]
	in NET_2_0 to match beta2.
	* ApplicationSecurityInfo.cs: Updated to match beta2.
	* ApplicationSecurityManager.cs: Updated to match beta2.
	* ApplicationTrust.cs: Updated to match beta2.
	* ApplicationTrustCollection.cs: Updated to match beta2.
	* ApplicationTrustEnumerator.cs: Added [ComVisible (true)] to match 
	beta2.
	* ApplicationVersionMatch.cs: Added [ComVisible (true)] to match beta2.
	* CodeConnectAccess.cs: Added [ComVisible (true)] to match beta2.
	* CodeGroup.cs: Added [ComVisible (true)] in NET_2_0 to match beta2. 
	Reworked Equals to avoid multiple typecast.
	* Evidence.cs: Updated to match beta2. Now use internal method 
	Assembly.UnprotectedGetName during security manager initialization.
	* FileCodeGroup.cs: Added [ComVisible (true)] in NET_2_0 to match 
	beta2. Removed Scope property (didn't survive beta2).
	* FirstMatchCodeGroup.cs: Added [ComVisible (true)] in NET_2_0 to 
	match beta2.
	* Gac.cs: Renamed class to GacInstalled. Added [ComVisible (true)] to
	match beta2.
	* GacMembershipCondition.cs: Added [ComVisible (true)] in NET_2_0 to 
	match beta2.
	* Hash.cs: Added [ComVisible (true)] in NET_2_0 to match beta2.
	* HashMembershipCondition.cs: Added [ComVisible (true)] in NET_2_0 to
	match beta2. Reworked Equals to avoid multiple typecast.
	* IApplicationTrustManager.cs: Added [ComVisible (true)] to match 
	beta2.
	* IIdentityPermissionFactory.cs: Added [ComVisible (true)] in NET_2_0
	to match beta2.
	* IMembershipCondition.cs: Added [ComVisible (true)] in NET_2_0 to
	match beta2.
	* NetCodeGroup.cs: Added [ComVisible (true)] in NET_2_0 to match 
	beta2. Removed Scope property (didn't survive beta2).
	* PermissionRequestEvidence.cs: Added [ComVisible (true)] in NET_2_0 
	to match beta2.
	* PolicyException.cs: Added [ComVisible (true)] in NET_2_0 to match 
	beta2.
	* PolicyLevel.cs: Added [ComVisible (true)] in NET_2_0 to match beta2.
	* PolicyStatementAttribute.cs: Added [ComVisible (true)] in NET_2_0 to
	match beta2.
	* PolicyStatement.cs: Added [ComVisible (true)] in NET_2_0 to match 
	beta2.
	* ProvideAssemblyEvidenceEventArgs.cs: Added [ComVisible (true)] to 
	match beta2.
	* Publisher.cs: Added [ComVisible (true)] in NET_2_0 to	match beta2. 
	Reworked Equals to avoid multiple typecast.
	* PublisherMembershipCondition.cs: Added [ComVisible (true)] in 
	NET_2_0 to match beta2. Reworked Equals to avoid multiple typecast.
	* Site.cs: Added [ComVisible (true)] in NET_2_0 to match beta2. Fixed
	allowed characters accepted in site names (different in 2.0 from 1.x).
	* SiteMembershipCondition.cs: Added [ComVisible (true)] in NET_2_0 to
	match beta2.
	* StrongName.cs: Added [ComVisible (true)] in NET_2_0 to match beta2.
	* StrongNameMembershipCondition.cs: Added [ComVisible (true)] in 
	NET_2_0 to match beta2.
	* TrustManagerContext.cs: Updated to match beta2.
	* TrustManagerUIContext.cs: Added [ComVisible (true)] to match beta2.
	* UnionCodeGroup.cs: Added [ComVisible (true)] in NET_2_0 to match
	beta2.
	* Url.cs: Added [ComVisible (true)] in NET_2_0 to match beta2. Fixed
	the difference in Url matching between 1.x and 2.0. Reworked Equals to
	avoid multiple typecast.
	* UrlMembershipCondition.cs: Added [ComVisible (true)] in NET_2_0 to 
	match beta2. Fixed the difference in Url matching between 1.x and 2.0.
	* Zone.cs: Added [ComVisible (true)] in NET_2_0 to match beta2. 
	Reworked Equals to avoid multiple typecast.
	* ZoneMembershipCondition.cs: Added [ComVisible (true)] in NET_2_0 to
	match beta2.


svn path=/trunk/mcs/; revision=43550
2005-04-25 16:25:03 +00:00
Sebastien Pouliot f8c6950c9a 2005-01-19 Sebastien Pouliot <[email protected]>
* PolicyLevel.cs: Fixed RemoveNamedPermissionSet when used with a
	permission instance.
	* Zone.cs: Fixed zone for URIs without a scheme.


svn path=/trunk/mcs/; revision=39183
2005-01-19 16:12:44 +00:00
Sebastien Pouliot b6e20f831e * Evidence.cs:
* FileCodeGroup.cs:
	* NetCodeGroup.cs:
	* PolicyLevel.cs:
	* PolicyStatement.cs:
		Added ComVisible attributes to match 2.0 October Preview.

2004-11-26  Sebastien Pouliot  <[email protected]>


svn path=/trunk/mcs/; revision=36640
2004-11-26 15:19:53 +00:00
Sebastien Pouliot ee8314380e 2004-09-16 Sebastien Pouliot <[email protected]>
* PolicyLevel.cs: Fixed warning by re-activating safeguard

svn path=/trunk/mcs/; revision=33986
2004-09-16 23:15:57 +00:00
Sebastien Pouliot 48459437d6 2004-09-03 Sebastien Pouliot <[email protected]>
* CodeGroup.cs: Creates an empty PermissionSet (and not an empty
	NamedPermissionSet). Required to run the MSDN library samples.
	* FileCodeGroup.cs: Fixed Copy so that CodeGroup.Equals would work
	preperly. Required to run the MSDN library samples.
	* FirstMatchCodeGroup.cs: Reworked the Resolve* logic to run the MSDN
	library samples.
	* PolicyLevel.cs: Fixed RemoveNamedPermissionSet and (more) complete
	CreateAppDomainLevel to run the MSDN library samples.
	* StrongNameMembershipCondition.cs: Fix ToXml to run the MSDN library
	samples.

svn path=/trunk/mcs/; revision=33267
2004-09-03 11:43:25 +00:00
Sebastien Pouliot ae5811e3bd 2004-09-01 Sebastien Pouliot <[email protected]>
* PolicyLevel.cs: Fixed Reset not to delete/load policy file for
	AppDomain level. Added internal Resolve method for class names.

svn path=/trunk/mcs/; revision=33153
2004-09-01 12:30:08 +00:00
Sebastien Pouliot 8cd6e29fd7 2004-08-11 Sebastien Pouliot <[email protected]>
* ApplicationSecurityInfo.cs: Added missing interfaces.
	* PolicyLevel.cs: Load policies from files, using *.default files if
	policy is missing (like Fx 2.0). Fixed Resolve never to return null.
	Added hardcoded policy defaults (to be updated as CAS progress) in
	case no policy file, nor default files, are available.
	* PolicyStatement.cs: Fixed AttributeString. Added internal static
	Empty method (helper).

svn path=/trunk/mcs/; revision=32221
2004-08-11 16:47:00 +00:00
Sebastien Pouliot 28e3852214 2004-08-03 Sebastien Pouliot <[email protected]>
* CodeGroup.cs: Added PolicyLevel parameter to internal
	constructor. Added support for attribute PermissionSetName in
	FromXml.
	* FileCodeGroup.cs: Added PolicyLevel parameter to internal
	constructor.
	* FirstMatchCodeGroup.cs: Added PolicyLevel parameter to internal
	constructor.
	* NetCodeGroup.cs: Added PolicyLevel parameter to internal
	constructor.
	* PolicyLevel.cs: Throw a PolicyException when asked to save a
	AppDomain policy. Use new CodeGroup constructor with "this".
	* UnionCodeGroup.cs: Added PolicyLevel parameter to internal
	constructor. Added Copy(bool) to copy, or not, the childs.

svn path=/trunk/mcs/; revision=31812
2004-08-03 15:59:42 +00:00
Sebastien Pouliot 5dfa717844 2004-08-02 Sebastien Pouliot <[email protected]>
* CodeGroup.cs: Fixed Equals (true) which, strangely, only compares
	on level of children.
	* HashMembershipCondition.cs: Added empty constructor so Activator.
	CreateInstance can work.
	* PolicyLevel.cs: Implemented PolicyType (NET_2_0), Resolve and Save.
	* PublisherMembershipCondition.cs: Added empty constructor so
	Activator.CreateInstance can work.
	* SiteMembershipCondition.cs: Added empty constructor so Activator.
	CreateInstance can work.
	* StrongNameMembershipCondition.cs: Added empty constructor so
	Activator.CreateInstance can work.
	* UnionCodeGroup.cs: Partial implementation for Resolve (missing
	children support). Implemented ResolveMatchingCodeGroups.
	* ZoneMembershipCondition.cs: Added empty constructor so Activator.
	CreateInstance can work. Removed "class" validation in FromXml.

svn path=/trunk/mcs/; revision=31754
2004-08-02 23:08:29 +00:00
Sebastien Pouliot 7eea926385 2004-07-14 Sebastien Pouliot <[email protected]>
* NetCodeGroup.cs: Added Equals/GetHashCode methods to NET_2_0 profile.
	* PolicyLevel.cs: Added internal constructor to load a policy file
	from SecurityManager.

svn path=/trunk/mcs/; revision=31130
2004-07-14 12:11:57 +00:00
Sebastien Pouliot 8e48cbb8ff 2004-07-13 Sebastien Pouliot <[email protected]>
* Evidence.cs: Implemented Equals/GetHashCode and added Clear and
	RemoveType methods for NET_2_0 profile.
	* FileCodeGroup.cs: Added Scope property for NET_2_0 profile.
	* Hash.cs: Added static CreateMD5 and CreateSHA1 for NET_2_0 profile.
	* HashMembershipCondition.cs: Implements IDeserializationCallback and
	ISerializable for NET_2_0 profile.
	* NetCodeGroup.cs: Add methods related to CodeConnectAccess for
	NET_2_0 profile.
	* PolicyException.cs: Implements _Exception for NET_2_0 profile.
	* PolicyLevel.cs: Added Type property for NET_2_0 profile.
	* PolicyStatement.cs: Implemented Equals/GetHashCode for NET_2_0
	profile.

svn path=/trunk/mcs/; revision=31096
2004-07-13 16:46:35 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Sebastien Pouliot 41528d69e9 2004-01-26 Sebastien Pouliot <[email protected]>
* CodeGroup.cs: Now use Activator for [Named]PermissionSet. Change
	Equals so it can compile with mcs.
	* PolicyLevel.cs: Minor changes to use the new empty constructors in
	[Named]PermissionSet.

svn path=/trunk/mcs/; revision=22522
2004-01-27 02:41:18 +00:00
Sebastien Pouliot fa1e8bf5fc 2004-01-05 Sebastien Pouliot <[email protected]>
* CodeGroup.cs: Added internal constructor for PolicyLevel. Complete
	FromXml. Various small fixes to match the unit tests.
	* FileCodeGroup.cs: Added internal constructor for PolicyLevel.
	Implemented GetHashCode (may not be exactly the same as MS).
	* FirstMatchCodeGroup.cs: Added internal constructor for PolicyLevel.
	Copy method now returns a deep copy (as documented).
	* NetCodeGroup.cs: Added internal constructor for PolicyLevel. Fixed
	"Same site Web" (as documented) to "Same site Web." (as real life).
	Copy method now returns a deep copy (as documented).
	* PolicyLevel.cs: Added missing ChangeNamedPermissionSet. Implemented
	FromXml method. Added internal methods to load from file or string.
	Added/changed lots of things to match unit tests.
	* StrongNameMembershipCondition.cs: Added internal constructor for
	PolicyLevel. Fixed Equals.
	* UnionCodeGroup.cs: Added internal constructor for PolicyLevel.
	Copy method now returns a deep copy (as documented).

svn path=/trunk/mcs/; revision=21733
2004-01-06 03:23:58 +00:00
Duncan Mak 4e8989183e 2003-08-04 Duncan Mak <[email protected]>
* StrongNamePublicKeyBlob.cs (FromString): Added new internal
	factory method to create a new blob from a string.

2003-08-03  Duncan Mak  <[email protected]>

	* StrongNameMembershipCondition.cs:
	* UrlMembershipCondition.cs: Implemented.

2003-08-01  Duncan Mak  <[email protected]>

	* PolicyStatement.cs (Copy): Added.

	* PolicyLevel.cs: Implemented missing methods.

svn path=/trunk/mcs/; revision=17055
2003-08-04 16:20:16 +00:00
Piers Haken 84187bf9a6 fixed member accessibility to match MS (corcompare).
svn path=/trunk/mcs/; revision=3531
2002-04-01 06:07:43 +00:00
Nick Drochak fbaf4fd847 2002-01-30 Nick Drochak <[email protected]>
* CodeGroup.cs: New file.  Not nearly done with this, but saving it
	in cvs just in case.
	* PolicyLevel.cs: Sarted just a bit on this then relized i need CodeGroup
	first (among others).  Checking in for disaster recovery.

2002-01-29  Nick Drochak  <[email protected]>

	* PolicyStatementAttribute.cs: New file.
	* PolicyException.cs: Use correct namespace
	* PolicyLevel.cs: Add [Serializable] to class

svn path=/trunk/mcs/; revision=2189
2002-01-29 13:33:52 +00:00
Nick Drochak 804504f50c 2001-12-29 Nick Drochak <[email protected]>
* PolicyLevel.cs: New file

svn path=/trunk/mcs/; revision=1746
2001-12-29 11:57:58 +00:00