2 * PROJECT: ReactOS Drivers
3 * COPYRIGHT: See COPYING in the top level directory
4 * PURPOSE: Kernel Security Support Provider Interface Driver
6 * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
9 #define _NO_KSECDD_IMPORT_
11 #include <ndk/extypes.h>
12 #include <ndk/rtlfuncs.h>
13 #include <ndk/lpcfuncs.h>
14 #include <ndk/obfuncs.h>
15 #include <ntstrsafe.h>
17 #define STATUS_KSEC_INTERNAL_ERROR ((NTSTATUS)0x80090304)
19 /* FIXME: this should be in some shared header */
20 #define RTL_ENCRYPT_OPTION_SAME_PROCESS 0
21 #define RTL_ENCRYPT_OPTION_CROSS_PROCESS 1
22 #define RTL_ENCRYPT_OPTION_SAME_LOGON 2
24 typedef struct _KSEC_CONNECTION_INFO
28 ULONG_PTR Information
;
29 CHAR ConnectionString
[128];
31 } KSEC_CONNECTION_INFO
;
33 #if defined(_M_IX86) || defined(_M_AMD64)
34 typedef struct _KSEC_MACHINE_SPECIFIC_COUNTERS
41 } KSEC_MACHINE_SPECIFIC_COUNTERS
, *PKSEC_MACHINE_SPECIFIC_COUNTERS
;
43 typedef ULONG KSEC_MACHINE_SPECIFIC_COUNTERS
;
46 typedef struct _KSEC_ENTROPY_DATA
48 HANDLE CurrentProcessId
;
49 HANDLE CurrentThreadId
;
50 LARGE_INTEGER TickCount
;
51 LARGE_INTEGER SystemTime
;
52 LARGE_INTEGER PerformanceCounter
;
53 LARGE_INTEGER PerformanceFrequency
;
54 UCHAR EnvironmentHash
[16];
55 KSEC_MACHINE_SPECIFIC_COUNTERS MachineSpecificCounters
;
56 SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION SystemProcessorPerformanceInformation
;
57 SYSTEM_PERFORMANCE_INFORMATION SystemPerformanceInformation
;
58 SYSTEM_EXCEPTION_INFORMATION SystemExceptionInformation
;
59 SYSTEM_LOOKASIDE_INFORMATION SystemLookasideInformation
;
60 SYSTEM_INTERRUPT_INFORMATION SystemInterruptInformation
;
61 SYSTEM_PROCESS_INFORMATION SystemProcessInformation
;
62 } KSEC_ENTROPY_DATA
, *PKSEC_ENTROPY_DATA
;
64 extern PEPROCESS KsecLsaProcess
;;
65 extern HANDLE KsecLsaProcessHandle
;
70 PDEVICE_OBJECT DeviceObject
,
85 _In_ ULONG OptionFlags
);
92 _In_ ULONG OptionFlags
);
96 KsecInitLsaMemory(VOID
);
101 PsGetProcessSecurityPort(
106 PsSetProcessSecurityPort(
112 PsGetCurrentThreadProcessId(VOID
);