From 0823c4fc61156540b2c246e334deaccbbe46f23f Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Tue, 14 Aug 2007 10:14:54 -0700 Subject: [PATCH] wintrust: Implement WTHelperGetProvSignerFromChain. --- dlls/wintrust/wintrust_main.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c index 66ad322802..8e7859d887 100644 --- a/dlls/wintrust/wintrust_main.c +++ b/dlls/wintrust/wintrust_main.c @@ -105,9 +105,23 @@ CRYPT_PROVIDER_SGNR * WINAPI WTHelperGetProvSignerFromChain( CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSigner, DWORD idxCounterSigner) { - FIXME("%p %d %d %d\n", pProvData, idxSigner, fCounterSigner, + CRYPT_PROVIDER_SGNR *sgnr; + + TRACE("(%p %d %d %d)\n", pProvData, idxSigner, fCounterSigner, idxCounterSigner); - return NULL; + + if (idxSigner >= pProvData->csSigners || !pProvData->pasSigners) + return NULL; + sgnr = &pProvData->pasSigners[idxSigner]; + if (fCounterSigner) + { + if (idxCounterSigner >= sgnr->csCounterSigners || + !sgnr->pasCounterSigners) + return NULL; + sgnr = &sgnr->pasCounterSigners[idxCounterSigner]; + } + TRACE("returning %p\n", sgnr); + return sgnr; } /***********************************************************************