Question about implementing a test for BCryptGetFipsAlgorithmMode

Kai Blaschke kai.blaschke at
Fri Sep 19 12:40:54 CDT 2014


I had a small patch lying around here for some while which properly 
implements the BCryptGetFipsAlgorithmMode function, behaving identically 
to the original implementation. Just one question is bugging me, 
regarding the test. To properly test the function, I'd have to write to 
a registry key in HKLM\System\CurrentControlSet\Control\Lsa. Is it safe 
to assume that the test has write access to this key?

Additionally, I noticed I put a small bug in the code, returning false 
for all registry values which are multiples of 256, which is a result of 
simply casting a registry DWORD value to a BOOLEAN. To my surprise, the 
original function - tested with WinXP and Win7 - has the same bug, so I 
wouldn't fix my implementation before sending in the patch if no one 
votes against it.


More information about the wine-devel mailing list