2 * declsec.h: Declarative Security support
5 * Sebastien Pouliot <sebastien@ximian.com>
7 * (C) 2004-2005 Novell (http://www.novell.com)
10 #ifndef _MONO_MINI_DECLSEC_H_
11 #define _MONO_MINI_DECLSEC_H_
15 #include "mono/metadata/class-internals.h"
16 #include "mono/metadata/domain-internals.h"
17 #include "mono/metadata/object.h"
18 #include "mono/metadata/tabledefs.h"
19 #include "mono/metadata/marshal.h"
20 #include "mono/metadata/security-manager.h"
21 #include "mono/metadata/exception.h"
22 #include "mono/utils/mono-compiler.h"
27 #define MONO_CAS_INITIAL_STACK_SIZE 6
30 /* keep in synch with RuntimeSecurityFrame in /mcs/class/corlib/System.Security/SecurityFrame.cs */
33 MonoAppDomain
*domain
;
34 MonoReflectionMethod
*method
;
35 MonoDeclSecurityEntry
assert;
36 MonoDeclSecurityEntry deny
;
37 MonoDeclSecurityEntry permitonly
;
41 /* limited flags used in MonoJitInfo for stack modifiers */
43 MONO_JITINFO_STACKMOD_ASSERT
= 0x01,
44 MONO_JITINFO_STACKMOD_DENY
= 0x02,
45 MONO_JITINFO_STACKMOD_PERMITONLY
= 0x04
49 MONO_JIT_SECURITY_OK
= 0x00,
50 MONO_JIT_LINKDEMAND_PERMISSION
= 0x01,
51 MONO_JIT_LINKDEMAND_APTC
= 0x02,
52 MONO_JIT_LINKDEMAND_ECMA
= 0x04,
53 MONO_JIT_LINKDEMAND_PINVOKE
= 0x08
57 MonoBoolean
mono_method_has_declsec (MonoMethod
*method
) MONO_INTERNAL
;
58 void mono_declsec_cache_stack_modifiers (MonoJitInfo
*jinfo
) MONO_INTERNAL
;
59 MonoSecurityFrame
* mono_declsec_create_frame (MonoDomain
*domain
, MonoJitInfo
*jinfo
) MONO_INTERNAL
;
61 guint32
mono_declsec_linkdemand (MonoDomain
*domain
, MonoMethod
*caller
, MonoMethod
*callee
) MONO_INTERNAL
;
63 #endif /* _MONO_MINI_DECLSEC_H_ */