On Wed May 20 04:09:13 2026 +0000, Trent Waddington wrote:
We were recently investigating this code when running `dotnet restore` and it would appear that crypt32 on Windows doesn't do this dereference. The value of pvData is stored into the parameter and will be retrieved later. Doing the dereference here results in the contents of the handle being stored and causes a later crash. i.e., the documentation says what you're doing here is right, but the implementation doesn't match that. It would be great if you could confirm, as we have questioned our sanity investigating this. I don't know if this is right, this patch only changes the code to use the appropriate union field. I looked into this in the context of this bug:
https://bugs.winehq.org/show_bug.cgi?id=59757 Does 'dotnet restore' also pass a CERT_KEY_CONTEXT instead of a NCRYPT_KEY_HANDLE by any chance? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10948#note_140760