[PATCH 2/2] bcrypt: Return STATUS_INVALID_PARAMETER when invalid flag passed to BCryptCreateHash.

Hans Leidekker hans at codeweavers.com
Tue Mar 5 05:39:24 CST 2019


On Tue, 2019-03-05 at 11:42 +0100, Hans Leidekker wrote:
> On Tue, 2019-03-05 at 21:23 +1100, Brendan McGrath wrote:
> > My patch to the mailing list is based on a change I made to my local 
> > build to fix an issue while running .NET Core. I can see in the .NET 
> > Core code, that it passes BCRYPT_HASH_REUSABLE_FLAG to BCryptCreateHash 
> > and expects STATUS_INVALID_PARAMETER if the OS is pre-Win8 (I'm using 
> > Win7). That code can be seen here (it's under the MIT licence):
> > https://github.com/dotnet/corefx/blob/master/src/Common/src/Internal/Cryptography/HashProviderCng.cs#L40
> > 
> > So until BCRYPT_HASH_REUSABLE_FLAG is implemented - maybe it is better 
> > to return STATUS_INVALID_PARAMETER?
> 
> Sure, if you restrict it to BCRYPT_HASH_REUSABLE_FLAG. But implementing
> the flag would be even better, and doesn't look too hard.

Here's a draft patch, can you give it a try?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bcrypt.diff
Type: text/x-patch
Size: 7357 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190305/b30fe86d/attachment.bin>


More information about the wine-devel mailing list