Commit 4d2c9c3e authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32/tests: Fix test failures.

parent 61633b62
...@@ -1714,8 +1714,10 @@ static void test_decodeAltName(DWORD dwEncoding) ...@@ -1714,8 +1714,10 @@ static void test_decodeAltName(DWORD dwEncoding)
NULL, &buf, &bufSize); NULL, &buf, &bufSize);
/* Fails on WinXP with CRYPT_E_ASN1_RULE. I'm not too concerned about the /* Fails on WinXP with CRYPT_E_ASN1_RULE. I'm not too concerned about the
* particular failure, just that it doesn't decode. * particular failure, just that it doesn't decode.
* It succeeds on (broken) Windows versions that haven't addressed
* embedded NULLs in alternate names.
*/ */
ok(!ret, "expected failure\n"); ok(!ret || broken(ret), "expected failure\n");
/* An embedded bell character is allowed, however. */ /* An embedded bell character is allowed, however. */
ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME, ret = pCryptDecodeObjectEx(dwEncoding, X509_ALTERNATE_NAME,
dns_embedded_bell, sizeof(dns_embedded_bell), CRYPT_DECODE_ALLOC_FLAG, dns_embedded_bell, sizeof(dns_embedded_bell), CRYPT_DECODE_ALLOC_FLAG,
...@@ -1737,8 +1739,10 @@ static void test_decodeAltName(DWORD dwEncoding) ...@@ -1737,8 +1739,10 @@ static void test_decodeAltName(DWORD dwEncoding)
NULL, &buf, &bufSize); NULL, &buf, &bufSize);
/* Again, fails on WinXP with CRYPT_E_ASN1_RULE. I'm not too concerned /* Again, fails on WinXP with CRYPT_E_ASN1_RULE. I'm not too concerned
* about the particular failure, just that it doesn't decode. * about the particular failure, just that it doesn't decode.
* It succeeds on (broken) Windows versions that haven't addressed
* embedded NULLs in alternate names.
*/ */
ok(!ret, "expected failure\n"); ok(!ret || broken(ret), "expected failure\n");
} }
struct UnicodeExpectedError struct UnicodeExpectedError
...@@ -3073,7 +3077,8 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding) ...@@ -3073,7 +3077,8 @@ static void test_encodeCertToBeSigned(DWORD dwEncoding)
info.IssuerUniqueId.pbData = (BYTE *)serialNum; info.IssuerUniqueId.pbData = (BYTE *)serialNum;
ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info, ret = pCryptEncodeObjectEx(dwEncoding, X509_CERT_TO_BE_SIGNED, &info,
CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size); CRYPT_ENCODE_ALLOC_FLAG, NULL, &buf, &size);
ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); ok(ret || broken(GetLastError() == OSS_BAD_PTR /* Win98 */),
"CryptEncodeObjectEx failed: %08x\n", GetLastError());
if (buf) if (buf)
{ {
ok(size == sizeof(v1CertWithIssuerUniqueId), "Wrong size %d\n", size); ok(size == sizeof(v1CertWithIssuerUniqueId), "Wrong size %d\n", size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment