1 /**
2  * Windows API header module
3  *
4  * Translated from MinGW Windows headers
5  *
6  * Authors: Ellery Newcomer, John Colvin
7  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
8  * Source: $(DRUNTIMESRC core/sys/windows/_security.d)
9  */
10 module core.sys.windows.security;
11 version (Windows):
12 
13 enum : SECURITY_STATUS
14 {
15     SEC_E_OK = 0x00000000,
16     SEC_E_INSUFFICIENT_MEMORY = 0x80090300,
17     SEC_E_INVALID_HANDLE = 0x80090301,
18     SEC_E_UNSUPPORTED_FUNCTION = 0x80090302,
19     SEC_E_TARGET_UNKNOWN = 0x80090303,
20     SEC_E_INTERNAL_ERROR = 0x80090304,
21     SEC_E_SECPKG_NOT_FOUND = 0x80090305,
22     SEC_E_NOT_OWNER = 0x80090306,
23     SEC_E_CANNOT_INSTALL = 0x80090307,
24     SEC_E_INVALID_TOKEN = 0x80090308,
25     SEC_E_CANNOT_PACK = 0x80090309,
26     SEC_E_QOP_NOT_SUPPORTED = 0x8009030A,
27     SEC_E_NO_IMPERSONATION = 0x8009030B,
28     SEC_E_LOGON_DENIED = 0x8009030C,
29     SEC_E_UNKNOWN_CREDENTIALS = 0x8009030D,
30     SEC_E_NO_CREDENTIALS = 0x8009030E,
31     SEC_E_MESSAGE_ALTERED = 0x8009030F,
32     SEC_E_OUT_OF_SEQUENCE = 0x80090310,
33     SEC_E_NO_AUTHENTICATING_AUTHORITY = 0x80090311,
34     SEC_E_BAD_PKGID = 0x80090316,
35     SEC_E_CONTEXT_EXPIRED = 0x80090317,
36     SEC_E_INCOMPLETE_MESSAGE = 0x80090318,
37     SEC_E_INCOMPLETE_CREDENTIALS = 0x80090320,
38     SEC_E_BUFFER_TOO_SMALL = 0x80090321,
39     SEC_E_WRONG_PRINCIPAL = 0x80090322,
40     SEC_E_TIME_SKEW = 0x80090324,
41     SEC_E_UNTRUSTED_ROOT = 0x80090325,
42     SEC_E_ILLEGAL_MESSAGE = 0x80090326,
43     SEC_E_CERT_UNKNOWN = 0x80090327,
44     SEC_E_CERT_EXPIRED = 0x80090328,
45     SEC_E_ENCRYPT_FAILURE = 0x80090329,
46     SEC_E_DECRYPT_FAILURE = 0x80090330,
47     SEC_E_ALGORITHM_MISMATCH = 0x80090331,
48     SEC_E_SECURITY_QOS_FAILED = 0x80090332,
49     SEC_E_UNFINISHED_CONTEXT_DELETED = 0x80090333,
50     SEC_E_NO_TGT_REPLY = 0x80090334,
51     SEC_E_NO_IP_ADDRESSES = 0x80090335,
52     SEC_E_WRONG_CREDENTIAL_HANDLE = 0x80090336,
53     SEC_E_CRYPTO_SYSTEM_INVALID = 0x80090337,
54     SEC_E_MAX_REFERRALS_EXCEEDED = 0x80090338,
55     SEC_E_MUST_BE_KDC = 0x80090339,
56     SEC_E_STRONG_CRYPTO_NOT_SUPPORTED = 0x8009033A,
57     SEC_E_TOO_MANY_PRINCIPALS = 0x8009033B,
58     SEC_E_NO_PA_DATA = 0x8009033C,
59     SEC_E_PKINIT_NAME_MISMATCH = 0x8009033D,
60     SEC_E_SMARTCARD_LOGON_REQUIRED = 0x8009033E,
61     SEC_E_SHUTDOWN_IN_PROGRESS = 0x8009033F,
62     SEC_E_KDC_INVALID_REQUEST = 0x80090340,
63     SEC_E_KDC_UNABLE_TO_REFER = 0x80090341,
64     SEC_E_KDC_UNKNOWN_ETYPE = 0x80090342,
65     SEC_E_UNSUPPORTED_PREAUTH = 0x80090343,
66     SEC_E_DELEGATION_REQUIRED = 0x80090345,
67     SEC_E_BAD_BINDINGS = 0x80090346,
68     SEC_E_MULTIPLE_ACCOUNTS = 0x80090347,
69     SEC_E_NO_KERB_KEY = 0x80090348,
70     SEC_E_CERT_WRONG_USAGE = 0x80090349,
71     SEC_E_DOWNGRADE_DETECTED = 0x80090350,
72     SEC_E_SMARTCARD_CERT_REVOKED = 0x80090351,
73     SEC_E_ISSUING_CA_UNTRUSTED = 0x80090352,
74     SEC_E_REVOCATION_OFFLINE_C = 0x80090353,
75     SEC_E_PKINIT_CLIENT_FAILURE = 0x80090354,
76     SEC_E_SMARTCARD_CERT_EXPIRED = 0x80090355,
77     SEC_E_NO_S4U_PROT_SUPPORT = 0x80090356,
78     SEC_E_CROSSREALM_DELEGATION_FAILURE = 0x80090357,
79     SEC_E_REVOCATION_OFFLINE_KDC = 0x80090358,
80     SEC_E_ISSUING_CA_UNTRUSTED_KDC = 0x80090359,
81     SEC_E_KDC_CERT_EXPIRED = 0x8009035A,
82     SEC_E_KDC_CERT_REVOKED = 0x8009035B,
83     SEC_E_INVALID_PARAMETER = 0x8009035D,
84     SEC_E_DELEGATION_POLICY = 0x8009035E,
85     SEC_E_POLICY_NLTM_ONLY = 0x8009035F,
86     SEC_E_NO_CONTEXT = 0x80090361,
87     SEC_E_PKU2U_CERT_FAILURE = 0x80090362,
88     SEC_E_MUTUAL_AUTH_FAILED = 0x80090363,
89     SEC_E_ONLY_HTTPS_ALLOWED = 0x80090365,
90     SEC_E_APPLICATION_PROTOCOL_MISMATCH = 0x80090367,
91     SEC_E_INVALID_UPN_NAME = 0x80090369,
92     SEC_E_EXT_BUFFER_TOO_SMALL = 0x8009036A,
93     SEC_E_INSUFFICIENT_BUFFERS = 0x8009036B,
94     SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR,
95     SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION
96 }
97 enum : SECURITY_STATUS
98 {
99     SEC_I_CONTINUE_NEEDED = 0x00090312,
100     SEC_I_COMPLETE_NEEDED = 0x00090313,
101     SEC_I_COMPLETE_AND_CONTINUE = 0x00090314,
102     SEC_I_LOCAL_LOGON = 0x00090315,
103     SEC_I_GENERIC_EXTENSION_RECEIVED = 0x00090316,
104     SEC_I_CONTEXT_EXPIRED = 0x00090317,
105     SEC_I_INCOMPLETE_CREDENTIALS = 0x00090320,
106     SEC_I_RENEGOTIATE = 0x00090321,
107     SEC_I_NO_LSA_CONTEXT = 0x00090323,
108     SEC_I_SIGNATURE_NEEDED = 0x0009035C,
109     SEC_I_NO_RENEGOTIATION = 0x00090360,
110     SEC_I_MESSAGE_FRAGMENT = 0x00090364,
111     SEC_I_CONTINUE_NEEDED_MESSAGE_OK = 0x00090366,
112     SEC_I_ASYNC_CALL_PENDING = 0x00090368,
113 }
114 
115 /* always a char */
116 alias SEC_CHAR = char;
117 alias SEC_WCHAR = wchar;
118 
119 alias SECURITY_STATUS = int;