[PATCH v2 3/4] ncrypt: Implement NCryptIsAlgSupported.

Hans Leidekker hans at codeweavers.com
Wed Apr 6 03:49:59 CDT 2022


On Wed, 2022-04-06 at 03:19 -0400, Mohamad Al-Jaf wrote:
> Microsoft Edge calls this function expecting an
> implementation. With this, Internet browsing
> works.
> 
> Signed-off-by: Mohamad Al-Jaf <mohamadaljaf at gmail.com>
> ---
> v2: - Warn on invalid flags.
>     - Use BCryptEnumAlgorithms to retrieve a list.
> 
> There seems to be an issue with the way BCryptEnumAlgorithms handles
> the first argument if bitwise operation is used. On Windows, it works
> without issue, but in Wine it crashes with an unhandled page fault.
> 
> I don't know if it's something I did wrong or if the function itself
> is at fault. I noticed there was no test for bitwise operation so I
> can't say for sure.
> 
> BCryptFreeBuffer is a stub and I tried to free the list through
> the standard free function as well as HeapFree, but neither changes
> the result. Also, the crash happens even after just calling it once.
> 
> Increasing the size of the malloc to an arbitrary number, like 50,
> prevents the crash but the function does not return the right list.
> Tried to debug it on my own but to no avail.
> 
> This is what I used as a parameter:
> 
> BCRYPT_CIPHER_OPERATION |\
> BCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION |\
> BCRYPT_SIGNATURE_OPERATION |\
> BCRYPT_SECRET_AGREEMENT_OPERATION

I've submitted patches for the bcrypt issues. Can you try again with those
applied?





More information about the wine-devel mailing list