crypt32: Allow some last errors set by Vista.

This commit is contained in:
Juan Lang 2008-02-14 10:36:16 -08:00 committed by Alexandre Julliard
parent 348261e6ab
commit b579eac22f
1 changed files with 9 additions and 6 deletions

View File

@ -1552,12 +1552,14 @@ static void testSignCert(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned,
algoID.pszObjId = (LPSTR)sigOID;
ret = CryptSignCertificate(0, 0, 0, toBeSigned->pbData, toBeSigned->cbData,
&algoID, NULL, NULL, &size);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError());
ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || NTE_BAD_ALGID),
"Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n",
GetLastError());
ret = CryptSignCertificate(0, AT_SIGNATURE, 0, toBeSigned->pbData,
toBeSigned->cbData, &algoID, NULL, NULL, &size);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError());
ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || NTE_BAD_ALGID),
"Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n",
GetLastError());
/* No keys exist in the new CSP yet.. */
ret = CryptSignCertificate(csp, AT_SIGNATURE, 0, toBeSigned->pbData,
@ -1767,8 +1769,9 @@ static void testSignAndEncodeCert(void)
algID.pszObjId = oid_rsa_md5rsa;
ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING,
X509_CERT_TO_BE_SIGNED, &info, &algID, NULL, NULL, &size);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError());
ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || NTE_BAD_ALGID),
"Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n",
GetLastError());
algID.pszObjId = oid_rsa_md5;
ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING,
X509_CERT_TO_BE_SIGNED, &info, &algID, NULL, NULL, &size);