crypt32: Split the test for ret and last error up.

This commit is contained in:
James Hawkins 2008-08-28 21:20:09 -05:00 committed by Alexandre Julliard
parent 24bd8c0faf
commit a50fc2cc16
1 changed files with 3 additions and 2 deletions

View File

@ -6387,8 +6387,9 @@ static void test_encodeCMSSignerInfo(DWORD dwEncoding)
SetLastError(0xdeadbeef);
ret = CryptEncodeObjectEx(dwEncoding, CMS_SIGNER_INFO, &info,
CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size);
ok(!ret && GetLastError() == E_INVALIDARG,
"Expected E_INVALIDARG, got %08x\n", GetLastError());
ok(!ret, "Expected failure, got %d\n", ret);
ok(GetLastError() == E_INVALIDARG,
"Expected E_INVALIDARG, got %08x\n", GetLastError());
/* To be encoded, a signer must have a valid cert ID, where a valid ID may
* be a key id or a issuer serial number with at least the issuer set, and
* the encoding must include PKCS_7_ASN_ENCODING.