[Bug 42652] New: CryptCreateHash error NTE_FAIL after CryptImportKey( public-key)
https://bugs.winehq.org/show_bug.cgi?id=42652 Bug ID: 42652 Summary: CryptCreateHash error NTE_FAIL after CryptImportKey(public-key) Product: Wine Version: 2.2 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: rsaenh Assignee: wine-bugs(a)winehq.org Reporter: shirouzu(a)ipmsg.org Created attachment 57588 --> https://bugs.winehq.org/attachment.cgi?id=57588 reproduction-project Hello, wine developers. I got CryptCreateHash error (NTE_FAIL=0x80090020) after CryptImportKey(another user's 'public' key). Always OK : WindowsXP/Vista/7/8/8.1/10 Always NG : Wine 1.8/2.0(and wine-hq 2.2) in MacOSX(sierra) and Linux debian(testing, wheezy, or etc). In the following Senario ... Encrypt with another user's public key, and sign with my PrivateKey. 1. CryptAcquireContext(...MS_ENHANCED_PROV, PROV_RSA_FULL...) 2. CryptGenKey() or CryptUserKey() for private key 3. CryptImportKey(another users' public key, &hExKey) 4. CryptEncrypt(hExKey, data...) 5. CryptCreateHash() for sign 6. CryptHashData() 7. CryptSignHash() ... I got OK in Windows, but NTE_FAIL in wine. I post a reproduction-project as attachment-file. Please see signhash_test.cpp in it. I think CPSignHash -> encrypt_block_impl -> rsa_exptmod error. https://github.com/wine-mirror/wine/blob/master/dlls/rsaenh/rsaenh.c -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42652 Sagawa <sagawa.aki+winebugs(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs(a)gmail.c | |om -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42652 --- Comment #1 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- Hi, Thanks for reporting and good testcase. My test shows CryptImportKey() with a public key doesn't update a key container on native. However, on wine, it does. I'll send a patch for the issue. After patching, your test application works well. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42652 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest(a)luukku.com --- Comment #2 from winetest(a)luukku.com --- (In reply to Sagawa from comment #1)
Hi, Thanks for reporting and good testcase. My test shows CryptImportKey() with a public key doesn't update a key container on native. However, on wine, it does. I'll send a patch for the issue. After patching, your test application works well.
Your patches were committed so this is now...fixed? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42652 --- Comment #3 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- Yes, I believe it is fixed by e705dfc27f15164e8f2cdd17cf505c19d78415e2. Shirouzu, could you update bug status? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42652 shirouzu <shirouzu(a)ipmsg.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #4 from shirouzu <shirouzu(a)ipmsg.org> --- Thank you for fixing! I changed bug status to RESOLVED/FIXED. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42652 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e705dfc27f15164e8f2cdd17cf5 | |05c19d78415e2 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=42652 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 2.8. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org