1 /*
2 * PROJECT: ReactOS Drivers
3 * COPYRIGHT: See COPYING in the top level directory
4 * PURPOSE: Kernel Security Support Provider Interface Driver
5 *
6 * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
7 */
8
9 /* INCLUDES *******************************************************************/
10
11 #include "ksecdd.h"
12
13 #define NDEBUG
14 #include <debug.h>
15
16 typedef PVOID PSECURITY_PACKAGE_OPTIONS, PSecurityUserData;
17
18 /* FUNCTIONS ******************************************************************/
19
20 SECURITY_STATUS
21 SEC_ENTRY
AcceptSecurityContext(_In_opt_ PCredHandle phCredential,_In_opt_ PCtxtHandle phContext,_In_opt_ PSecBufferDesc pInput,_In_ ULONG fContextReq,_In_ ULONG TargetDataRep,_In_opt_ PCtxtHandle phNewContext,_In_opt_ PSecBufferDesc pOutput,_Out_ PULONG pfContextAttr,_Out_opt_ PTimeStamp ptsExpiry)22 AcceptSecurityContext(
23 _In_opt_ PCredHandle phCredential,
24 _In_opt_ PCtxtHandle phContext,
25 _In_opt_ PSecBufferDesc pInput,
26 _In_ ULONG fContextReq,
27 _In_ ULONG TargetDataRep,
28 _In_opt_ PCtxtHandle phNewContext,
29 _In_opt_ PSecBufferDesc pOutput,
30 _Out_ PULONG pfContextAttr,
31 _Out_opt_ PTimeStamp ptsExpiry)
32 {
33 UNIMPLEMENTED_DBGBREAK();
34 return 0;
35 }
36
37 SECURITY_STATUS
38 SEC_ENTRY
AcquireCredentialsHandleW(_In_opt_ PSSPI_SEC_STRING pPrincipal,_In_ PSSPI_SEC_STRING pPackage,_In_ ULONG fCredentialUse,_In_opt_ PVOID pvLogonId,_In_opt_ PVOID pAuthData,_In_opt_ SEC_GET_KEY_FN pGetKeyFn,_In_opt_ PVOID pvGetKeyArgument,_Out_ PCredHandle phCredential,_Out_opt_ PTimeStamp ptsExpiry)39 AcquireCredentialsHandleW(
40 _In_opt_ PSSPI_SEC_STRING pPrincipal,
41 _In_ PSSPI_SEC_STRING pPackage,
42 _In_ ULONG fCredentialUse,
43 _In_opt_ PVOID pvLogonId,
44 _In_opt_ PVOID pAuthData,
45 _In_opt_ SEC_GET_KEY_FN pGetKeyFn,
46 _In_opt_ PVOID pvGetKeyArgument,
47 _Out_ PCredHandle phCredential,
48 _Out_opt_ PTimeStamp ptsExpiry)
49 {
50 UNIMPLEMENTED_DBGBREAK();
51 return 0;
52 }
53
54 SECURITY_STATUS
55 SEC_ENTRY
AddCredentialsW(_In_ PCredHandle hCredentials,_In_opt_ PSSPI_SEC_STRING pPrincipal,_In_ PSSPI_SEC_STRING pPackage,_In_ ULONG fCredentialUse,_In_opt_ PVOID pAuthData,_In_opt_ SEC_GET_KEY_FN pGetKeyFn,_In_opt_ PVOID pvGetKeyArgument,_Out_opt_ PTimeStamp ptsExpiry)56 AddCredentialsW(
57 _In_ PCredHandle hCredentials,
58 _In_opt_ PSSPI_SEC_STRING pPrincipal,
59 _In_ PSSPI_SEC_STRING pPackage,
60 _In_ ULONG fCredentialUse,
61 _In_opt_ PVOID pAuthData,
62 _In_opt_ SEC_GET_KEY_FN pGetKeyFn,
63 _In_opt_ PVOID pvGetKeyArgument,
64 _Out_opt_ PTimeStamp ptsExpiry)
65 {
66 UNIMPLEMENTED_DBGBREAK();
67 return 0;
68 }
69
70 SECURITY_STATUS
71 SEC_ENTRY
ApplyControlToken(_In_ PCtxtHandle phContext,_In_ PSecBufferDesc pInput)72 ApplyControlToken(
73 _In_ PCtxtHandle phContext,
74 _In_ PSecBufferDesc pInput)
75 {
76 UNIMPLEMENTED_DBGBREAK();
77 return 0;
78 }
79
80 VOID
81 SEC_ENTRY
CredMarshalTargetInfo(VOID)82 CredMarshalTargetInfo(VOID)
83 {
84 UNIMPLEMENTED_DBGBREAK();
85 }
86
87 SECURITY_STATUS
88 SEC_ENTRY
DeleteSecurityContext(_In_ PCtxtHandle phContext)89 DeleteSecurityContext(
90 _In_ PCtxtHandle phContext)
91 {
92 UNIMPLEMENTED_DBGBREAK();
93 return 0;
94 }
95
96 VOID
97 SEC_ENTRY
EfsDecryptFek(VOID)98 EfsDecryptFek(VOID)
99 {
100 UNIMPLEMENTED_DBGBREAK();
101 }
102
103 VOID
104 SEC_ENTRY
EfsGenerateKey(VOID)105 EfsGenerateKey(VOID)
106 {
107 UNIMPLEMENTED_DBGBREAK();
108 }
109
110 SECURITY_STATUS
111 SEC_ENTRY
EnumerateSecurityPackagesW(_Out_ PULONG pcPackages,_Deref_out_ PSecPkgInfoW * ppPackageInfo)112 EnumerateSecurityPackagesW(
113 _Out_ PULONG pcPackages,
114 _Deref_out_ PSecPkgInfoW* ppPackageInfo)
115 {
116 UNIMPLEMENTED_DBGBREAK();
117 return 0;
118 }
119
120 SECURITY_STATUS
121 SEC_ENTRY
ExportSecurityContext(_In_ PCtxtHandle phContext,_In_ ULONG fFlags,_Out_ PSecBuffer pPackedContext,_Out_ PVOID * pToken)122 ExportSecurityContext(
123 _In_ PCtxtHandle phContext,
124 _In_ ULONG fFlags,
125 _Out_ PSecBuffer pPackedContext,
126 _Out_ PVOID* pToken)
127 {
128 UNIMPLEMENTED_DBGBREAK();
129 return 0;
130 }
131
132 SECURITY_STATUS
133 SEC_ENTRY
FreeContextBuffer(_Inout_ PVOID pvContextBuffer)134 FreeContextBuffer(
135 _Inout_ PVOID pvContextBuffer)
136 {
137 UNIMPLEMENTED_DBGBREAK();
138 return 0;
139 }
140
141 SECURITY_STATUS
142 SEC_ENTRY
FreeCredentialsHandle(_In_ PCredHandle phCredential)143 FreeCredentialsHandle(
144 _In_ PCredHandle phCredential)
145 {
146 UNIMPLEMENTED_DBGBREAK();
147 return 0;
148 }
149
150 VOID
151 SEC_ENTRY
GenerateDirEfs(VOID)152 GenerateDirEfs(VOID)
153 {
154 UNIMPLEMENTED_DBGBREAK();
155 }
156
157 VOID
158 SEC_ENTRY
GenerateSessionKey(VOID)159 GenerateSessionKey(VOID)
160 {
161 UNIMPLEMENTED_DBGBREAK();
162 }
163
164 SECURITY_STATUS
165 SEC_ENTRY
GetSecurityUserInfo(_In_opt_ PLUID LogonId,_In_ ULONG Flags,_Outptr_ PSecurityUserData * UserInformation)166 GetSecurityUserInfo(
167 _In_opt_ PLUID LogonId,
168 _In_ ULONG Flags,
169 _Outptr_ PSecurityUserData *UserInformation)
170 {
171 UNIMPLEMENTED;
172 *UserInformation = NULL;
173 return STATUS_UNSUCCESSFUL;
174 }
175
176 SECURITY_STATUS
177 SEC_ENTRY
ImpersonateSecurityContext(_In_ PCtxtHandle phContext)178 ImpersonateSecurityContext(
179 _In_ PCtxtHandle phContext)
180 {
181 UNIMPLEMENTED_DBGBREAK();
182 return 0;
183 }
184
185 SECURITY_STATUS
186 SEC_ENTRY
ImportSecurityContextW(_In_ PSSPI_SEC_STRING pszPackage,_In_ PSecBuffer pPackedContext,_In_ PVOID Token,_Out_ PCtxtHandle phContext)187 ImportSecurityContextW(
188 _In_ PSSPI_SEC_STRING pszPackage,
189 _In_ PSecBuffer pPackedContext,
190 _In_ PVOID Token,
191 _Out_ PCtxtHandle phContext)
192 {
193 UNIMPLEMENTED_DBGBREAK();
194 return 0;
195 }
196
197 SECURITY_STATUS
198 SEC_ENTRY
InitializeSecurityContextW(_In_opt_ PCredHandle phCredential,_In_opt_ PCtxtHandle phContext,_In_opt_ PSSPI_SEC_STRING pTargetName,_In_ ULONG fContextReq,_In_ ULONG Reserved1,_In_ ULONG TargetDataRep,_In_opt_ PSecBufferDesc pInput,_In_ ULONG Reserved2,_Inout_opt_ PCtxtHandle phNewContext,_Inout_opt_ PSecBufferDesc pOutput,_Out_ PULONG pfContextAttr,_Out_opt_ PTimeStamp ptsExpiry)199 InitializeSecurityContextW(
200 _In_opt_ PCredHandle phCredential,
201 _In_opt_ PCtxtHandle phContext,
202 _In_opt_ PSSPI_SEC_STRING pTargetName,
203 _In_ ULONG fContextReq,
204 _In_ ULONG Reserved1,
205 _In_ ULONG TargetDataRep,
206 _In_opt_ PSecBufferDesc pInput,
207 _In_ ULONG Reserved2,
208 _Inout_opt_ PCtxtHandle phNewContext,
209 _Inout_opt_ PSecBufferDesc pOutput,
210 _Out_ PULONG pfContextAttr,
211 _Out_opt_ PTimeStamp ptsExpiry)
212 {
213 UNIMPLEMENTED_DBGBREAK();
214 return 0;
215 }
216
217 PSecurityFunctionTableW
218 SEC_ENTRY
InitSecurityInterfaceW(void)219 InitSecurityInterfaceW(void)
220 {
221
222 UNIMPLEMENTED_DBGBREAK();
223 return NULL;
224 }
225
226 VOID
227 SEC_ENTRY
KSecRegisterSecurityProvider(VOID)228 KSecRegisterSecurityProvider(VOID)
229 {
230 UNIMPLEMENTED_DBGBREAK();
231 }
232
233 VOID
234 SEC_ENTRY
KSecValidateBuffer(VOID)235 KSecValidateBuffer(VOID)
236 {
237 UNIMPLEMENTED_DBGBREAK();
238 }
239
240 VOID
241 SEC_ENTRY
LsaEnumerateLogonSessions(VOID)242 LsaEnumerateLogonSessions(VOID)
243 {
244 UNIMPLEMENTED_DBGBREAK();
245 }
246
247 VOID
248 SEC_ENTRY
LsaGetLogonSessionData(VOID)249 LsaGetLogonSessionData(VOID)
250 {
251 UNIMPLEMENTED_DBGBREAK();
252 }
253
254 SECURITY_STATUS
255 SEC_ENTRY
MakeSignature(_In_ PCtxtHandle phContext,_In_ ULONG fQOP,_In_ PSecBufferDesc pMessage,_In_ ULONG MessageSeqNo)256 MakeSignature(
257 _In_ PCtxtHandle phContext,
258 _In_ ULONG fQOP,
259 _In_ PSecBufferDesc pMessage,
260 _In_ ULONG MessageSeqNo)
261 {
262 UNIMPLEMENTED_DBGBREAK();
263 return 0;
264 }
265
266 VOID
267 SEC_ENTRY
MapSecurityError(VOID)268 MapSecurityError(VOID)
269 {
270 UNIMPLEMENTED_DBGBREAK();
271 }
272
273 SECURITY_STATUS
274 SEC_ENTRY
QueryContextAttributesW(_In_ PCtxtHandle phContext,_In_ ULONG ulAttribute,_Out_ PVOID pBuffer)275 QueryContextAttributesW(
276 _In_ PCtxtHandle phContext,
277 _In_ ULONG ulAttribute,
278 _Out_ PVOID pBuffer)
279 {
280 UNIMPLEMENTED_DBGBREAK();
281 return 0;
282 }
283
284 SECURITY_STATUS
285 SEC_ENTRY
QueryCredentialsAttributesW(_In_ PCredHandle phCredential,_In_ ULONG ulAttribute,_Inout_ PVOID pBuffer)286 QueryCredentialsAttributesW(
287 _In_ PCredHandle phCredential,
288 _In_ ULONG ulAttribute,
289 _Inout_ PVOID pBuffer)
290 {
291 UNIMPLEMENTED_DBGBREAK();
292 return 0;
293 }
294
295 SECURITY_STATUS
296 SEC_ENTRY
QuerySecurityContextToken(_In_ PCtxtHandle phContext,_Out_ PVOID * Token)297 QuerySecurityContextToken(
298 _In_ PCtxtHandle phContext,
299 _Out_ PVOID* Token)
300 {
301 UNIMPLEMENTED_DBGBREAK();
302 return 0;
303 }
304
305 SECURITY_STATUS
306 SEC_ENTRY
QuerySecurityPackageInfoW(_In_ PSSPI_SEC_STRING pPackageName,_Deref_out_ PSecPkgInfoW * ppPackageInfo)307 QuerySecurityPackageInfoW(
308 _In_ PSSPI_SEC_STRING pPackageName,
309 _Deref_out_ PSecPkgInfoW *ppPackageInfo)
310 {
311 UNIMPLEMENTED_DBGBREAK();
312 return 0;
313 }
314
315 SECURITY_STATUS
316 SEC_ENTRY
RevertSecurityContext(_In_ PCtxtHandle phContext)317 RevertSecurityContext(
318 _In_ PCtxtHandle phContext)
319 {
320 UNIMPLEMENTED_DBGBREAK();
321 return 0;
322 }
323
324 VOID
325 SEC_ENTRY
SealMessage(VOID)326 SealMessage(VOID)
327 {
328 UNIMPLEMENTED_DBGBREAK();
329 }
330
331 NTSTATUS
332 SEC_ENTRY
SecLookupAccountName(_In_ PUNICODE_STRING Name,_Inout_ PULONG SidSize,_Out_ PSID Sid,_Out_ PSID_NAME_USE NameUse,_Out_opt_ PULONG DomainSize,_Inout_opt_ PUNICODE_STRING ReferencedDomain)333 SecLookupAccountName(
334 _In_ PUNICODE_STRING Name,
335 _Inout_ PULONG SidSize,
336 _Out_ PSID Sid,
337 _Out_ PSID_NAME_USE NameUse,
338 _Out_opt_ PULONG DomainSize,
339 _Inout_opt_ PUNICODE_STRING ReferencedDomain)
340 {
341 UNIMPLEMENTED_DBGBREAK();
342 return 0;
343 }
344
345 NTSTATUS
346 SEC_ENTRY
SecLookupAccountSid(_In_ PSID Sid,_Out_ PULONG NameSize,_Inout_ PUNICODE_STRING NameBuffer,_Out_ PULONG DomainSize OPTIONAL,_Out_opt_ PUNICODE_STRING DomainBuffer,_Out_ PSID_NAME_USE NameUse)347 SecLookupAccountSid(
348 _In_ PSID Sid,
349 _Out_ PULONG NameSize,
350 _Inout_ PUNICODE_STRING NameBuffer,
351 _Out_ PULONG DomainSize OPTIONAL,
352 _Out_opt_ PUNICODE_STRING DomainBuffer,
353 _Out_ PSID_NAME_USE NameUse)
354 {
355 UNIMPLEMENTED_DBGBREAK();
356 return 0;
357 }
358
359 NTSTATUS
360 SEC_ENTRY
SecLookupWellKnownSid(_In_ WELL_KNOWN_SID_TYPE SidType,_Out_ PSID Sid,_In_ ULONG SidBufferSize,_Inout_opt_ PULONG SidSize)361 SecLookupWellKnownSid(
362 _In_ WELL_KNOWN_SID_TYPE SidType,
363 _Out_ PSID Sid,
364 _In_ ULONG SidBufferSize,
365 _Inout_opt_ PULONG SidSize)
366 {
367 UNIMPLEMENTED_DBGBREAK();
368 return 0;
369 }
370
371 NTSTATUS
372 NTAPI
SecMakeSPN(_In_ PUNICODE_STRING ServiceClass,_In_ PUNICODE_STRING ServiceName,_In_opt_ PUNICODE_STRING InstanceName,_In_opt_ USHORT InstancePort,_In_opt_ PUNICODE_STRING Referrer,_Inout_ PUNICODE_STRING Spn,_Out_opt_ PULONG Length,_In_ BOOLEAN Allocate)373 SecMakeSPN(
374 _In_ PUNICODE_STRING ServiceClass,
375 _In_ PUNICODE_STRING ServiceName,
376 _In_opt_ PUNICODE_STRING InstanceName,
377 _In_opt_ USHORT InstancePort,
378 _In_opt_ PUNICODE_STRING Referrer,
379 _Inout_ PUNICODE_STRING Spn,
380 _Out_opt_ PULONG Length,
381 _In_ BOOLEAN Allocate)
382 {
383 UNIMPLEMENTED_DBGBREAK();
384 return 0;
385 }
386
387 NTSTATUS
388 NTAPI
SecMakeSPNEx(_In_ PUNICODE_STRING ServiceClass,_In_ PUNICODE_STRING ServiceName,_In_opt_ PUNICODE_STRING InstanceName,_In_opt_ USHORT InstancePort,_In_opt_ PUNICODE_STRING Referrer,_In_opt_ PUNICODE_STRING TargetInfo,_Inout_ PUNICODE_STRING Spn,_Out_opt_ PULONG Length,_In_ BOOLEAN Allocate)389 SecMakeSPNEx(
390 _In_ PUNICODE_STRING ServiceClass,
391 _In_ PUNICODE_STRING ServiceName,
392 _In_opt_ PUNICODE_STRING InstanceName,
393 _In_opt_ USHORT InstancePort,
394 _In_opt_ PUNICODE_STRING Referrer,
395 _In_opt_ PUNICODE_STRING TargetInfo,
396 _Inout_ PUNICODE_STRING Spn,
397 _Out_opt_ PULONG Length,
398 _In_ BOOLEAN Allocate)
399 {
400 UNIMPLEMENTED_DBGBREAK();
401 return 0;
402 }
403
404 VOID
405 SEC_ENTRY
SecSetPagingMode(VOID)406 SecSetPagingMode(VOID)
407 {
408 UNIMPLEMENTED_DBGBREAK();
409 }
410 VOID
411 SEC_ENTRY
UnsealMessage(VOID)412 UnsealMessage(VOID)
413 {
414 UNIMPLEMENTED_DBGBREAK();
415 }
416
417 SECURITY_STATUS
418 SEC_ENTRY
VerifySignature(_In_ PCtxtHandle phContext,_In_ PSecBufferDesc pMessage,_In_ ULONG MessageSeqNo,_Out_ PULONG pfQOP)419 VerifySignature(
420 _In_ PCtxtHandle phContext,
421 _In_ PSecBufferDesc pMessage,
422 _In_ ULONG MessageSeqNo,
423 _Out_ PULONG pfQOP)
424 {
425 UNIMPLEMENTED_DBGBREAK();
426 return 0;
427 }
428