Module: wine Branch: master Commit: 96be0ee8dcfb487d1582c4e8bb9f09162a934a7c URL: http://source.winehq.org/git/wine.git/?a=commit;h=96be0ee8dcfb487d1582c4e8bb...
Author: Juan Lang juan.lang@gmail.com Date: Mon Sep 14 08:01:43 2009 -0700
crypt32: Implement retrieving the encoded signer of a decoded signed message.
---
dlls/crypt32/msg.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 0b4027d..8a88b75 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -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) {