Hi Vijay,

you forgot aes.c in your patch - please remember to git add it, then
commit it along with the rest of the changes.

>From what you've sent, your patch looks pretty good so far.  A few comments:

@@ -161,6 +162,10 @@ static const PROV_ENUMALGS_EX
aProvEnumAlgsEx[4][RSAENH_MAX_ENUMALGS+1] =
   {CALG_RC2,       40, 40,   56,0,                    4,"RC2",
24,"RSA Data Security's RC2"},
   {CALG_RC4,       40, 40,   56,0,                    4,"RC4",
24,"RSA Data Security's RC4"},
   {CALG_DES,       56, 56,   56,0,                    4,"DES",
31,"Data Encryption Standard (DES)"},
+  {CALG_AES,      128,128,  128,0,                    4,"AES",
35,"Advanced Encryption Standard (AES)"},
+  {CALG_AES_128,  128,128,  128,0,                    8,"AES-128",
39,"Advanced Encryption Standard (AES-128)"},
+  {CALG_AES_192,  192,192,  192,0,                    8,"AES-192",
39,"Advanced Encryption Standard (AES-192)"},
+  {CALG_AES_256,  256,256,  256,0,                    8,"AES-256",
39,"Advanced Encryption Standard (AES-256)"},

I'm not sure AES support should be included in every "personality" of
rsaenh.  Specifically, some cryptographic providers don't support it.
Here's a blog that mentions how the MS_ENHANCED_PROV provider doesn't
support it, but the MS_ENH_RSA_AES_PROV does:
http://sys.cs.rice.edu/~sethn/wordpress/?p=19

+    if (!result) {
+        /* rsaenh compiled without OpenSSL */
+        ok(GetLastError()==NTE_BAD_ALGID, "%08x\n", GetLastError());
+        return;
+    }

Our rsaenh hasn't built against OpenSSL in some time, so this test
should be removed from existing tests.  You don't need to do that if
you don't want, but don't bother adding it to new tests.

+    result = CryptEncrypt(hKey, (HCRYPTHASH)NULL, TRUE, 0, pbData, &dwLen, 16);
+    ok(result, "%08x\n", GetLastError());
+
+    result = CryptDecrypt(hKey, (HCRYPTHASH)NULL, TRUE, 0, pbData, &dwLen);
+    ok(result, "%08x\n", GetLastError());

You should check that the encrypted output matches some expected
value, and that the decrypted output matches the plaintext input.

Thanks very much for getting this started.
--Juan


Reply via email to