Commit 96be0ee8 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

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

parent addf0c11
...@@ -2410,6 +2410,20 @@ static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType, ...@@ -2410,6 +2410,20 @@ 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_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: case CMSG_ATTR_CERT_COUNT_PARAM:
if (msg->u.signed_data.info) if (msg->u.signed_data.info)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment