From 0f43beaa7bd94c4a16092a13e1140e18bb8f21d5 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Wed, 1 Oct 2008 21:46:47 -0700 Subject: [PATCH] wintrust: Implement OpenPersonalTrustDBDialog. --- dlls/wintrust/Makefile.in | 2 +- dlls/wintrust/wintrust.spec | 2 +- dlls/wintrust/wintrust_main.c | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/wintrust/Makefile.in b/dlls/wintrust/Makefile.in index 6f30fd65fee..f74717904b8 100644 --- a/dlls/wintrust/Makefile.in +++ b/dlls/wintrust/Makefile.in @@ -5,7 +5,7 @@ VPATH = @srcdir@ MODULE = wintrust.dll IMPORTLIB = wintrust IMPORTS = crypt32 user32 advapi32 kernel32 ntdll -DELAYIMPORTS = imagehlp +DELAYIMPORTS = cryptui imagehlp C_SRCS = \ asn.c \ diff --git a/dlls/wintrust/wintrust.spec b/dlls/wintrust/wintrust.spec index f3859338a68..a9d0857ea92 100644 --- a/dlls/wintrust/wintrust.spec +++ b/dlls/wintrust/wintrust.spec @@ -55,7 +55,7 @@ @ stub MsCatFreeHashTag @ stub OfficeCleanupPolicy @ stub OfficeInitializePolicy -@ stub OpenPersonalTrustDBDialog +@ stdcall OpenPersonalTrustDBDialog(ptr) @ stdcall SoftpubAuthenticode(ptr) @ stdcall SoftpubCheckCert(ptr long long long) @ stdcall SoftpubCleanup(ptr) diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c index 091c0d4e4e0..a4bfe75ec98 100644 --- a/dlls/wintrust/wintrust_main.c +++ b/dlls/wintrust/wintrust_main.c @@ -34,6 +34,7 @@ #include "objbase.h" #include "winuser.h" #include "cryptdlg.h" +#include "cryptuiapi.h" #include "wintrust_priv.h" #include "wine/debug.h" @@ -1057,3 +1058,27 @@ BOOL WINAPI WINTRUST_AddPrivData(CRYPT_PROVIDER_DATA *data, SetLastError(ERROR_OUTOFMEMORY); return ret; } + +/*********************************************************************** + * OpenPersonalTrustDBDialog (WINTRUST.@) + * + * Opens the certificate manager dialog, showing only the stores that + * contain trusted software publishers. + * + * PARAMS + * hwnd [I] handle of parent window + * + * RETURNS + * TRUE if the dialog could be opened, FALSE if not. + */ +BOOL WINAPI OpenPersonalTrustDBDialog(HWND hwnd) +{ + CRYPTUI_CERT_MGR_STRUCT uiCertMgr; + + uiCertMgr.dwSize = sizeof(uiCertMgr); + uiCertMgr.hwndParent = hwnd; + uiCertMgr.dwFlags = CRYPTUI_CERT_MGR_PUBLISHER_TAB; + uiCertMgr.pwszTitle = NULL; + uiCertMgr.pszInitUsageOID = NULL; + return CryptUIDlgCertMgr(&uiCertMgr); +}