Juan Lang : wintrust: Implement SoftpubCleanup.
Alexandre Julliard
julliard at winehq.org
Thu Sep 13 07:17:19 CDT 2007
Module: wine
Branch: master
Commit: b13d16a0da4f02c577bc8b4ee02e5124e749ad19
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b13d16a0da4f02c577bc8b4ee02e5124e749ad19
Author: Juan Lang <juan.lang at gmail.com>
Date: Wed Sep 12 08:58:45 2007 -0700
wintrust: Implement SoftpubCleanup.
---
dlls/wintrust/softpub.c | 35 +++++++++++++++++++++++++++++++++++
dlls/wintrust/wintrust.spec | 2 +-
2 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/dlls/wintrust/softpub.c b/dlls/wintrust/softpub.c
index 48632d5..2d892b5 100644
--- a/dlls/wintrust/softpub.c
+++ b/dlls/wintrust/softpub.c
@@ -569,3 +569,38 @@ HRESULT WINAPI WintrustCertificateTrust(CRYPT_PROVIDER_DATA *data)
GetLastError();
return ret ? S_OK : S_FALSE;
}
+
+HRESULT WINAPI SoftpubCleanup(CRYPT_PROVIDER_DATA *data)
+{
+ DWORD i, j;
+
+ for (i = 0; i < data->csSigners; i++)
+ {
+ for (j = 0; j < data->pasSigners[i].csCertChain; j++)
+ CertFreeCertificateContext(data->pasSigners[i].pasCertChain[j].pCert);
+ data->psPfns->pfnFree(data->pasSigners[i].pasCertChain);
+ data->psPfns->pfnFree(data->pasSigners[i].psSigner);
+ CertFreeCertificateChain(data->pasSigners[i].pChainContext);
+ }
+ data->psPfns->pfnFree(data->pasSigners);
+
+ for (i = 0; i < data->chStores; i++)
+ CertCloseStore(data->pahStores[i], 0);
+ data->psPfns->pfnFree(data->pahStores);
+
+ if (data->u.pPDSip)
+ {
+ data->psPfns->pfnFree(data->u.pPDSip->pSip);
+ data->psPfns->pfnFree(data->u.pPDSip->pCATSip);
+ data->psPfns->pfnFree(data->u.pPDSip->psSipSubjectInfo);
+ data->psPfns->pfnFree(data->u.pPDSip->psSipCATSubjectInfo);
+ data->psPfns->pfnFree(data->u.pPDSip->psIndirectData);
+ }
+
+ CryptMsgClose(data->hMsg);
+
+ if (data->fOpenedFile)
+ CloseHandle(data->pWintrustData->u.pFile->hFile);
+
+ return S_OK;
+}
diff --git a/dlls/wintrust/wintrust.spec b/dlls/wintrust/wintrust.spec
index c7ae993..f260193 100644
--- a/dlls/wintrust/wintrust.spec
+++ b/dlls/wintrust/wintrust.spec
@@ -58,7 +58,7 @@
@ stub OpenPersonalTrustDBDialog
@ stub SoftpubAuthenticode
@ stdcall SoftpubCheckCert(ptr long long long)
-@ stub SoftpubCleanup
+@ stdcall SoftpubCleanup(ptr)
@ stub SoftpubDefCertInit
@ stdcall SoftpubDllRegisterServer()
@ stdcall SoftpubDllUnregisterServer()
More information about the wine-cvs
mailing list