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

This commit is contained in:
Juan Lang 2012-05-18 15:27:52 -07:00 committed by Alexandre Julliard
parent ecfa9b87a0
commit 6ccdbab6c8
2 changed files with 1 additions and 7 deletions

View File

@ -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);

View File

@ -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)