crypt32: Support getting the inner content OID from a decoded signed message.

This commit is contained in:
Juan Lang 2007-07-30 12:10:27 -07:00 committed by Alexandre Julliard
parent 014467031e
commit 4e0f33dada
2 changed files with 8 additions and 1 deletions

View File

@ -1760,6 +1760,14 @@ static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
else else
SetLastError(CRYPT_E_INVALID_MSG_TYPE); SetLastError(CRYPT_E_INVALID_MSG_TYPE);
break; break;
case CMSG_INNER_CONTENT_TYPE_PARAM:
if (msg->u.signedInfo)
ret = CRYPT_CopyParam(pvData, pcbData,
msg->u.signedInfo->content.pszObjId,
strlen(msg->u.signedInfo->content.pszObjId) + 1);
else
SetLastError(CRYPT_E_INVALID_MSG_TYPE);
break;
case CMSG_SIGNER_COUNT_PARAM: case CMSG_SIGNER_COUNT_PARAM:
if (msg->u.signedInfo) if (msg->u.signedInfo)
ret = CRYPT_CopyParam(pvData, pcbData, ret = CRYPT_CopyParam(pvData, pcbData,

View File

@ -1978,7 +1978,6 @@ static void test_decode_msg_get_param(void)
ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError());
check_param("signed content", msg, CMSG_CONTENT_PARAM, msgData, check_param("signed content", msg, CMSG_CONTENT_PARAM, msgData,
sizeof(msgData)); sizeof(msgData));
todo_wine
check_param("inner content", msg, CMSG_INNER_CONTENT_TYPE_PARAM, check_param("inner content", msg, CMSG_INNER_CONTENT_TYPE_PARAM,
(const BYTE *)szOID_RSA_data, strlen(szOID_RSA_data) + 1); (const BYTE *)szOID_RSA_data, strlen(szOID_RSA_data) + 1);
size = sizeof(value); size = sizeof(value);