crypt32: Don't fail if HCRYPTPROV and PCRYPT_KEY_PROV_INFO parameters are both non-NULL.
This commit is contained in:
parent
ecfa9b87a0
commit
6ccdbab6c8
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue