0f5884e138b41d3a040d879bfe213aafeb52a0be
[mono.git] / mcs / class / corlib / System.Security / ChangeLog
1
2 Wed Jul 21 16:00:08 CEST 2010 Paolo Molaro <lupus@ximian.com>
3
4         * SecurityRuleSet.cs: this enum is actually a byte, the msdn docs are
5         wrong.
6
7 2010-05-27  Jb Evain  <jbevain@novell.com>
8
9         * SecurityContextSource.cs: add new enum in net_4_0.
10
11 2010-04-16  Sebastien Pouliot  <sebastien@ximian.com>
12
13         * SecurityManager.cs: Add stub for new methods (so code compiles
14         correctly under other profiles)
15         * SecurityManager_2_1.cs: Implement [Check|Ensure]ElevatedPermissions
16         for Moonlight Elevated Trust
17
18 2010-03-23  Sebastien Pouliot  <sebastien@ximian.com>
19
20         * SecurityManager_2_1.cs: Add an internal HasElevatedPermissions 
21         property to mscorlib since the "real" (i.e. visible) one in 
22         System.Windows.dll is not accessible by most code.
23
24 2010-03-16  Jb Evain  <jbevain@novell.com>
25
26         * SecurityTransparentAttribute.cs
27         * SecurityFrame.cs
28         * IPermission.cs
29         * SecurityManager.cs
30         * SecurityManager_2_1.cs
31         * SecuritySafeCriticalAttribute.cs:
32                 use MOONLIGHT symbol to disambiguate MonoTouch and Moonlight code.
33
34 2009-10-30      Marek Safar  <marek.safar@gmail.com>
35
36         * SecurityRuleSet.cs, SecurityRulesAttribute.cs: Implemented.
37
38 2009-10-23  Sebastien Pouliot  <sebastien@ximian.com>
39
40         * SecurityManager_2_1.cs: Return to duty for SecurityEnabled, it
41         will allow us to distinguish between running in the browser
42         (coreclr active) and on the console (e.g. smcs) from managed code
43
44 2009-09-23  Sebastien Pouliot  <sebastien@ximian.com>
45
46         * SecurityContext.cs: Remove NET_2_1 defines since the type is
47         now unused in NET_2_1 profile
48
49 2009-09-22  Sebastien Pouliot  <sebastien@ximian.com>
50
51         * CodeAccessPermission_2_1.cs: New. Stub to compile NET_2_1
52         * IPermission.cs: Remove ISecurityEncodable for NET_2_1
53         * PermissionSet_2_1.cs: New. Stub to compile NET_2_1
54         * SecurityContext.cs: Remove usage of CompressedStack for NET_2_1
55         * SecurityException_2_1.cs: New, CAS-less version for NET_2_1
56         * SecurityException.cs: Remove NET_2_1 conditions
57         * SecurityFrame.cs: Keep structures (needed by the runtime) but
58         remove SecurityFrame itself for NET_2_1
59
60 2009-09-21  Sebastien Pouliot  <sebastien@ximian.com>
61
62         * SecurityContext.cs: Don't use WindowsIdentity under NET_2_1
63
64 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
65
66         * SecurityManager.cs, SecurityManager_2_1.cs: Replace existing
67         throw methods (for coreclr) with a single one.
68
69 2009-05-02  Sebastien Pouliot  <sebastien@ximian.com>
70
71         * CodeAccessPermission.cs (ThrowSecurityException): Don't include
72         CAS-specific information when throwing a SecurityException in
73         NET_2_1
74
75 2009-05-01  Sebastien Pouliot  <sebastien@ximian.com> 
76
77         * SecurityCriticalAttribute.cs: Add simpler version NET_2_1
78         * SecuritySafeCriticalAttribute.cs: Remove MonoTODO for NET_2_1
79         * SecurityTransparentAttribute.cs: Remove MonoTODO for NET_2_1
80
81 2009-05-01  Sebastien Pouliot  <sebastien@ximian.com>
82
83         * SecurityState.cs: Implement IsStateAvailable (added in 2.0SP 
84         and part of SL API)
85
86 2009-04-27  Sebastien Pouliot  <sebastien@ximian.com>
87
88         * SecurityException.cs: Remove CAS-specific stuff from ToString
89         * SecurityManager.cs: Do not include for NET_2_1 build
90         * SecurityManager_2_1.cs: Alternate implementation for NET_2_1
91
92 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
93
94         * SecurityManager.cs: Remove VerificationException (not used from
95         the runtime anymore) and add FieldAccessException (which is now, 
96         or soon will be, required/used by the runtime).
97
98 2009-02-19  Rodrigo Kumpera  <rkumpera@novell.com>
99
100         * SecurityManager.cs: Make core-clr work under non 2.1 profiles.
101
102 2008-09-15  Jb Evain  <jbevain@novell.com>
103
104         * SecuritySafeCriticalAttribute.cs: Include SecuritySafeCritical in
105         the net_2_0 profile, as a recent sp includes it.
106
107 2008-08-07  Sebastien Pouliot  <sebastien@ximian.com>
108
109         * SecurityState.cs: New. Silverlight 2.0 abstract type.
110
111 2008-05-30  Sebastien Pouliot  <sebastien@ximian.com> 
112
113         * CodeAccessPermission.cs,
114         * PermissionSet.cs,
115         * SecurityManager.cs: Provide better MonoTODO messages for the 
116         next version of MoMA.
117
118 2008-04-02  Andreas Nahr  <ClassDevelopment@A-SoftTech.com>
119
120         * VerificationException.cs
121         * SecurityElement.cs
122         * SecurityContext.cs
123         * NamedPermissionSet.cs
124         * HostProtectionException.cs: Fix parameter names
125
126 2008-01-02  Sebastien Pouliot  <sebastien@ximian.com> 
127
128         * SecureString.cs: Fix InsertAt buffer calculation. Fix #350820
129
130 2008-01-02  Sebastien Pouliot  <sebastien@ximian.com>
131
132         * SecureString.cs: Don't forget length in Copy. Fix #350840
133
134 2007-11-07  Atsushi Enomoto  <atsushi@ximian.com>
135
136         * SecurityElement.cs :
137           set_Text() should unescape the input string. get_Text() should
138           return unescaped string. It also applies to attribute value.
139           ToString() should return valid (escaped) XML.
140
141 2007-10-14  Gert Driesen  <drieseng@users.sourceforge.net>
142
143         * SecurityElement.cs: In ctors, do not assign to Tag property to
144         ensure exception message match that of MS. In Tag property, set name
145         of parameter in ArgumentNullException and do not filter out
146         namespace prefixes. Modified Text property to allow null values
147         after change to IsValidText that no longer considers null value as
148         valid. Avoid NRE in Escape.
149
150 2007-08-28  Mark Probst  <mark.probst@gmail.com>
151
152         * SecurityManager.cs: Changed method argument of
153         LinkDemandSecurityException to IntPtr and removed the assembly
154         argument (which can be gotten to via the method), to avoid having
155         to embed reference object values in the native code.
156
157 2007-08-20  Mark Probst  <mark.probst@gmail.com>
158
159         * SecurityManager.cs: Changed arguments of MethodAccessException
160         to IntPtr, to avoid having to embed reference object values in the
161         native code.
162
163 2007-08-20  Mark Probst  <mark.probst@gmail.com>
164
165         * SecurityManager.cs: Added two methods needed for CoreCLR
166         security.
167
168 2007-08-08  Atsushi Enomoto  <atsushi@ximian.com>
169
170         * SecureString.cs : commenting out internal call. It somehow seems
171           to cause timeout on the buildbots :(
172
173 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
174
175         * SecureString.cs : adding notes that ProtectedMemory is not
176           implemented for non-windows environment.
177
178 2007-08-07  Atsushi Enomoto  <atsushi@ximian.com>
179
180         * SecureString.cs : Decrypt() and Encrypt() now use icall wrapper
181           to ProtectedMemory in System.Security.dll.
182
183 2007-02-23  Sebastien Pouliot  <sebastien@ximian.com>
184
185         * PermissionSet.cs: Fix InvalidCastException on non-CAS permissions.
186         Fix bug #80936.
187
188 2006-06-16  Sebastien Pouliot  <sebastien@ximian.com>
189
190         * SecurityContext.cs: Don't skip the calling callBack if we don't call
191         CompressedStack.Run (#78652).
192
193 2006-06-15  Sebastien Pouliot  <sebastien@ximian.com>
194
195         * SecurityContext.cs: Don't call CompressedStack.Run if we don't have
196         a compressed stack in the context (which can now happen because of 
197         #78652). This should fix MWF bug #78652 (BeginInvoke under 2.0).
198
199 2006-04-07  Sebastien Pouliot  <sebastien@ximian.com>
200
201         * SecurityException.cs: Show Evidence correctly (it's a collection) 
202         but avoid showing the Hash evidence (it's way too big to be useful).
203
204 2005-11-11  Sebastien Pouliot  <sebastien@ximian.com> 
205
206         * SecureString.cs: Completed InsertAt, fixed Alloc not to re-alloc a
207         block of the same size. Fixed missing encryption for the char* ctor.
208         Only missing is access to ProtectedMemory do to the [en|de]cryption.
209
210 2005-10-30  Sebastien Pouliot  <sebastien@ximian.com> 
211  
212         * PermissionSet.cs: Forgot to remove virtual from 2.0 IsSubsetOf.
213
214 2005-10-29  Sebastien Pouliot  <sebastien@ximian.com> 
215  
216         * PermissionSet.cs: Another update to corcompare shows that even more
217         methods are not virtual in 2.0 final.
218
219 2005-10-28  Sebastien Pouliot  <sebastien@ximian.com> 
220  
221         * PermissionSet.cs: Some methods are no more virtual in 2.0 final.
222
223 2005-10-28  Sebastien Pouliot  <sebastien@ximian.com>
224
225         * SecureString.cs: Changed the previous (and partial) managed 
226         implementation to one (that will be) based on ProtectedMemory. Work in
227         progress...
228
229 2005-10-17  Sebastien Pouliot  <sebastien@ximian.com>
230
231         * PermissionSet.cs: If the current permission set is unrestricted then
232         we must allow "permit only" for unrestricted (all other case are known
233         to be too restrictive).
234
235 2005-09-22  Sebastien Pouliot  <sebastien@ximian.com>
236
237         * SecurityManager.cs: Added [Obsolete] on SecurityEnabled for 2.0 (as 
238         it cannot be turned off on MS runtime anymore). Removed dependecies
239         on PermissionSetCollection as this class (related to *Choice actions)
240         didn't make it to 2.0 RC.
241
242 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
243  
244         * CodeAccessPermission.cs: Fix Deny for permissions that do not return
245         null for empty intersection (common on flags-based permissions).
246         * PermissionBuilder.cs: Add an helper call to create an empty 
247         (PermissionState.None) permission from a type.
248         * SecurityManager.cs: Added AppDomain support in InheritanceDemand. 
249         Fixed some another small difference between 1.x and 2.0 (wrt 
250         unrestricted permissions). Fixed error reporting for InheritanceDemand
251         (was LinkDemand).
252
253 2005-06-30  Sebastien Pouliot  <sebastien@ximian.com> 
254
255         * SecurityManager.cs: Fixed inheritance demands for 1.x.
256
257 2005-06-22  Sebastien Pouliot  <sebastien@ximian.com> 
258
259         * CodeAccessPermission.cs: Fix Unrestricted PermitOnly (which is like
260         a no-op). Speed up Assert if Unrestricted.
261         * HostSecurityManager.cs: Updated FIXME description.
262         * PermissionSet.cs: Remove Copy() of the permission set when non-CAS
263         permissions are used (replaced by an array of bools). Completed Assert
264         support by re-using the array of bools. Updated TODO descriptions.
265         * SecurityException.cs: Added evidence (if available) in the ToString
266         description of the exception.
267         * SecurityManager.cs: Reworked CheckExecutionRights to get the correct
268         behavior.
269
270 2005-06-20  Sebastien Pouliot  <sebastien@ximian.com> 
271
272         * CodeAccessPermission.cs: Removed redundant and unrequired TODO.
273         * PermissionSet.cs: Some 2.0 optimizations (because sets are simpler
274         without the special case for identity permissions).
275         * SecurityManager.cs: Shortcut for ResolveIdentityPermissions (in 2.0)
276         and some more declarative security syntax updates.
277
278 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com> 
279
280         * PermissionSet.cs: Added support for non-CAS permissions in the
281         IsSubsetOf method.
282         * SecurityManager.cs: Simplified IsGranted and added support for 2.0
283         (where all permissions support unrestricted). Changed desclarative 
284         security syntax not to use flags (like the rest of the source code).
285
286 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com> 
287  
288         * NamedPermissionSet.cs: A default NamedPermissionSet is Unrestricted.
289         * SecurityManager.cs: Simplified LinkDemandFullTrust as FullTrust is
290         immutable.
291
292 2005-06-14  Sebastien Pouliot  <sebastien@ximian.com>
293
294         * SecurityManager.cs: Added ResolvingPolicyLevel property to enable
295         support for FullTrustAssemblies during policy resolution. Reworked
296         (simplified) locking. Moved check for CheckExecutionRights to the 
297         "right" place.
298         * PermissionSet.cs: Added shortcut in GetPermission(Type).
299
300 2005-06-08  Sebastien Pouliot  <sebastien@ximian.com>
301
302         * AllowPartiallyTrustedCallersAttribute.cs, HostSecurityManagerFlags.cs
303         IEvidenceFactory.cs, IPermission.cs, ISecurityEncodable.cs,
304         ISecurityPolicyEncodable.cs, IStackWalk.cs, NamedPermissionSet.cs,
305         PolicyLevelType.cs, SecureString.cs, SecurityElement.cs, 
306         SecurityZone.cs, UnverifiableCodeAttribute.cs, VerificationException.cs
307         XmlSyntaxException.cs: Fix 2.0 beta2 API changes (which is mostly 
308         adding ComVisible attributes to classes).
309
310 2005-06-01  Sebastien Pouliot  <sebastien@ximian.com>
311
312         * PermissionBuilder.cs: Removed unification stuff. This is done at a 
313         lower level.
314         * SecurityManager.cs: Split loading PolicyLevel in two phases. The
315         PolicyHierarchy is now available after phase 1 which ensures we can
316         load permission from outside corlib.
317
318 2005-05-28  Sebastien Pouliot  <sebastien@ximian.com>
319
320         * HostSecurityManager.cs: Added check for ActivationArguments in 
321         application evidences.
322
323 2005-05-27  Sebastien Pouliot  <sebastien@ximian.com>
324
325         * CodeAccessPermission.cs: Allow unrestricted identity permissions in
326         2.0.
327         * PermissionBuilder.cs: New. Internal class to help create permission
328         instances from XML or with a fully qualified name. This class also 
329         deals with unification.
330         * PermissionSet.cs: Use PermissionBuilder to create permissions in 
331         FromXml method. Many 2.0 fixes (mostly to support unrestricted 
332         identity permissions)
333
334 2005-05-26  Sebastien Pouliot  <sebastien@ximian.com>
335
336         * CodeAccessPermission.cs: Fix typo for PermitOnly. Added ComVisible 
337         attribute for NET_2_0 profile.
338         * PermissionSet.cs: Changed static string to const. Added ComVisible 
339         attribute for NET_2_0 profile.
340         * SecurityContext.cs: Capture the identity token but don't create a 
341         WindowsIdentity instance unless required (e.g. Run). This requires 
342         less privileges (so it runs better that way under CAS).
343
344 2005-05-25  Sebastien Pouliot  <sebastien@ximian.com>
345
346         * SecurityException.cs: PermissionState isn't always serialized 
347         (depending on the security policy) so it cannot always be deserialized
348         too (and this must work without throwing exceptions).
349
350 2005-05-20  Sebastien Pouliot  <sebastien@ximian.com>
351
352         * SecurityContext.cs: Includes more methods in NET_1_1 to enable 
353         ThreadPool.UnsafeQueueUserWorkItem to work properly (i.e. without
354         stack propagation).
355
356 2005-05-16  Sebastien Pouliot  <sebastien@ximian.com>
357
358         * PermissionSet.cs: Add support for "hidden" read-only mode (as used
359         by PolicyStatement).
360         * SecurityFrame.cs: Add some debugging code in the ToString method.
361         * SecurityManager.cs: Changed internal API so we can display the 
362         permission that failed in a PermissionSet (e.g. assembly or appdomain).
363
364 2005-05-11  Sebastien Pouliot  <sebastien@ximian.com>
365
366         * SecurityManager.cs: GetZoneAndOrigin is present in 1.1 too (but is 
367         hidden from mono-api-info because of the LinkDemand for ECMA key).
368
369 2005-05-09  Sebastien Pouliot  <sebastien@ximian.com> 
370  
371         * SecurityContext.cs: That was the wrong place to capture the stack.
372
373 2005-05-09  Sebastien Pouliot  <sebastien@ximian.com>
374
375         * SecurityContext.cs: Capture the CompressedStack when the current 
376         context one is empty.
377         * SecurityManager.cs: Class is now static (2.0).
378         * SecurityTreatAsSafeAttribute.cs: Fixed AttributeTargets.
379
380 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
381
382         * CodeAccessPermission.cs: Reworked frames check to check only for
383         the stack modifiers. Throwing a SecurityException now calls Assembly.
384         UnprotectedGetName () to avoid throwing (recursively) other 
385         SecurityExceptions.
386         * PermissionSet.cs: Reworked frames check to include Assembly (moved) 
387         and AppDomain (new) transitions.
388         * SecurityFrame.cs: Added Domain member to match the runtime structure
389         definition. Removed debugging code (will be moved into the runtime 
390         later) as it can cause SecurityException is some cases.
391         * SecurityManager.cs: Added a method to check if a PermissionSet is
392         granted by an AppDomain.
393
394 2005-04-28  Sebastien Pouliot  <sebastien@ximian.com>
395
396         * PermissionSetCollection.cs: Updated wrt beta2. Seems this will be
397         removed before 2.0 final.
398         * HostProtectionException.cs: Updated wrt beta2. Added TODO as it 
399         isn't support by the runtime.
400         * SecurityContext.cs: Updated wrt beta2. Class is now internal in 
401         NET_1_1 to allow the compressed stack propagation to other threads.
402         * SecurityCriticalAttribute.cs: Added support for property Scope.
403         * SecurityException.cs: Removed PermitOnlySetInstance property to 
404         match beta2.
405         * SecurityTransparentAttribute.cs: Fixed AttributeUsage. Added TODO
406         as it isn't support by the runtime.
407         * SuppressUnmanagedCodeSecurityAttribute.cs: Added delegates to usage
408         in NET_2_0.
409
410 2005-04-27  Sebastien Pouliot  <sebastien@ximian.com>
411
412         * SecurityCriticalScope.cs: New. Enum introduced in 2.0 beta2.
413         * SecurityTreatAsSafeAttribute.cs: New. Attribute introducted in 2.0
414         beta2.
415
416 2005-04-25  Sebastien Pouliot  <sebastien@ximian.com>
417
418         * HostSecurityManager.cs: Now refers to HostSecurityManagerOptions.
419         * HostSecurityManagerFlags.cs: Renamed enum to 
420         HostSecurityManagerOptions.
421
422 2005-03-31  Sebastien Pouliot  <sebastien@ximian.com>
423
424         * SecurityException.cs: Added try/catch in GetObjectData because the
425         PermissionState property is serialized only if both ControlEvidence 
426         and ControlPolicy are granted.
427
428 2005-03-24  Sebastien Pouliot  <sebastien@ximian.com>
429
430         * CodeAccessPermission.cs: Fixed PermitOnly when used in a set. Added
431         an InheritanceDemand for ControlEvidence and ControlPolicy on the 
432         class.
433         * PermissionSet.cs: Added an InheritanceDemand for MS public key on 
434         class.
435         * SecurityException.cs: Moved PermissionType up in ToString as this
436         property isn't restricted (i.e. will be part of the output even if
437         the other properties can't make it).
438
439 2005-03-15  Sebastien Pouliot  <sebastien@ximian.com>
440
441         * CodeAccessPermission.cs: Fixed depth for starting the stack walk
442         (imperative) and fixed assert condition.
443         * PermissionSet.cs: Fixed depth for starting the stack walk.
444         * SecurityFrame.cs: Reversed stack. Added optional debugging code.
445
446 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
447
448         * SecurityManager.cs: Fix CodeAccessPermissionTest.CustomCAS unit test
449         when --security is enabled (code was over-optimized ;-).
450
451 2005-03-11  Sebastien Pouliot  <sebastien@ximian.com>
452
453         * SecurityManager.cs: Added methods to support reflection query and 
454         invoke for LinkDemand and InheritanceDemand. Added method to do a
455         stack walk (demand) when a p/invoking (called by JIT generated code).
456
457 2005-03-02  Sebastien Pouliot  <sebastien@ximian.com>
458
459         * CodeAccessPermission.cs,
460         * PermissionSet.cs: Don't throw NotSupportedException if the security 
461         manager (SecurityManager.SecurityEnabled) is off.
462
463 2005-02-25  Sebastien Pouliot  <sebastien@ximian.com> 
464
465         * CodeAccessPermission.cs: Implement Equals for NET_2_0 profile.
466         * PermissionSet.cs: Added code to decode the metadata format used for
467         declarative security in 2.0 (except enums and arrays now).
468         * PermissionSetCollection.cs: Added code to decode from the new metadata
469         format used for declarative security in 2.0.
470         * SecurityManager.cs: Added support for LinkDemandChoice, Inheritance
471         DemandChoice and DemandChoice (2.0). Added support for reflected 
472         LinkDemand (promotes the demand to a full Demand).
473
474 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com> 
475
476         * SecurityException.cs: Show the method informations when displaying a
477         SecurityException.
478         * SecurityManager.cs: Reworked InheritanceDemand implementation. Added
479         a new method to throw a SecurityException for an InheritanceDemand.
480
481 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com> 
482  
483         * SecurityManager.cs: Reduced the number of parameters for LinkDemand.
484         Removed a (forgotten) debugging message.
485
486 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
487
488         * SecurityException.cs: Show more information when a SecurityException
489         occurs to help debugging.
490         * SecurityManager.cs: Reworked LinkDemand implementation. Supply more
491         informations when throwing a SecurityException for LinkDemand.
492         * PermissionSet.cs: Remove (now) unused code for LinkDemand.
493
494 2005-02-08  Sebastien Pouliot  <sebastien@ximian.com>
495
496         * SecurityManager.cs: Updated code for LinkDemand (and it's special
497         cases).
498
499 2005-01-27  Sebastien Pouliot  <sebastien@ximian.com>
500
501         * CodeAccessPermission.cs: Process Deny for empty PermissionSet (e.g.
502         an unrestricted permission set must deny all permissions).
503         * SecurityException.cs: Added missing HResult to NET_2_0 constructors.
504         Added securiy permissions for GrantedSet, RefusedSet and 
505         PermissionState properties (to avoid leaking policy informations). 
506         Make sure that ToString() always works.
507         * SecurityManager.cs: Remove outdated comments (now that the 
508         declarative attributes are in place).
509
510 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
511
512         * SecurityManager.cs: Now use Environment.InternalGetFolderPath to
513         avoid recursion when initializing security policies.
514
515 2005-01-24  Sebastien Pouliot  <sebastien@ximian.com>
516
517         * CodeAccessPermission.cs: Made ThrowSecurityException static so it 
518         can be reused from PermissionSet.
519         * SecurityManager.cs: Use the new icalls for SecurityEnabled and
520         CheckExecutionRights properties. Fix IsGranted for unrestricted 
521         permissions. Set type correctly when loading policy files.
522         * PermissionSet.cs: Now supports unrestricted permission set when
523         evaluating demands.
524
525 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
526
527         * SecurityFrame.cs: Keep RuntimeDeclSecurityEntry enum in sync with
528         runtime (added index to allow AOT to work with declarative security).
529
530 2005-01-19  Sebastien Pouliot  <sebastien@ximian.com>
531
532         * SecurityManager.cs: Fix the regressions on NET_1_1 introduced by my
533         refactoring 10 days ago.
534
535 2005-01-11  Sebastien Pouliot  <sebastien@ximian.com>
536
537         * PermissionSet.cs: Simplified GetHashCode as two exact copies may 
538         have different hash codes (documented as such). This fix some unit
539         tests for 2.0.
540
541 2005-01-10  Sebastien Pouliot  <sebastien@ximian.com>
542
543         * HostSecurityManager.cs: Fix signature as DetermineApplicationTrust
544         doesn't return a boolean anymore.
545         * SecurityElement.cs: The attributes and children elements are not
546         indented in 2.0. This fix many unit tests that do string compares.
547         * PermissionSetCollection.cs: We can't trust all IList implementations
548         to throw the ArgumentOutOfRangeException - so we better do it here.
549
550 2005-01-09  Sebastien Pouliot  <sebastien@ximian.com>
551
552         * CodeAccessPermission.cs: CheckAssert, CheckDemand, CheckDeny and
553         CheckPermitOnly are no more publicly avaiable in Fx 2.0 and have been
554         changed to internal for all profiles. Updated comments to reflect the
555         (better) documentation available with 2.0.
556         * HostSecurityManager.cs: Updated to Dec CTP specs. There is missing
557         documentation (and/or classes) to implement completly the 
558         DetermineApplicationTrust method at this point.
559         * PermissionSetCollection.cs: Completed implementation.
560         * PermissionSet.cs: Fix the case where Assert, Deny and PermitOnly 
561         must be ignored for non-CAS permissions.
562         * SecurityManager.cs: Refactored resolve methods to implements 
563         ResolveSystemPolicy (a resolve without the AppDomain policy level).
564         Added a default implementation for GetZoneAndOrigin (empty ArrayList) 
565         which seems to be right (at least) for FullTrust. 
566
567 2005-01-08  Sebastien Pouliot  <sebastien@ximian.com>
568
569         * AllowPartiallyTrustedCallersAttribute.cs: Cleanup;
570         * HostSecurityManagerFlags.cs: Updated flags for 2.0 Dec CTP.
571         * SecurityCriticalAttribute.cs: New. New 2.0 attribute.
572         * SecurityTransparentAttribute.cs: New. New 2.0 attribute.
573         * SuppressUnmanagedCodeSecurityAttribute.cs: Cleanup;
574
575 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
576
577         * CodeAccessPermission.cs: Refactored to play more nicely with 
578         PermissionSet and the new functionalities in the runtime.
579         * PermissionSet.cs: Modified to use the new functionalities in the
580         runtime. This allows the declarative stack modifiers to work in a 
581         stack walk.
582         * SecurityFrame.cs: New. This is the managed representation of the
583         security informations associated with a stack frame. This current
584         version only support declarative stack modifiers.
585         * SecurityManager.cs: Modified to use the new functionalities in the
586         runtime.
587
588 2004-11-30  Sebastien Pouliot  <sebastien@ximian.com>
589
590         * CodeAccessPermission.cs:
591         * NamedPermissionSet.cs:
592         * PermissionSet.cs:
593         * SecurityElement.cs:
594         * SecurityException.cs:
595                 Added ComVisible attributes to match 2.0 October Preview.
596         * SecureString.cs: Added an internal method to get the unencrypted 
597         string (required to use the string inside mscorlib).
598
599 2004-10-19  Sebastien Pouliot  <sebastien@ximian.com>
600
601         * SecurityManager.cs: Changed private static methods to use a single
602         parameter (as method permissions overrides class permissions for
603         demand, assert, deny and permitonly).
604
605 2004-10-15  Sebastien Pouliot  <sebastien@ximian.com>
606
607         * CodeAccessPermission.cs: Implemented stubs (soon to be icalls) to
608         get/set/clear the current security frame on the stack. Implemented
609         Assert, Deny and PermitOnly with the new methods. Changed Demand to
610         use the CheckAssert, CheckDeny, CheckPermitOnly and CheckDemand 
611         introduced in 2.0.
612         * PermissionSet.cs: Fixed IsEmpty using documentation from 2.0 beta 1.
613         Implemented immediate (i.e. no stack walk) caller demand (CAS and 
614         non-CAS) required for LinkDemand and InheritanceDemand. Implemented
615         Assert, Deny and PermitOnly using CodeAccessPermission new methods.
616         Re-implement Demand to separate CAS and non-CAS permissions.
617         * SecurityManager.cs: Added new private static methods that will 
618         either be called by the JIT (linkdemand), runtime (inheritancedemand)
619         or by code emitted by the JIT (demand, assert, deny and permitonly).
620
621 2004-10-15  Sebastien Pouliot  <sebastien@ximian.com>
622
623         * SecurityException.cs: Provide more details when a security exception
624         is raised (to help debugging).
625
626 2004-09-02  Sebastien Pouliot  <sebastien@ximian.com>
627
628         * PermissionSet.cs: Updated to match latest unit tests, i.e. match
629         Fx 1.1 on NET_1_1 and Fx 2.0 (beta 1) in NET_2_0.
630         * SecurityElement.cs: FromString is now internal before NET_2_0.
631
632 2004-09-01  Sebastien Pouliot  <sebastien@ximian.com>
633
634         * NamedPermissionSet.cs: FromXml now calls base class instead of an
635         internal method of PermissionSet. This should allow class to inherit
636         from NamedPermissionSet properly.
637         * PermissionSet.cs: Added an internal PolicyLevel property to allow
638         policy file class name resolution. Fixed IsEmpty to return true if
639         the list contains "empty" permissions. Fixed Copy to copy permissions
640         even for unrestricted sets (again because of IUnrestrictedPermission).
641         * SecurityManager.cs: Fixed Resolve(Evidence) because permission 
642         classes Intersect methods can either return null or an empty 
643         PermissionSet.  Fixed ResolvePolicy(Evidence[]) for null (NET_2_0).
644
645 2004-08-31  Sebastien Pouliot  <sebastien@ximian.com>
646
647         * PermissionSet.cs: Fixed RemovePermission and Intersect (due to typos
648         in unit tests). Fixed SetPermission (null).
649
650 2004-08-30  Sebastien Pouliot  <sebastien@ximian.com>
651
652         * NamedPermissionSet.cs: Fixed Description in copies, GetHashCode and
653         Equals (for NET_2_0). Fixed handling of null Name when deserialized 
654         from XML.
655         * PermissionSet.cs: AddPermission now unions permissions of the same
656         type. CopyTo throw (most) exceptions only if there are items in the
657         set. Implemented Demand (but without support for Assert, Deny and 
658         PermitOnly). Fixed deserialized from XML when no class is specified.
659         Started implementation of ConvertPermissionSet (error cases). Fixed
660         Intersect to be compatible (including bugs like FDBK14612) with MS.
661         RemovePermission now compatible with MS (bug? FDBK14622). Fixed Union
662         to work with permissions that do not implement IUnrestrictedPermission.
663
664 2004-08-26  Sebastien Pouliot  <sebastien@ximian.com>
665
666         * SecurityElement.cs: Fixed the new Copy() in Fx 2.0 as it isn't a 
667         deep copy. Throw proper exceptions in FromString (Fx 2.0).
668         * SecurityManager.cs: Throw a NullReference exception in 
669         SavePolicyLevel as MS won't fix it (FDBK13121).
670
671 2004-08-19  Atsushi Enomoto  <atsushi@ximian.com>
672
673         * CodeAccessPermission.cs : csc build fix. Currently mcs has bugs on
674           CS0136 error detection (variable identifiers in switch cases share
675           the scope).
676
677 2004-08-17  Sebastien Pouliot  <sebastien@ximian.com>
678
679         * CodeAccessPermission.cs: Added common methods to help building all
680         Permissions classes in corlib. Most are declared static as they can 
681         also help non CodeAccessPermission-derived permissions.
682
683 2004-08-12  Sebastien Pouliot  <sebastien@ximian.com>
684
685         * SecurityManager.cs: Change ResolvePolicy to only care about host
686         provided evidence to create identity permissions.
687         * SecurityContextSwitcher.cs: Added missing [ReliabilityContract] to 
688         Undo method.
689
690 2004-08-11  Sebastien Pouliot  <sebastien@ximian.com>
691
692         * CodeAccessPermission.cs: Basic implementation for Demand (without
693         full stack trace, i.e. Assert, Deny and PermitOnly aren't considered).
694         Added TODO to unimplemented NET_2_0 methods.
695         * HostSecurityManager.cs: Added comments (as it looked not implemented
696         even to myself).
697         * PermissionSet.cs: Fixed Unrestricted when copied. Changed exception
698         ordering in Copy (ArgumentNullException couldn't work). Made IsEmpty
699         more robust.
700         * SecurityManager.cs: Implemented IsGranted using Assembly.Demand. 
701         Basic implementation for policy resolution.
702
703 2004-08-03  Sebastien Pouliot  <sebastien@ximian.com>
704
705         * PermissionSetCollection.cs: New class in Fx 2.0.
706         * SecureString.cs: New class in Fx 2.0. Not yet encrypted.
707
708 2004-08-02  Sebastien Pouliot  <sebastien@ximian.com>
709
710         * PolicyTypeLevel.cs: Removed duplicate license.
711         * SecurityManager.cs: Moved secuirty demands as attributes (but mcs 
712         doesn't seem to encode them properly as they show up in corcompare).
713         Implemented IsGranted, ResolvePolicy (but some code is still missing
714         in related classes) and SavePolicy/SavePolicyLevel.
715
716 2004-07-14  Sebastien Pouliot  <sebastien@ximian.com>
717
718         * CodeAccessPermission.cs: Added CheckAssert, CheckDemand, CheckDeny,
719         CheckPermitOnly, Equals and GetHashCode to NET_2_0 profile. Actualized
720         TODOs. Removed duplicate license.
721         * NamedPermissionSet.cs: Added Equals/GetHashCode to NET_2_0 profile.
722         Removed duplicate license.
723         * PermissionSet.cs: Added Equals/GetHashCode to NET_2_0 profile. 
724         Removed duplicate license.
725         * SecurityElement.cs: Added Copy and FromString methods to NET_2_0 
726         profile. Removed duplicate license.
727         * SecurityException.cs: Added new constructors and properties to 
728         NET_2_0 profile. Removed duplicate license.
729         * SecurityManager.cs: Added GetZoneAndOrigin and ResolvePolicy to 
730         NET_2_0 profile. Removed duplicate license.
731         * VerificationException.cs: Implements _Exception for NET_2_0 profile.
732         Removed duplicate license.
733         * XmlSyntaxException.cs: Implements _Exception for NET_2_0 profile. 
734         Removed duplicate license.
735
736 2004-07-14  Sebastien Pouliot  <sebastien@ximian.com>
737
738         * HostProtectionException.cs: New class in Fx 2.0.
739         * HostSecurityManager.cs: New class in Fx 2.0.
740         * HostSecurityManagerFlags.cs: New enum in Fx 2.0.
741         * SecurityContext.cs: New class in Fx 2.0.
742         * SecurityContextSwitcher.cs: New structure in Fx 2.0.
743
744 2004-06-15  Gert Driesen <drieseng@users.sourceforge.net>
745
746         * XmlSyntaxException.cs: added missing serialization ctor
747         * SecurityException.cs: fixed typo
748
749 2004-03-05  Atsushi Enomoto <atsushi@ximian.com>
750
751         * SecurityElement.cs : ignore prefix; this enables RSA.FromXmlString()
752           to allow namespaced elements.
753
754 2004-01-27  Sebastien Pouliot  <spouliot@videotron.ca>
755
756         * SecurityElement.cs: Attributes are now kept in an ArrayList (but
757         still returned in an Hashtable) so the attributes order can be
758         kept like MS implementation (but Hashtable cannot guarantee this).
759
760 2004-01-26  Sebastien Pouliot  <spouliot@videotron.ca>
761
762         * NamedPermissionSet.cs: Changed internal constructor 
763         NamedPermissionSet (SecurityElement e) to NamedPermissionSet ().
764         * PermissionSet.cs: Changed internal constructor 
765         PermissionSet (SecurityElement e) to PermissionSet ().
766
767 2004-01-24  David Sheldon <dave-mono@earth.li>
768
769        * SecurityElement.cs: Changed indentation in ToString, it seems
770         MS indent by 3 spaces, not 4. Also added NewLine to childless 
771         elements.
772
773 2004-01-24  David Sheldon <dave-mono@earth.li>
774
775        * SecurityElement.cs: Changed newline distribution in ToString.
776          Matches MS better.
777
778 2004-01-06  Sebastien Pouliot  <spouliot@videotron.ca>
779
780         * CodeAccessPermission.cs: Fixed Demand for custom permissions 
781         (permissions that do not implement, the internal, IBuiltInPermission).
782         Ref. http://bugzilla.ximian.com/show_bug.cgi?id=52626
783         * SecurityException.cs: Fixed ToString() which could, when no 
784         PermissionType where specified, throws a NullReferenceException.
785         Ref. http://bugzilla.ximian.com/show_bug.cgi?id=52626
786
787 2004-01-05  Sebastien Pouliot  <spouliot@videotron.ca>
788
789         * CodeAccessPermission.cs: Fixed Union to match 1.1/1.2 documentation. 
790         Simplified ToString to match MS implementation. Added LAMESPEC to 
791         Assert, Demand, Deny and PermitOnly as they aren't virtual.
792         * NamedPermissionSet.cs: Added internal constructor for PolicyLevel. 
793         * PermissionSet.cs: Added internal constructor for PolicyLevel. 
794         * SecurityManager.cs: Moved some stuff to PolicyLevel class (e.g. Load).
795
796 2004-01-03  Sebastien Pouliot  <spouliot@videotron.ca>
797
798         * SecurityManager.cs: Added some basic stuff to make some security unit
799         tests works (mostly when using PolicyHierarchy).
800
801 2004-01-02  Sebastien Pouliot  <spouliot@videotron.ca>
802
803         * AllowPartiallyTrustedCallersAttribute.cs: Fixed AttributeUsage using
804         1.2 documentation (AllowMultiple=false, Inherited=false)
805         * NamedPermissionSet.cs: Changes to match unit tests.
806         * PermissionSet.cs: Implemented Copy, Intersect, IsSubsetOf and Union 
807         methods. Corrected FromXml.
808         * PolicyLevelType.cs: Added missing [Serializable].
809         * SecurityElement.cs: Fixed constructor to match unit tests.
810         * SecurityException.cs: Added support for GrantedSet and RefusedSet 
811         properties (since 1.1). Set HResult to 0x8013150A.
812         * SecurityZone.cs: Added missing [Serializable].
813         * SuppressUnmanagedCodeSecurityAttribute.cs: Fixed AttributeUsage using
814         1.2 documentation (AllowMultiple=true, Inherited=false)
815         * UnverifiableCodeAttribute.cs: Fixed AttributeUsage using 1.2 
816         documentation (AllowMultiple=true, Inherited=false)
817
818 2003-06-29  Sebastien Pouliot  <spouliot@videotron.ca>
819
820         * PermissionSet.cs: Added missing "virtual" to Count, IsSynchronized 
821         and SyncRoot.
822
823 2003-06-29  Nick Drochak  <ndrochak@gol.com>
824
825         * NamedPermissionSet.cs : Fix buglet/typo/thinko. Thank you unit tests.
826
827 2003-06-28  Sebastien Pouliot  <spouliot@videotron.ca>
828
829         * CodeAccessPermission.cs: Added missing methods. Removed old XML
830         documentation (present in monodoc). Added missing MonoTODO attrs.
831         * NamedPermissionSet.cs : Changed some code from result of unit 
832         tests. Updated MonoTODO attributes.
833         * PermissionSet.cs: Added missing methods. Removed old XML
834         documentation (present in monodoc). Added missing MonoTODO attrs.
835         Added code to some methods.
836         * SecurityManager.cs: Added missing MonoTODO attributes.
837
838 2003-05-09  Sebastien Pouliot  <spouliot@videotron.ca>
839
840         * AllowPartiallyTrustedCallersAttribute.cs: New. Class was missing
841         from original 1.0 documentation (but inclufed in framework 1.0)
842
843 2002-06-10  Duncan Mak  <duncan@ximian.com>
844
845         * IEvidenceFactory.cs (Evidence): Added missing method.
846         
847         * SuppressUnmanagedCodeSecurityAttribute.cs:
848         * UnverifiableCodeAttribute.cs: Added missing
849         AttributeUsage attribute.
850
851 2002-06-05  Nick Drochak  <ndrochak@gol.com>
852
853         * SecurityElement.cs: Fixed couple of hard to spot typos which were
854         causing valid names and keys to be rejected.
855
856 2002-04-28  Lawrence Pit <loz@cable.a2000.nl>
857
858         * CodeAccessPermission.cs : implemented ToString method
859
860 2002-04-27  Lawrence Pit <loz@cable.a2000.nl>
861
862         * SecurityElement.cs: fixed bugs, implemented several methods
863
864 2002-03-12  Duncan Mak  <duncan@ximian.com>
865
866         * SecurityException.cs: Inherit from SystemException, not Exception.
867
868 2002-02-23  Nick Drochak  <ndrochak@gol.com>
869
870         * SecurityElement.cs: fixed typo
871
872 2002-02-13  Dan Lewis <dihlewis@yahoo.co.uk>
873         
874         * NamedPermissionSet.cs: New file (stub)
875
876 2002-02-07  Duncan Mak  <duncan@ximian.com>
877
878         * SecurityException.cs: Reformatted to fit the form of other
879         Exceptions. Added serialization bits.
880
881 2002-01-05  Ravi Pratap  <ravi@ximian.com>
882
883         * SecurityElement.cs : Insert MonoTODO attribute.
884
885 2002-01-02  Nick Drochak  <ndrochak@gol.com>
886
887         * CodeAccessPermission.cs: Fix syntax error hidden by exclusion in .build file
888
889 2001-12-30  Nick Drochak  <ndrochak@gol.com>
890
891         * PermissionSet.cs SecurityManager.cs: New Files
892         * CodeAccessPermission.cs: Add Skeleton code
893         * IPermission.cs: Make public and inherit from ISecurityEncodable 
894         * ISecurityEncodable.cs: Make interface public
895         * ISecurityPolicyEncodable.cs: Ditto
896         * IStackWalk.cs: Ditto
897
898 2001-12-29  Nick Drochak  <ndrochak@gol.com>
899
900         * ISecurityPolicyEncodable.cs, PolicyLevelType.cs, 
901         SecurityZone.cs, SecurityException.cs, UnverifiableCodeAttribute.cs,
902         SuppressUnmanagedCodeSecurityAttribute.cs,
903         VerificationException.cs, XmlSyntaxException.cs: New files
904
905 2001-12-21  Miguel de Icaza  <miguel@ximian.com>
906
907         * SecurityElement.cs, CodeAccessPermission.cs IPermission.cs
908         IStackWalk.cs SecurityElement.cs ISecurityEncodable.cs: New files.
909