https://bugs.winehq.org/show_bug.cgi?id=50925
Bug ID: 50925 Summary: Error fetching public key in GetRSAKeyFromCert - File not found Product: Wine Version: 6.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: blocker Priority: P2 Component: bcrypt Assignee: wine-bugs@winehq.org Reporter: msdobrescu@gmail.com Distribution: ---
Created attachment 69740 --> https://bugs.winehq.org/attachment.cgi?id=69740 wine log
Trying to run Photoshop 2021 22.3 64 bit, under wine-6.4 (Staging), fails with:
110:fixme:reg:RegQueryInfoKeyW security argument not supported. 006c:fixme:mountmgr:query_property Faking StorageDeviceProperty data 00fc:fixme:netprofm:list_manager_QueryInterface interface {00000126-0000-0000-c000-000000000046} not implemented 00fc:fixme:netprofm:connection_point_Advise 00000000175FA510, 00000000175F4400, 00000000175F4420 - semi-stub 00fc:fixme:netprofm:connection_point_Advise 00000000175FA580, 00000000175F4220, 00000000175F4240 - semi-stub 00fc:fixme:netprofm:list_manager_GetConnectivity 00000000175FA4D0, 000000000022F300 012c:fixme:crypt:CryptStringToBinaryW Unimplemented type 4 012c:fixme:crypt:CryptStringToBinaryW Unimplemented type 4 012c:fixme:crypt:CryptImportPublicKeyInfoEx2 (1, 0000000017C8DB50, 00000000, 0000000000000000, 0000000017C8DB38): stub Error fetching public key in GetRSAKeyFromCert Error : 0x00000002 (2) Fi?ierul nu a fost g?sit. <-- (translated) File not found.
Then a message popup appears (attached).
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #1 from msdobrescu@gmail.com --- Created attachment 69741 --> https://bugs.winehq.org/attachment.cgi?id=69741 error message popup
https://bugs.winehq.org/show_bug.cgi?id=50925
msdobrescu@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |msdobrescu@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #2 from msdobrescu@gmail.com --- I have installed Photoshop 2021 from Adobe's site, having a subscription, under Windows 10, then copied the Adobe folders from Program Files and Program Files\Common Files.
winetricks allfonts pptfonts fontsmooth=rgb gdiplus dxvk atmlib msxml3 msxml6 vcrun2019 vcrun2012 vcrun2013 vcrun2010 allfonts
winetricks is 20210206 - sha256sum: 87b129a8f33963b5c772c901e4ae255e7015863a7f2f0e68cf384506e7b3abe5
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru --- Created attachment 69743 --> https://bugs.winehq.org/attachment.cgi?id=69743 patch
Does the attached patch help?
https://bugs.winehq.org/show_bug.cgi?id=50925
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |normal Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Component|bcrypt |crypt32
--- Comment #4 from Dmitry Timoshkov dmitry@baikal.ru --- Confirming.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #5 from msdobrescu@gmail.com --- Hi, testing the patch, it shows:
00f8:fixme:seh:WerRegisterRuntimeExceptionModule (L"C:\Program Files\Adobe\Adobe Photoshop 2021\dvacrashhandler.dll", 0000000011F84BA0) stub 00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm 00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm 00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm 00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm 00f8:err:shell:HCR_GetFolderAttributes should be called for simple PIDL's only! 0104:fixme:ver:GetCurrentPackageId (00000000169CFE10 0000000000000000): stub ... 006c:fixme:mountmgr:query_property Faking StorageDeviceProperty data 00f8:fixme:netprofm:list_manager_QueryInterface interface {00000126-0000-0000-c000-000000000046} not implemented 00f8:fixme:netprofm:connection_point_Advise 00000000175F93C0, 00000000175F9140, 00000000175F9160 - semi-stub 00f8:fixme:netprofm:connection_point_Advise 00000000175F9430, 00000000175E5D10, 00000000175E5D30 - semi-stub 00f8:fixme:netprofm:list_manager_GetConnectivity 00000000175F9380, 000000000022F300 010c:fixme:reg:RegQueryInfoKeyW security argument not supported. 0128:fixme:crypt:CryptStringToBinaryW Unimplemented type 4 0128:fixme:crypt:CryptStringToBinaryW Unimplemented type 4 0128:fixme:crypt:CNG_ImportPubKey Unsupported public key type: "1.2.840.113549.1.1.1" Error fetching public key in GetRSAKeyFromCert Error: 0x80090008 (-2146893816) 010c:fixme:ver:GetCurrentPackageId (000000000022FD70 0000000000000000): stub
Same popup appears.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #6 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to msdobrescu from comment #5)
0128:fixme:crypt:CNG_ImportPubKey Unsupported public key type: "1.2.840.113549.1.1.1"
Thanks for testing. The following two patches should take care of it: https://source.winehq.org/patches/data/203570 https://source.winehq.org/patches/data/203571
Please give them a try.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #7 from msdobrescu@gmail.com --- Created attachment 69779 --> https://bugs.winehq.org/attachment.cgi?id=69779 Log after second set of patches
I have tested and attached the log. I can't tell if it's fixed, look still not having the right encryption implemented.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #8 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to msdobrescu from comment #7)
Created attachment 69779 [details] Log after second set of patches
I have tested and attached the log. I can't tell if it's fixed, look still not having the right encryption implemented.
Looks like the patches worked. Now the failure is at
CryptVerifySignature failed Error: 0xc000a000 (-1073700864)
0xc000a000 - STATUS_INVALID_SIGNATURE.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #9 from msdobrescu@gmail.com --- I also see this one: crypt:CryptStringToBinaryW Unimplemented type 4
https://bugs.winehq.org/show_bug.cgi?id=50925
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |9d1ae850dfd73c60fbe2904c443 | |f79a050a20b96
--- Comment #10 from Dmitry Timoshkov dmitry@baikal.ru --- Support for RSA key was added to CryptImportPublicKeyInfoEx2().
Please retest, and report any further problems in separate bug reports.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #11 from msdobrescu@gmail.com --- Sure, please clarify how to test the new implementation: where is the patch or the version to take. Thank you!
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #12 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to msdobrescu from comment #11)
Sure, please clarify how to test the new implementation: where is the patch or the version to take. Thank you!
You either need to compile today's wine.git, or manually apply https://source.winehq.org/git/wine.git/commitdiff/c2c7946680b61bfccd4c4f5788... and https://source.winehq.org/git/wine.git/commitdiff/9d1ae850dfd73c60fbe2904c44...
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #13 from msdobrescu@gmail.com --- Thanks, I've tried, I confirm it changed, but, in order to add a new bug report, do you think are the following errors unrelated to encryption? Are the current patches complete for the case?
00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm ... 0128:fixme:crypt:CryptStringToBinaryW Unimplemented type 4 00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #14 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to msdobrescu from comment #13)
Thanks, I've tried, I confirm it changed, but, in order to add a new bug report, do you think are the following errors unrelated to encryption? Are the current patches complete for the case?
00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm ... 0128:fixme:crypt:CryptStringToBinaryW Unimplemented type 4 00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm
These errors seem to not be related to the previous failure. What error do you get now?
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #15 from msdobrescu@gmail.com --- Created attachment 69817 --> https://bugs.winehq.org/attachment.cgi?id=69817 Log update
I am not sure if this is related or not, technically speaking, so I attach the full log.
The message popup still appears, then the application exits.
I presume this is part of the login to the Adobe Cloud, but I am not sure.
AFAIK, everybody claiming Photoshop works use a pirated version that circumvents this part somehow. I don't.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #16 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to msdobrescu from comment #15)
Created attachment 69817 [details] Log update
I am not sure if this is related or not, technically speaking, so I attach the full log.
The message popup still appears, then the application exits.
I presume this is part of the login to the Adobe Cloud, but I am not sure.
AFAIK, everybody claiming Photoshop works use a pirated version that circumvents this part somehow. I don't.
I'd guess that +relay,+seh,+tid,+crypt,+bcrypt log would make it clearer what is going on. Please compress it with 'bzip2 -9' or 'xz -9' before attaching.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #17 from msdobrescu@gmail.com --- I don't know, it seems to go forever. Maybe mscorsvw processes are the cause. It seems to not conclude anymore...
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #18 from msdobrescu@gmail.com --- Created attachment 69822 --> https://bugs.winehq.org/attachment.cgi?id=69822 debug logs
I have added the debug log.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #19 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to msdobrescu from comment #18)
Created attachment 69822 [details] debug logs
I have added the debug log.
Thanks, however this log doesn't contain CryptImportPublicKeyInfoEx2() calls. Perhaps that one gets called only at some stage, and once it succeeds the stage gets changed. In order to get a log with CryptImportPublicKeyInfoEx2() you may need to re-start from scratch and generate log for the initial application run.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #20 from msdobrescu@gmail.com --- Indeed, but why I don't see any of the messages that appear without debug logging?
00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm ... 0128:fixme:crypt:CryptStringToBinaryW Unimplemented type 4 00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm
Have they been filtered out somehow?
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #21 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to msdobrescu from comment #20)
Indeed, but why I don't see any of the messages that appear without debug logging?
00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm ... 0128:fixme:crypt:CryptStringToBinaryW Unimplemented type 4 00f8:fixme:bcrypt:BCryptGenRandom ignoring selected algorithm
Have they been filtered out somehow?
I have no idea. But I managed to write a test, and can confirm that new implementation of CryptImportPublicKeyInfoEx2() works correctly, and verifying a certificate signature using the created key works fine. So, it's probably a new failure that happens later. I'd suggest to create a new bug report.
https://bugs.winehq.org/show_bug.cgi?id=50925
--- Comment #22 from msdobrescu@gmail.com --- Continued here: https://bugs.winehq.org/show_bug.cgi?id=50990
https://bugs.winehq.org/show_bug.cgi?id=50925
msdobrescu@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=50990
https://bugs.winehq.org/show_bug.cgi?id=50925
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #23 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.7.
https://bugs.winehq.org/show_bug.cgi?id=50925
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x
https://bugs.winehq.org/show_bug.cgi?id=50925
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |---
--- Comment #24 from Michael Stefaniuc mstefani@winehq.org --- Removing the 6.0.x milestone from bug fixes included in 6.0.2.