crypt32: Implement retrieving the encoded signer of a decoded signed message.

This commit is contained in:
Juan Lang 2009-09-14 08:01:43 -07:00 committed by Alexandre Julliard
parent addf0c11a0
commit 96be0ee8dc
1 changed files with 14 additions and 0 deletions

View File

@ -2410,6 +2410,20 @@ static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
else
SetLastError(CRYPT_E_INVALID_MSG_TYPE);
break;
case CMSG_ENCODED_SIGNER:
if (msg->u.signed_data.info)
{
if (dwIndex >= msg->u.signed_data.info->cSignerInfo)
SetLastError(CRYPT_E_INVALID_INDEX);
else
ret = CryptEncodeObjectEx(
X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, CMS_SIGNER_INFO,
&msg->u.signed_data.info->rgSignerInfo[dwIndex], 0, NULL,
pvData, pcbData);
}
else
SetLastError(CRYPT_E_INVALID_MSG_TYPE);
break;
case CMSG_ATTR_CERT_COUNT_PARAM:
if (msg->u.signed_data.info)
{