crypt32(3/6): Don't fail if HCRYPTPROV and PCRYPT_KEY_PROV_INFO parameters are both non-NULL
Juan Lang
juan.lang at gmail.com
Wed May 30 16:22:59 CDT 2012
This merely moves around a todo for this step, but I'll remove it in a
subsequent patch.
--Juan
-------------- next part --------------
From 673a82f22e72290af2b9b32eba717ffd5a076dc3 Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Fri, 18 May 2012 15:27:52 -0700
Subject: [PATCH 4/7] 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)
--
1.7.7.3
More information about the wine-patches
mailing list