[PATCH] crypt32: Store CRYPT_KEY_PROV_INFO in a platform independent way.

Alexandre Julliard julliard at winehq.org
Tue Jun 9 02:08:43 CDT 2020


Dmitry Timoshkov <dmitry at baikal.ru> writes:

> Alexandre Julliard <julliard at winehq.org> wrote:
>
>> >> This makes reading and writing of CRYPT_KEY_PROV_INFO certificate property
>> >> from/to the certificate storage independent from architecture the crypt32.dll
>> >> code being executed on.
>> >
>> > Is there anything that could be improved to make this patch accepted?
>> 
>> That data structure looks strange. Maybe you could explain why it needs
>> to use the 64-bit layout, and why you are achieving that with padding
>> instead of using 64-bit types?
>
> 64-bit layout is used so that 64-bit crypt32 is able to read the structure
> saved by 32-bit crypt32, currently this leads to a memory corruption. There's
> no reason to not use 64-bit types, thanks.

That's better, but as long as you are defining your own structure, I
don't see why using simply DWORDs wouldn't work just as well, as long as
you use the same structure on 32- and 64-bit.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list