winstorecompat: Add a comment about limitations in the CryptAcquireContextW implementation

This actually makes this fallback implementation unsuitable for
early intialized random values like stack guards.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2022-09-29 17:03:22 +03:00
parent 35315533e2
commit 1a05537735

View File

@ -59,6 +59,9 @@ BOOL WINAPI CryptAcquireContextW(HCRYPTPROV *phProv, LPCTSTR pszContainer, LPCTS
return FALSE;
}
// Note; this fails if run early in the process init (e.g. while running
// DLL constructors); it succeeds if called later on, when the runtime
// has started up properly.
__x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics *cryptoStatics = NULL;
hr = RoGetActivationFactory(hClassName, &IID___x_ABI_CWindows_CSecurity_CCryptography_CICryptographicBufferStatics, (void**)&cryptoStatics);
WindowsDeleteString(hClassName);