[io-layer] Extract file (#4255)
[mono.git] / mono / metadata / security.h
1 /*
2  * security.c:  Security internal calls
3  *
4  * Author:
5  *      Sebastien Pouliot  <sebastien@ximian.com>
6  *
7  * (C) 2004 Novell (http://www.novell.com)
8  */
9
10
11 #ifndef _MONO_METADATA_SECURITY_H_
12 #define _MONO_METADATA_SECURITY_H_
13
14 #include <glib.h>
15 #include <mono/metadata/object.h>
16 #include <mono/metadata/object-internals.h>
17 #include <mono/utils/mono-compiler.h>
18 #include <mono/utils/mono-error.h>
19 #include <mono/utils/mono-publib.h>
20
21 G_BEGIN_DECLS
22
23 /* System.Environment */
24 extern MonoString* ves_icall_System_Environment_get_UserName (void);
25
26
27 /* System.Security.Principal.WindowsIdentity */
28 extern MonoArray* ves_icall_System_Security_Principal_WindowsIdentity_GetRoles (gpointer token);
29 extern gpointer ves_icall_System_Security_Principal_WindowsIdentity_GetCurrentToken (void);
30 extern MonoString* ves_icall_System_Security_Principal_WindowsIdentity_GetTokenName (gpointer token);
31 extern gpointer ves_icall_System_Security_Principal_WindowsIdentity_GetUserToken (MonoString *username);
32
33
34 /* System.Security.Principal.WindowsImpersonationContext */
35 extern gboolean ves_icall_System_Security_Principal_WindowsImpersonationContext_CloseToken (gpointer token);
36 extern gpointer ves_icall_System_Security_Principal_WindowsImpersonationContext_DuplicateToken (gpointer token);
37 extern gboolean ves_icall_System_Security_Principal_WindowsImpersonationContext_SetCurrentToken (gpointer token);
38 extern gboolean ves_icall_System_Security_Principal_WindowsImpersonationContext_RevertToSelf (void);
39
40
41 /* System.Security.Principal.WindowsPrincipal */
42 extern gboolean ves_icall_System_Security_Principal_WindowsPrincipal_IsMemberOfGroupId (gpointer user, gpointer group);
43 extern gboolean ves_icall_System_Security_Principal_WindowsPrincipal_IsMemberOfGroupName (gpointer user, MonoString *group);
44
45
46 /* Mono.Security.Cryptography.KeyPairPersistance */
47 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_CanSecure (MonoString *root);
48 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsMachineProtected (MonoString *path);
49 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_IsUserProtected (MonoString *path);
50 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectMachine (MonoString *path);
51 extern MonoBoolean ves_icall_Mono_Security_Cryptography_KeyPairPersistence_ProtectUser (MonoString *path);
52
53
54 /* System.Security.Policy.Evidence */
55 MonoBoolean ves_icall_System_Security_Policy_Evidence_IsAuthenticodePresent (MonoReflectionAssemblyHandle refass, MonoError *error);
56
57 /* System.Security.SecureString */
58 extern void ves_icall_System_Security_SecureString_DecryptInternal (MonoArray *data, MonoObject *scope);
59 extern void ves_icall_System_Security_SecureString_EncryptInternal (MonoArray *data, MonoObject *scope);
60 void invoke_protected_memory_method (MonoArray *data, MonoObject *scope, gboolean encrypt, MonoError *error);
61
62 G_END_DECLS
63
64 #endif /* _MONO_METADATA_SECURITY_H_ */