Skip to content

Commit f70f82b

Browse files
Merged PR 10359054: Reintroduce SymCryptK.dll entry point to unblock SK
## Description: + Reverts change to remove entry point from SymCryptK.dll, as in local testing SymCryptK.dll with an entry point works with SK, while SymCryptK.dll without an entry point does not. Related work items: #49201043
1 parent 22d4862 commit f70f82b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

modules/windows/kernel/main.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,22 @@ SYMCRYPT_ENVIRONMENT_WINDOWS_KERNELMODE_LATEST;
2020
#define FIPS_SERVICE_DESC_SHOW_VERSION
2121
#include "../lib/status_indicator.h"
2222

23+
// Our DriverEntry function is not used, as this module acts as an export driver which is linked
24+
// directly to the kernel. In other words, it's not initialized by WDF, and we don't create any
25+
// device objects or use other WDF functions. However, we need to define an entrypoint, or
26+
// secure kernel will be unable to load the module.
27+
NTSTATUS
28+
DriverEntry(
29+
_In_ struct _DRIVER_OBJECT* DriverObject,
30+
_In_ PUNICODE_STRING RegistryPath
31+
)
32+
{
33+
UNREFERENCED_PARAMETER( DriverObject );
34+
UNREFERENCED_PARAMETER( RegistryPath );
35+
36+
return STATUS_SUCCESS;
37+
}
38+
2339
void __cdecl __security_init_cookie(void);
2440

2541
VOID SYMCRYPT_CALL SymCryptModuleInit(UINT32 api, UINT32 minor)

modules/windows/kernel/symcryptk.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<GenerateDebugInformation>true</GenerateDebugInformation>
6060
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
6161
<AdditionalDependencies>%(AdditionalDependencies);ntoskrnl.lib</AdditionalDependencies>
62-
<NoEntryPoint>true</NoEntryPoint>
62+
<EntryPointSymbol>GsDriverEntry</EntryPointSymbol>
6363
</Link>
6464
</ItemDefinitionGroup>
6565
<PropertyGroup Label="DbgEng">

0 commit comments

Comments
 (0)