Merge pull request #3100 from lambdageek/dev/monoerror-exns
[mono-project.git] / mono / metadata / security.h
blob4497e168141a51d3fbe2d84cce5de4ad7f044ce1
1 /*
2 * security.c: Security internal calls
4 * Author:
5 * Sebastien Pouliot <sebastien@ximian.com>
7 * (C) 2004 Novell (http://www.novell.com)
8 */
11 #ifndef _MONO_METADATA_SECURITY_H_
12 #define _MONO_METADATA_SECURITY_H_
14 #include <glib.h>
15 #include <mono/metadata/object.h>
16 #include <mono/utils/mono-compiler.h>
17 #include <mono/utils/mono-publib.h>
19 G_BEGIN_DECLS
21 /* System.Environment */
22 extern MonoString* ves_icall_System_Environment_get_UserName (void);
25 /* System.Security.Principal.WindowsIdentity */
26 extern MonoArray* ves_icall_System_Security_Principal_WindowsIdentity_GetRoles (gpointer token);
27 extern gpointer ves_icall_System_Security_Principal_WindowsIdentity_GetCurrentToken (void);
28 extern MonoString* ves_icall_System_Security_Principal_WindowsIdentity_GetTokenName (gpointer token);
29 extern gpointer ves_icall_System_Security_Principal_WindowsIdentity_GetUserToken (MonoString *username);
32 /* System.Security.Principal.WindowsImpersonationContext */
33 extern gboolean ves_icall_System_Security_Principal_WindowsImpersonationContext_CloseToken (gpointer token);
34 extern gpointer ves_icall_System_Security_Principal_WindowsImpersonationContext_DuplicateToken (gpointer token);
35 extern gboolean ves_icall_System_Security_Principal_WindowsImpersonationContext_SetCurrentToken (gpointer token);
36 extern gboolean ves_icall_System_Security_Principal_WindowsImpersonationContext_RevertToSelf (void);
39 /* System.Security.Principal.WindowsPrincipal */
40 extern gboolean ves_icall_System_Security_Principal_WindowsPrincipal_IsMemberOfGroupId (gpointer user, gpointer group);
41 extern gboolean ves_icall_System_Security_Principal_WindowsPrincipal_IsMemberOfGroupName (gpointer user, MonoString *group);
44 /* Mono.Security.Cryptography.KeyPairPersistance */
45 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure (MonoString *root);
46 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsMachineProtected (MonoString *path);
47 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsUserProtected (MonoString *path);
48 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectMachine (MonoString *path);
49 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectUser (MonoString *path);
52 /* System.Security.Policy.Evidence */
53 MonoBoolean ves_icall_System_Security_Policy_Evidence_IsAuthenticodePresent (MonoReflectionAssembly *refass);
55 /* System.Security.SecureString */
56 extern void ves_icall_System_Security_SecureString_DecryptInternal (MonoArray *data, MonoObject *scope);
57 extern void ves_icall_System_Security_SecureString_EncryptInternal (MonoArray *data, MonoObject *scope);
58 void invoke_protected_memory_method (MonoArray *data, MonoObject *scope, gboolean encrypt, MonoError *error);
60 G_END_DECLS
62 #endif /* _MONO_METADATA_SECURITY_H_ */