crypt32: Implement getting version from an encoded signed message.
This commit is contained in:
parent
8c81a38698
commit
4f30f90c39
|
@ -865,6 +865,10 @@ static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
|
|||
ret = CryptGetHashParam(msg->signerHandles[dwIndex].hash,
|
||||
HP_HASHVAL, pvData, pcbData, 0);
|
||||
break;
|
||||
case CMSG_VERSION_PARAM:
|
||||
ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->info.version,
|
||||
sizeof(msg->info.version));
|
||||
break;
|
||||
default:
|
||||
FIXME("unimplemented for %d\n", dwParamType);
|
||||
SetLastError(CRYPT_E_INVALID_MSG_TYPE);
|
||||
|
|
|
@ -1355,14 +1355,11 @@ static void test_signed_msg_get_param(void)
|
|||
/* For "signed" messages, so is the version. */
|
||||
size = 0;
|
||||
ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, NULL, &size);
|
||||
todo_wine
|
||||
ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError());
|
||||
size = sizeof(value);
|
||||
ret = CryptMsgGetParam(msg, CMSG_VERSION_PARAM, 0, (LPBYTE)&value, &size);
|
||||
todo_wine {
|
||||
ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError());
|
||||
ok(value == CMSG_SIGNED_DATA_V1, "Expected version 1, got %d\n", value);
|
||||
}
|
||||
/* But for this message, with no signers, the hash and signer aren't
|
||||
* available.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue