Juan Lang : crypt32: Don' t fail if HCRYPTPROV and PCRYPT_KEY_PROV_INFO parameters are both non-NULL.

Alexandre Julliard julliard at winehq.org
Thu May 31 13:30:40 CDT 2012


Module: wine
Branch: master
Commit: 6ccdbab6c860546a80c7dd1eab34e8b64bdb8ec6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6ccdbab6c860546a80c7dd1eab34e8b64bdb8ec6

Author: Juan Lang <juan.lang at gmail.com>
Date:   Fri May 18 15:27:52 2012 -0700

crypt32: Don't fail if HCRYPTPROV and PCRYPT_KEY_PROV_INFO parameters are both non-NULL.

---

 dlls/crypt32/cert.c       |    5 -----
 dlls/crypt32/tests/cert.c |    3 +--
 2 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index 557a17b..be7d07c 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -3201,11 +3201,6 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN
             releaseContext = TRUE;
         }
     }
-    else if (pKeyProvInfo)
-    {
-        SetLastError(ERROR_INVALID_PARAMETER);
-        return NULL;
-    }
 
     CryptExportPublicKeyInfo(hProv, dwKeySpec, X509_ASN_ENCODING, NULL,
      &pubKeySize);
diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c
index 52d3013..92a92b5 100644
--- a/dlls/crypt32/tests/cert.c
+++ b/dlls/crypt32/tests/cert.c
@@ -2156,11 +2156,11 @@ static void testCreateSelfSignCert(void)
     SetLastError(0xdeadbeef);
     context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL,
         NULL, NULL);
+    todo_wine
     ok(context == NULL, "expected failure\n");
     if (context != NULL)
         CertFreeCertificateContext(context);
     else
-        todo_wine
         ok(GetLastError() == NTE_NO_KEY, "expected NTE_NO_KEY, got %08x\n",
             GetLastError());
     /* Again, with a CSP, AT_SIGNATURE and key info */
@@ -2168,7 +2168,6 @@ static void testCreateSelfSignCert(void)
     SetLastError(0xdeadbeef);
     context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL,
         NULL, NULL);
-    todo_wine
     ok(context != NULL,
         "CertCreateSelfSignCertificate failed: %08x\n", GetLastError());
     if (context)




More information about the wine-cvs mailing list