https://bugs.winehq.org/show_bug.cgi?id=50024
Bug ID: 50024 Summary: signtool.exe from Windows 7 SDK fails to find certificates Product: Wine Version: 5.19 Hardware: x86-64 OS: Linux Status: NEW Keywords: regression Severity: normal Priority: P2 Component: crypt32 Assignee: wine-bugs@winehq.org Reporter: z.figura12@gmail.com CC: dmitry@baikal.ru Regression SHA1: fd1be205ba7dc9691427aab4c35278e88eff081c Distribution: ---
Note that signtool.exe needs mfc42.
zeb@terabithia$ wine makecert.exe -r -pe -ss winetest_store -n CN=kumquat2 kumquat2.cer 0024:fixme:heap:RtlSetHeapInformation 00110000 1 00000000 0 stub 0024:fixme:mssign:PvkGetCryptProv 00000000 L"Subject Key" (null) 1 (null) L"89b748c7-e828-4eab-9d74-99785e1867e3" 01009658 0031FE10 0031FCDC stub 0024:fixme:mssign:PvkFreeCryptProv 00179e68 (null) 1 (null) stub Succeeded zeb@terabithia$ wine signtool.exe sign /v /s winetest_store /n kumquat2 winetest.sys 0024:fixme:heap:RtlSetHeapInformation 00000000 1 00000000 0 stub 0024:fixme:crypt:CRYPT_RegControl CERT_STORE_CTRL_AUTO_RESYNC: stub 0024:fixme:crypt:CRYPT_RegControl CERT_STORE_CTRL_AUTO_RESYNC: stub SignTool Error: No certificates were found that met all the given criteria.
From some blithe debugging, I notice that what actually happens is a crash in
CRYPT_FixKeyProvInfoPointers(), masked by the try block in CRYPT_ReadSerializedElement(). [Is it just me, or is that try block a bad idea?] It seems that the format stored in the registry not only doesn't match store_CRYPT_KEY_PROV_INFO—all of the pointer size fields are 32-bit—but also uses pointers instead of offsets. From looking at the code, it doesn't seem that we convert *back* to store_CRYPT_KEY_PROV_INFO when storing into the registry.
I.e. the program that reports the error is signtool, but makecert appears to be at fault.
Reverting fd1be205ba7dc9691427aab4c35278e88eff081c allows it to work, at least the 32-bit version [though it subsequently breaks on missing mssign32 functions].
https://bugs.winehq.org/show_bug.cgi?id=50024
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru --- https://www.winehq.org/pipermail/wine-devel/2020-November/176731.html should hopefully fix it.
https://bugs.winehq.org/show_bug.cgi?id=50024
--- Comment #2 from Zebediah Figura z.figura12@gmail.com --- (In reply to Dmitry Timoshkov from comment #1)
https://www.winehq.org/pipermail/wine-devel/2020-November/176731.html should hopefully fix it.
Confirming that https://source.winehq.org/patches/data/195728 does fix it; thanks!
https://bugs.winehq.org/show_bug.cgi?id=50024
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/crypt32-CRYPT_KE | |Y_PROV_INFO Status|NEW |STAGED
https://bugs.winehq.org/show_bug.cgi?id=50024
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |01d79531894f14b99b15ac62f66 | |1fdfcd585da1f Status|STAGED |RESOLVED Resolution|--- |FIXED CC| |infyquest@gmail.com
--- Comment #3 from Vijay Kamuju infyquest@gmail.com --- Fix mainlined https://source.winehq.org/git/wine.git/commit/01d79531894f14b99b15ac62f661fd...
https://bugs.winehq.org/show_bug.cgi?id=50024
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.0-rc2.