Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
68 lines (50 sloc) 2.99 KB
* security-core-clr.h: CoreCLR security
* Author:
* Mark Probst <>
* (C) 2007, 2010 Novell, Inc
#include <glib.h>
#include <mono/metadata/reflection.h>
#include <mono/utils/mono-compiler.h>
typedef enum {
/* We compare these values as integers, so the order must not
be changed. */
} MonoSecurityCoreCLRLevel;
typedef enum {
//The following flags can be used in combination, and control specific behaviour of the CoreCLR securit system.
//Default coreclr behaviour, as used in moonlight.
//Allow transparent code to execute methods and access fields that are not in platformcode,
//even if those methods and fields are private or otherwise not visible to the calling code.
//Allow delegates to be created that point at methods that are not in platformcode,
//even if those methods and fields are private or otherwise not visible to the calling code.
} MonoSecurityCoreCLROptions;
extern gboolean mono_security_core_clr_test;
extern void mono_security_core_clr_check_inheritance (MonoClass *klass);
extern void mono_security_core_clr_check_override (MonoClass *klass, MonoMethod *override, MonoMethod *base);
extern void mono_security_core_clr_ensure_reflection_access_field (MonoClassField *field);
extern void mono_security_core_clr_ensure_reflection_access_method (MonoMethod *method);
extern gboolean mono_security_core_clr_ensure_delegate_creation (MonoMethod *method, gboolean throwOnBindFailure);
extern MonoException* mono_security_core_clr_ensure_dynamic_method_resolved_object (gpointer ref, MonoClass *handle_class);
extern gboolean mono_security_core_clr_can_access_internals (MonoImage *accessing, MonoImage* accessed);
extern MonoException* mono_security_core_clr_is_field_access_allowed (MonoMethod *caller, MonoClassField *field);
extern MonoException* mono_security_core_clr_is_call_allowed (MonoMethod *caller, MonoMethod *callee);
extern MonoSecurityCoreCLRLevel mono_security_core_clr_class_level (MonoClass *klass);
extern MonoSecurityCoreCLRLevel mono_security_core_clr_field_level (MonoClassField *field, gboolean with_class_level);
extern MonoSecurityCoreCLRLevel mono_security_core_clr_method_level (MonoMethod *method, gboolean with_class_level);
extern gboolean mono_security_core_clr_is_platform_image (MonoImage *image);
extern gboolean mono_security_core_clr_determine_platform_image (MonoImage *image);
extern MONO_API gboolean mono_security_core_clr_require_elevated_permissions (void);
extern MONO_API void mono_security_core_clr_set_options (MonoSecurityCoreCLROptions options);
extern MONO_API MonoSecurityCoreCLROptions mono_security_core_clr_get_options (void);
Jump to Line
Something went wrong with that request. Please try again.