Hans Leidekker (@hans) commented about dlls/crypt32/tests/msg.c:
compare_signer_info((CMSG_SIGNER_INFO *)buf, &signer); CryptMemFree(buf); }
- size = 0;
- ret = CryptMsgGetParam(msg, CMSG_SIGNER_UNAUTH_ATTR_PARAM, 0, NULL, &size);
- ok(!ret, "CryptMsgGetParam succeeded unexpectedly\n");
- ok(GetLastError() == CRYPT_E_ATTRIBUTES_MISSING, "unexpected error %08lx\n", GetLastError());
You should set last error to a known value before calling CryptMsgGetParam() to confirm that this function sets it: `SetLastError(0xdeadbeef);`