[PATCH 2/2] crypt32: importing system root certs into volatile registry keys instead of dedicated RootStore

Jacek Caban jacek at codeweavers.com
Thu Nov 3 07:33:33 CDT 2016


On 02.11.2016 23:11, Donat Enikeev wrote:
> Hi Jacek,
>
> Regarding thread safe part, to use CreateSemaphore instead of CreateMutex
>
> After a deeper thinking and code/wiki reading, it would be better to
> get some clarify first, I believe, probably I missed something on the
> way. 

I meant a race like this:
1. process 1 calls CRYPT_ImportSystemRootCertsToReg, creates a mutex and
starts to process system certs
2. process 2 calls CRYPT_ImportSystemRootCertsToReg, mutex exists so
reads certs from registry which is empty at this point
3. process 1 writes to registry

See [1] for an example how this may be handled.

Thanks,
Jacek

[1]
http://source.winehq.org/git/wine.git/blob/cc361eefcef4e1fe0f15ecbf1aae65bcde1e6ce9:/dlls/mshtml/install.c#l472



More information about the wine-devel mailing list