Commit Graph
134 Commits
Author SHA1 Message Date
Paolo Molaro a7cef9ef42 Wed Jul 21 16:00:08 CEST 2010 Paolo Molaro <[email protected]>
* SecurityRuleSet.cs: this enum is actually a byte, the msdn docs are
	wrong.


svn path=/trunk/mcs/; revision=160679
2010-07-21 14:01:13 +00:00
Jb Evain ca159396c7 2010-05-27 Jb Evain <[email protected]>
* SecurityContextSource.cs: add new enum in net_4_0.


svn path=/trunk/mcs/; revision=158015
2010-05-27 10:58:08 +00:00
Sebastien Pouliot ad2944d893 2010-04-16 Sebastien Pouliot <[email protected]>
* SecurityManager.cs: Add stub for new methods (so code compiles
	correctly under other profiles)
	* SecurityManager_2_1.cs: Implement [Check|Ensure]ElevatedPermissions
	for Moonlight Elevated Trust


svn path=/trunk/mcs/; revision=155633
2010-04-16 14:41:34 +00:00
Sebastien Pouliot a891b14511 2010-03-23 Sebastien Pouliot <[email protected]>
* SecurityManager_2_1.cs: Add an internal HasElevatedPermissions 
	property to mscorlib since the "real" (i.e. visible) one in 
	System.Windows.dll is not accessible by most code.


svn path=/trunk/mcs/; revision=154099
2010-03-24 00:25:03 +00:00
Jb Evain aaf3676777 use MOONLIGHT symbol
svn path=/trunk/mcs/; revision=153670
2010-03-16 12:25:17 +00:00
Marek Safar 7218c6db79 2009-10-30 Marek Safar <[email protected]>
* SecurityRuleSet.cs, SecurityRulesAttribute.cs: Implemented.


svn path=/trunk/mcs/; revision=145096
2009-10-30 14:39:44 +00:00
Sebastien Pouliot 290ea3984b 2009-10-23 Sebastien Pouliot <[email protected]>
* SecurityManager_2_1.cs: Return to duty for SecurityEnabled, it
	will allow us to distinguish between running in the browser
	(coreclr active) and on the console (e.g. smcs) from managed code


svn path=/trunk/mcs/; revision=144732
2009-10-23 12:53:41 +00:00
Sebastien Pouliot e65d4332ac 2009-09-23 Sebastien Pouliot <[email protected]>
* SecurityContext.cs: Remove NET_2_1 defines since the type is
	now unused in NET_2_1 profile


svn path=/trunk/mcs/; revision=142482
2009-09-23 12:59:17 +00:00
Sebastien Pouliot 5d8f11c64a 2009-09-22 Sebastien Pouliot <[email protected]>
* CodeAccessPermission_2_1.cs: New. Stub to compile NET_2_1
	* IPermission.cs: Remove ISecurityEncodable for NET_2_1
	* PermissionSet_2_1.cs: New. Stub to compile NET_2_1
	* SecurityContext.cs: Remove usage of CompressedStack for NET_2_1
	* SecurityException_2_1.cs: New, CAS-less version for NET_2_1
	* SecurityException.cs: Remove NET_2_1 conditions
	* SecurityFrame.cs: Keep structures (needed by the runtime) but
	remove SecurityFrame itself for NET_2_1


svn path=/trunk/mcs/; revision=142400
2009-09-22 13:40:44 +00:00
Sebastien Pouliot 5d0ed14755 In System.Threading:
2009-09-21  Sebastien Pouliot  <[email protected]>

	* Thread.cs: Remove CurrentPrincipal property for NET_2_1
	* ExecutionContext.cs: Remove Run method for NET_2_1

In System.Security:
2009-09-21  Sebastien Pouliot  <[email protected]>

	* SecurityContext.cs: Don't use WindowsIdentity under NET_2_1

In System:
2009-09-21  Sebastien Pouliot  <[email protected]>

	* AppDomain.cs: Remove use of IPrincipal, Evidence and 
	PermissionSet types for NET_2_1

In .:
2009-09-21  Sebastien Pouliot  <[email protected]>

	* net_2_1_bootstrap_corlib.dll.sources, net_2_1_raw_corlib.dll.sources:
	Remove most of System.Security.Policy and System.Security.Principal
	and more of System.Security.Permissions from NET_2_1 build

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

	* PolicyLevel_2_1.cs: Remove use of PolicyStatement


svn path=/trunk/mcs/; revision=142324
2009-09-21 11:54:24 +00:00
Sebastien Pouliot 04ec436d09 2009-09-09 Sebastien Pouliot <[email protected]>
* SecurityManager.cs, SecurityManager_2_1.cs: Replace existing
	throw methods (for coreclr) with a single one.


svn path=/trunk/mcs/; revision=141608
2009-09-09 14:10:10 +00:00
Sebastien Pouliot 348617482b In System.Security:
2009-05-02  Sebastien Pouliot  <[email protected]>

	* CodeAccessPermission.cs (ThrowSecurityException): Don't include
	CAS-specific information when throwing a SecurityException in
	NET_2_1

In System:
2009-05-02  Sebastien Pouliot  <[email protected]>

	* Console.cs: Remove Windows-specific p/invokes and SSC code
	from the NET_2_1 build.

In System.Security.Cryptography.X509Certificates:
2009-05-02  Sebastien Pouliot  <[email protected]>

	* X509Certificate.cs: Remove code to initialize from an handle
	in NET_2_1 since this is only possible from Windows and would be
	SC anyway.

In System.Reflection:
2009-05-02  Sebastien Pouliot  <[email protected]>

	* Assembly.cs: Exclude CAS-specific code for NET_2_1


svn path=/trunk/mcs/; revision=133384
2009-05-02 14:22:17 +00:00
Sebastien Pouliot d9819b6dcb 2009-05-01 Sebastien Pouliot <[email protected]>
* SecurityCriticalAttribute.cs: Add simpler version NET_2_1
	* SecuritySafeCriticalAttribute.cs: Remove MonoTODO for NET_2_1
	* SecurityTransparentAttribute.cs: Remove MonoTODO for NET_2_1


svn path=/trunk/mcs/; revision=133286
2009-05-01 19:43:33 +00:00
Sebastien Pouliot 11cffff961 SecurityState.cs: Implement IsStateAvailable (added in 2.0SP and part of SL API)
svn path=/trunk/mcs/; revision=133273
2009-05-01 17:51:43 +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 bdf2e3d53c 2009-03-19 Sebastien Pouliot <[email protected]>
* SecurityManager.cs: Remove VerificationException (not used from
	the runtime anymore) and add FieldAccessException (which is now, 
	or soon will be, required/used by the runtime).


svn path=/trunk/mcs/; revision=129771
2009-03-19 12:05:13 +00:00
Rodrigo Kumpera d9e84fc8f8 2009-02-19 Rodrigo Kumpera <[email protected]>
* SecurityManager.cs: Make core-clr work under non 2.1 profiles.

svn path=/trunk/mcs/; revision=127442
2009-02-19 19:18:56 +00:00
Jb Evain a6f5b1f00e 2008-09-15 Jb Evain <[email protected]>
* SecuritySafeCriticalAttribute.cs: Include SecuritySafeCritical in
	the net_2_0 profile, as a recent sp includes it.


svn path=/trunk/mcs/; revision=113038
2008-09-15 14:41:39 +00:00
Sebastien Pouliot 5b9164fdff 2008-08-07 Sebastien Pouliot <[email protected]>
* SecurityState.cs: New. Silverlight 2.0 abstract type.


svn path=/trunk/mcs/; revision=109894
2008-08-07 18:15:04 +00:00
Sebastien Pouliot 5e9229bed6 2008-05-30 Sebastien Pouliot <[email protected]>
* CodeAccessPermission.cs,
	* PermissionSet.cs,
	* SecurityManager.cs: Provide better MonoTODO messages for the 
	next version of MoMA.


svn path=/trunk/mcs/; revision=104578
2008-05-31 02:00:56 +00:00
Andreas N 631b4a2a32 2008-04-02 Andreas Nahr <[email protected]>
* VerificationException.cs
	* SecurityElement.cs
	* SecurityContext.cs
	* NamedPermissionSet.cs
	* HostProtectionException.cs: Fix parameter names

svn path=/trunk/mcs/; revision=99618
2008-04-02 07:44:20 +00:00
Sebastien Pouliot 21d4b14f6f 2008-01-02 Sebastien Pouliot <[email protected]>
* SecureString.cs: Fix InsertAt buffer calculation. Fix #350820


svn path=/trunk/mcs/; revision=92107
2008-01-02 15:14:10 +00:00
Sebastien Pouliot 9851f87e59 2008-01-02 Sebastien Pouliot <[email protected]>
* SecureString.cs: Don't forget length in Copy. Fix #350840


svn path=/trunk/mcs/; revision=92104
2008-01-02 14:44:00 +00:00
Atsushi Eno daa70f997b 2007-11-07 Atsushi Enomoto <[email protected]>
* SecurityElement.cs :
	  set_Text() should unescape the input string. get_Text() should
	  return unescaped string. It also applies to attribute value.
	  ToString() should return valid (escaped) XML.

	* SecurityElementTest.cs : enabled test for #333699 and added
	  couple more.


svn path=/trunk/mcs/; revision=89135
2007-11-07 18:07:29 +00:00
Gert Driesen 98c4e1fa83 * SecurityElement.cs: In ctors, do not assign to Tag property to
ensure exception message match that of MS. In Tag property, set name 
of parameter in ArgumentNullException and do not filter out
namespace prefixes. Modified Text property to allow null values
after change to IsValidText that no longer considers null value as
valid. Avoid NRE in Escape.
* SecurityElementTest.cs: No longer derive from Assertion. Added and
improved ctor tests. Improved AddAttribute and AddChild tests.
Added comment to mono's Attributes test and added test that passes
on MS (to track fix for MS bug). Improved IsValid* tests. Added tests
for Tag and Text. Improved FromString test to verify behavior wrt
namespace prefixes. Added test for bug #333699.

svn path=/trunk/mcs/; revision=87459
2007-10-14 13:44:48 +00:00
Mark Probst f3237d228b 2007-08-28 Mark Probst <[email protected]>
* SecurityManager.cs: Changed method argument of
	LinkDemandSecurityException to IntPtr and removed the assembly
	argument (which can be gotten to via the method), to avoid having
	to embed reference object values in the native code.

svn path=/trunk/mcs/; revision=84932
2007-08-28 09:42:00 +00:00
Mark Probst 5bd2d47a69 2007-08-20 Mark Probst <[email protected]>
* SecurityManager.cs: Changed arguments of MethodAccessException
	to IntPtr, to avoid having to embed reference object values in the
	native code.

svn path=/trunk/mcs/; revision=84456
2007-08-20 12:59:59 +00:00
Mark Probst 0c4f293fdf 2007-08-20 Mark Probst <[email protected]>
* SecurityManager.cs: Added two methods needed for CoreCLR
	security.

svn path=/trunk/mcs/; revision=84452
2007-08-20 12:10:31 +00:00
Atsushi Eno d53125ab7a 2007-08-08 Atsushi Enomoto <[email protected]>
* SecureString.cs : commenting out internal call. It somehow seems
	  to cause timeout on the buildbots :(


svn path=/trunk/mcs/; revision=83662
2007-08-08 12:44:10 +00:00
Atsushi Eno a1fa272c48 2007-08-07 Atsushi Enomoto <[email protected]>
* SecureString.cs : adding notes that ProtectedMemory is not
	  implemented for non-windows environment.


svn path=/trunk/mcs/; revision=83583
2007-08-07 12:24:37 +00:00
Atsushi Eno a7a8824fc6 2007-08-07 Atsushi Enomoto <[email protected]>
* SecureString.cs : Decrypt() and Encrypt() now use icall wrapper
	  to ProtectedMemory in System.Security.dll.


svn path=/trunk/mcs/; revision=83576
2007-08-07 11:21:06 +00:00
Sebastien Pouliot 8ab55c4616 2007-02-23 Sebastien Pouliot <[email protected]>
* PermissionSet.cs: Fix InvalidCastException on non-CAS permissions.
	Fix bug #80936.


svn path=/trunk/mcs/; revision=73365
2007-02-23 14:37:46 +00:00
Sebastien Pouliot e823667b5f 2006-06-16 Sebastien Pouliot <[email protected]>
* SecurityContext.cs: Don't skip the calling callBack if we don't call
	CompressedStack.Run (#78652).


svn path=/trunk/mcs/; revision=61796
2006-06-16 13:18:06 +00:00
Sebastien Pouliot f49f4becc9 2006-06-15 Sebastien Pouliot <[email protected]>
* SecurityContext.cs: Don't call CompressedStack.Run if we don't have
	a compressed stack in the context (which can now happen because of 
	#78652). This should fix MWF bug #78652 (BeginInvoke under 2.0).


svn path=/trunk/mcs/; revision=61755
2006-06-15 13:49:09 +00:00
Sebastien Pouliot f2c9a7f3c3 SecurityException.cs: Show Evidence correctly (it's a collection) but avoid showing the Hash evidence (it's way too big to be useful).
svn path=/trunk/mcs/; revision=59182
2006-04-07 15:45:53 +00:00
Sebastien Pouliot 04ecae7ba2 2005-11-11 Sebastien Pouliot <[email protected]>
* SecureString.cs: Completed InsertAt, fixed Alloc not to re-alloc a
	block of the same size. Fixed missing encryption for the char* ctor.
	Only missing is access to ProtectedMemory do to the [en|de]cryption.


svn path=/trunk/mcs/; revision=52910
2005-11-11 14:18:44 +00:00
Sebastien Pouliot 0d441b69b2 2005-10-30 Sebastien Pouliot <[email protected]>
* PermissionSet.cs: Forgot to remove virtual from 2.0 IsSubsetOf.


svn path=/trunk/mcs/; revision=52392
2005-10-30 14:52:14 +00:00
Sebastien Pouliot a707d665a2 2005-10-29 Sebastien Pouliot <[email protected]>
* PermissionSet.cs: Another update to corcompare shows that even more
	methods are not virtual in 2.0 final.


svn path=/trunk/mcs/; revision=52379
2005-10-29 14:14:31 +00:00
Sebastien Pouliot ea682b57ce 2005-10-28 Sebastien Pouliot <[email protected]>
* PermissionSet.cs: Some methods are no more virtual in 2.0 final.


svn path=/trunk/mcs/; revision=52351
2005-10-28 19:12:30 +00:00
Sebastien Pouliot 3df0425e57 2005-10-28 Sebastien Pouliot <[email protected]>
* SecureString.cs: Changed the previous (and partial) managed 
	implementation to one (that will be) based on ProtectedMemory. Work in
	progress...


svn path=/trunk/mcs/; revision=52329
2005-10-28 15:44:41 +00:00
Sebastien Pouliot 47480dd484 2005-10-17 Sebastien Pouliot <[email protected]>
* PermissionSet.cs: If the current permission set is unrestricted then
	we must allow "permit only" for unrestricted (all other case are known
	to be too restrictive).


svn path=/trunk/mcs/; revision=51807
2005-10-17 16:53:43 +00:00
Sebastien Pouliot 4070fc94a7 2005-09-22 Sebastien Pouliot <[email protected]>
* SecurityManager.cs: Added [Obsolete] on SecurityEnabled for 2.0 (as 
	it cannot be turned off on MS runtime anymore). Removed dependecies
	on PermissionSetCollection as this class (related to *Choice actions)
	didn't make it to 2.0 RC.


svn path=/trunk/mcs/; revision=50498
2005-09-22 15:34:47 +00:00
Sebastien Pouliot 2e3ad4bde0 2005-09-02 Sebastien Pouliot <[email protected]>
* SecurityManager.cs: Added AppDomain support in InheritanceDemand. 
	Fixed some another small difference between 1.x and 2.0 (wrt 
	unrestricted permissions). Fixed error reporting for InheritanceDemand
	(was LinkDemand).

svn path=/trunk/mcs/; revision=49347
2005-09-02 14:04:30 +00:00
Sebastien Pouliot 087ea6e264 2005-09-02 Sebastien Pouliot <[email protected]>
* CodeAccessPermission.cs: Fix Deny for permissions that do not return
	null for empty intersection (common on flags-based permissions).
	* PermissionBuilder.cs: Add an helper call to create an empty 
	(PermissionState.None) permission from a type.


svn path=/trunk/mcs/; revision=49339
2005-09-02 11:33:03 +00:00
Sebastien Pouliot f57eff923c 2005-06-30 Sebastien Pouliot <[email protected]>
* SecurityManager.cs: Fixed inheritance demands for 1.x.


svn path=/trunk/mcs/; revision=46771
2005-06-30 16:42:30 +00:00
Ben Maurer a68aa2eda4 remove executable bit from changelogs
svn path=/trunk/mcs/; revision=46563
2005-06-27 15:53:16 +00:00
Sebastien Pouliot 16a79daec3 2005-06-22 Sebastien Pouliot <[email protected]>
* CodeAccessPermission.cs: Fix Unrestricted PermitOnly (which is like
	a no-op). Speed up Assert if Unrestricted.
	* HostSecurityManager.cs: Updated FIXME description.
	* PermissionSet.cs: Remove Copy() of the permission set when non-CAS
	permissions are used (replaced by an array of bools). Completed Assert
	support by re-using the array of bools. Updated TODO descriptions.
	* SecurityException.cs: Added evidence (if available) in the ToString
	description of the exception.
	* SecurityManager.cs: Reworked CheckExecutionRights to get the correct
	behavior.


svn path=/trunk/mcs/; revision=46378
2005-06-22 18:35:41 +00:00
Sebastien Pouliot 42062cff2d 2005-06-20 Sebastien Pouliot <[email protected]>
* CodeAccessPermission.cs: Removed redundant and unrequired TODO.
	* PermissionSet.cs: Some 2.0 optimizations (because sets are simpler
	without the special case for identity permissions).
	* SecurityManager.cs: Shortcut for ResolveIdentityPermissions (in 2.0)
	and some more declarative security syntax updates.


svn path=/trunk/mcs/; revision=46249
2005-06-20 16:50:56 +00:00
Sebastien Pouliot 930001d8f6 * PermissionSet.cs: Added support for non-CAS permissions in the
IsSubsetOf method.
	* SecurityManager.cs: Simplified IsGranted and added support for 2.0
	(where all permissions support unrestricted). Changed desclarative 
	security syntax not to use flags (like the rest of the source code).

2005-06-16  Sebastien Pouliot  <[email protected]> 

svn path=/trunk/mcs/; revision=46102
2005-06-16 19:29:19 +00:00
Sebastien Pouliot 67fb555352 2005-06-16 Sebastien Pouliot <[email protected]>
* NamedPermissionSet.cs: A default NamedPermissionSet is Unrestricted.

svn path=/trunk/mcs/; revision=46091
2005-06-16 13:15:32 +00:00