Commit Graph
171 Commits
Author SHA1 Message Date
Sebastien Pouliot bdf97e53b7 Use field for GetObjectData and this (instead of base) for .ctor in SecurityException to help linker remove more code 2013-04-25 15:23:56 -04:00
Marek Safar b26fc714dd Manually remove code which is disabled but compiler cannot remove automatically. 2013-03-04 09:14:08 +01:00
Marek Safar 13d9a0f334 Fix compiler warnings 2013-02-28 09:19:47 +01:00
Rodrigo Kumpera dba5f60e67 Remove moonlight sources in corlib that were only used by moonlight. 2013-02-11 16:03:37 -05:00
Rodrigo Kumpera b96d05dac3 Kill the MOONLIGHT define in corlib. 2013-02-11 16:03:28 -05:00
Marek Safar ed9dc87369 Add obsolete attribute 2013-02-11 13:48:01 +01:00
David Lechner f26842327d fix System.Security.SecurString.ReadAt(int), includes NUnit test 2013-01-31 21:12:56 -06:00
Sebastien Pouliot 62bd4ea232 Fix default SecurityManager properties to false (they should not be reached unless there's a bug, but they should be right) 2012-11-07 11:52:41 -05:00
Marek Safar 8b4cb822ad Fix 2.0 attributeusage 2012-08-01 22:19:47 +01:00
Marek Safar c45375b4c8 Fix types signature 2012-07-27 12:25:43 +01:00
Marek Safar 241c64c12c Fix attribute arguments 2012-07-27 12:25:42 +01:00
Marek Safar b0c1e99f75 Fix attribute arguments 2012-07-26 12:48:27 +01:00
Marek Safar 5b82f0e08c Clean up some NET_2_0 2012-06-14 15:44:35 +01:00
Sebastien Pouliot 7de2d7b467 Ensure the linker can eliminate most CAS-related types in the MOBILE-based profiles 2011-07-20 08:28:42 -04:00
Marek Safar 0781122a85 Add missing 4.0 api 2011-04-20 12:41:29 +01:00
Sebastien Pouliot fd7b7a2b89 Add NIE stubs for new 4.0 methods to ease running IronPython test suite
* SecurityManager.cs: Add new stubs for 4.0 methods. Add [Obsolete]
attributes on most methods (new in 4.0)
2011-01-09 10:57:45 -05:00
Miguel de Icaza d2a367e0a2 [GetFolderPath] Handful of .NET 4 changes
* Actually use the SpecialFolderPathOptions where we need them
  -> Create is acknowledged
  -> DoNotVerify is ignored, as Mono historically did not throw an
     exception on missing directories.
* Rename InternalGetFolderPath to UnixGetFolderPath as this is what it is.
* Fix existing references to the code
* Fix indentation in routine that was never properly formatted (ReadXdgUserDir)
2011-01-03 08:37:31 -05:00
Raja R Harinath cd51491631 Fix a few cases of mixed line-endings
This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only
based on which patch is smaller.  I used a threshold of upto a quarter of the
lines to determine whether to keep the patch or not.
2010-07-26 02:20:13 +05:30
Raja R Harinath b293948fb7 EOL handling
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
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
Miguel de Icaza 4baa1d2bc2 More removal of old defines
svn path=/trunk/mcs/; revision=145609
2009-11-06 21:25:38 +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
Geoff Norton 88026a47b4 fix MONOTOUCH on trunk
svn path=/trunk/mcs/; revision=144133
2009-10-14 18:49:14 +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
Jb Evain 288e614ea4 bring Mono Security to monotouch
svn path=/trunk/mcs/; revision=141615
2009-09-09 15:34:58 +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
Marek Safar 159314e044 Warnings cleanup
svn path=/trunk/mcs/; revision=111730
2008-08-27 18:28:16 +00:00
Marek Safar cc9c53a109 Warnings cleanup
svn path=/trunk/mcs/; revision=111713
2008-08-27 15:40:13 +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