[rsaenh 1/2] Make hmac test run on all windows versions

Paul Vriens Paul.Vriens at xs4all.nl
Sun Oct 8 07:41:56 CDT 2006


Hi,

HMAC combined with MD2 has different results on W2K3. I haven't found a reason
why yet. I will produce some more tests next week for more hash algorithms.
I'll add more tests anyway as I'm going to try and bring our libtomcrypt
stuff in sync again.

Changelog
  Make hmac test run on all windows versions

Cheers,

Paul.
---
 dlls/rsaenh/tests/rsaenh.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c
index 25467d7..13468b9 100644
--- a/dlls/rsaenh/tests/rsaenh.c
+++ b/dlls/rsaenh/tests/rsaenh.c
@@ -626,12 +626,13 @@ static void test_hmac(void) {
     HCRYPTKEY hKey;
     HCRYPTHASH hHash;
     BOOL result;
-    HMAC_INFO hmacInfo = { CALG_MD2, NULL, 0, NULL, 0 };
+    /* Using CALG_MD2 here fails on Windows 2003, why ? */
+    HMAC_INFO hmacInfo = { CALG_MD5, NULL, 0, NULL, 0 };
     DWORD dwLen;
     BYTE abData[256];
     static const BYTE hmac[16] = { 
-        0xfd, 0x16, 0xb5, 0xb6, 0x13, 0x1c, 0x2b, 0xd6, 
-        0x0a, 0xc7, 0xae, 0x92, 0x76, 0xa3, 0x05, 0x71 };
+        0x1a, 0x7d, 0x49, 0xc5, 0x9b, 0x2d, 0x0b, 0x9c, 
+        0xcf, 0x10, 0x6b, 0xb6, 0x7d, 0x0f, 0x13, 0x32 };
     int i;
 
     for (i=0; i<sizeof(abData)/sizeof(BYTE); i++) abData[i] = (BYTE)i;
-- 
1.4.2.3




More information about the wine-patches mailing list