[Bug 21443] CryptSignHash() fails when CryptCreateHash() ALG_ID is set to CALG_SSL3_SHAMD5

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Mar 11 15:50:27 CST 2010


http://bugs.winehq.org/show_bug.cgi?id=21443





--- Comment #4 from Juan Lang <juan_lang at yahoo.com>  2010-03-11 15:50:26 ---
Actually, I'm not sure that the line you highlighted is in error.  It needs
tests to determine the correct behavior.  As Microsoft states in MSDN at
"Creating a CALG_SSL3_SHAMD5 Hash" [1],

3. Get a handle to a hash object by calling CryptCreateHash with
CALG_SSL3_SHAMD5 passed in the Algid parameter.
4. Set the hash value with a call to CryptSetHashParam. The concatenated hash
values are passed as a BYTE* in the pbData parameter, and the HP_HASHVAL value
must be passed in the dwParam parameter. Calling CryptHashData using the handle
returned by CryptCreateHash in step 3 will fail.

This is indeed what the OpenSSL source does:  it calls CryptCreateHash,
CryptSetHashParam, and CryptSignHash, but not CryptHashData.  Internally,
Wine's CPSignHash doesn't call CPHashData, either.

I think the more likely source of the problem is in build_hash_signature:
http://source.winehq.org/git/wine.git/?a=blob;f=dlls/rsaenh/rsaenh.c;h=665bc40056f1a31be9599e90105bf186b49c3cf0;hb=a72eb123e5855ff22e49058cb4e8f2200b4c16df#l1426

aOIDDescriptor has implementations for CALG_MD2, CALG_MD4, CALG_MD5, and
CALG_SHA, but not for CALG_SSL3_SHAMD5.  Likewise, encrypt_block_impl doesn't
have an implementation for CALG_SSL3_SHAMD5.

[1] Assuming MSDN doesn't go breaking its links again,
http://msdn.microsoft.com/en-us/library/aa379865(VS.85).aspx

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list