https://bugs.winehq.org/show_bug.cgi?id=53968
Bug ID: 53968 Summary: NCryptSignHash is not implemented Product: Wine Version: 7.21 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: bcrypt Assignee: wine-bugs@winehq.org Reporter: jesper.lindholm@treetop.se Distribution: ---
Created attachment 73557 --> https://bugs.winehq.org/attachment.cgi?id=73557 Terminal output
Using Ubuntu 22.04 x64, from-source build as of today (wine-7.21) + fix from bug 53966.
Please note that the patch from 53996 is required to get this far in the reproduction.
The .NET API RSA.SignData() calls into NCryptSignHash which is not implemented. Using .NET 6.0.
Attaching terminal output. A minimal reproducible example is at https://treetop.se/wine-bug/2022-11-23b/source.zip (a handful of lines of code) , compiled as https://treetop.se/wine-bug/2022-11-23b/wine-missing-apis.zip (published as "self-contained", ie bundling the framework which I thought might be helpful here) .
compiled .zip file hashes: SHA256 1F881B2C1946C276B6F602F8EEC11FF88B82C99EAAA39A6F13EB9173EA403D95 SHA1 B02F53D648DB20A680B5E93491D8094278FE2285
source .zip file hashes: SHA256 3977B2AA462DC54AEEBFB964FBED17A5AAA8360C501CEA3060AB239C09BBD307 SHA1 9B3E768B4F156E17B8E317C82599F9E7FE225C56
This API is used in many applications signing messages with their own cryptographic RSA keys. We ran across it when testing one of our own applications.
ncrypt looks like it should be its own component due to being its own DLL, but I can't find it or anything that looks like it; filing under bcrypt due to ncrypt implementation calling through to bcrypt in places in the hopes that it will reach the right people.
https://bugs.winehq.org/show_bug.cgi?id=53968
--- Comment #1 from Hans Leidekker hans@meelstraat.net --- Created attachment 73558 --> https://bugs.winehq.org/attachment.cgi?id=73558 patch
Here's a patch that implements it on top of BCryptSignHash(). It's not sufficient for your test app because it passes the BCRYPT_PAD_PSS flag, which is unimplemented.
https://bugs.winehq.org/show_bug.cgi?id=53968
--- Comment #2 from jesper.lindholm@treetop.se --- That's great. Should we be filing a separate bug for that or is that work ongoing/implicitly logged? Your comment was the only mention I found for both BCRYPT_PAD_PSS and BCryptSignHash.
https://bugs.winehq.org/show_bug.cgi?id=53968
--- Comment #3 from Hans Leidekker hans@meelstraat.net --- (In reply to jesper.lindholm from comment #2)
That's great. Should we be filing a separate bug for that or is that work ongoing/implicitly logged? Your comment was the only mention I found for both BCRYPT_PAD_PSS and BCryptSignHash.
Yes, please file a separate bug and I'll take a look.
https://bugs.winehq.org/show_bug.cgi?id=53968
--- Comment #4 from jesper.lindholm@treetop.se --- Filed as bug 53972 - it refers back to this for details on reproducing it. I hope that's okay.
https://bugs.winehq.org/show_bug.cgi?id=53968
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |6d01d014552782c55d297f5244b | |e01a11c33d35e Status|UNCONFIRMED |RESOLVED
--- Comment #5 from Hans Leidekker hans@meelstraat.net --- Fixed with 6d01d014552782c55d297f5244be01a11c33d35e.
https://bugs.winehq.org/show_bug.cgi?id=53968
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.0-rc1.