Author: winesync
Date: Sat Sep 2 10:27:09 2006
New Revision: 23883
URL:
http://svn.reactos.org/svn/reactos?rev=23883&view=rev
Log:
Autosyncing with Wine HEAD
Added:
trunk/reactos/dll/win32/wintrust/register.c (with props)
trunk/reactos/dll/win32/wintrust/wintrust_ros.diff
Removed:
trunk/reactos/dll/win32/wintrust/Makefile.in
Modified:
trunk/reactos/dll/win32/wintrust/version.rc
trunk/reactos/dll/win32/wintrust/wintrust.rbuild
trunk/reactos/dll/win32/wintrust/wintrust.spec
trunk/reactos/dll/win32/wintrust/wintrust_main.c
trunk/reactos/media/doc/README.WINE
Removed: trunk/reactos/dll/win32/wintrust/Makefile.in
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/Makefil…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/Makefile.in (original)
+++ trunk/reactos/dll/win32/wintrust/Makefile.in (removed)
@@ -1,16 +1,0 @@
-TOPSRCDIR = @top_srcdir@
-TOPOBJDIR = ../..
-SRCDIR = @srcdir@
-VPATH = @srcdir@
-MODULE = wintrust.dll
-IMPORTLIB = libwintrust.$(IMPLIBEXT)
-IMPORTS = kernel32
-
-C_SRCS = wintrust_main.c
-
-RC_SRCS = \
- version.rc
-
-@MAKE_DLL_RULES@
-
-### Dependencies:
Added: trunk/reactos/dll/win32/wintrust/register.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/registe…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/register.c (added)
+++ trunk/reactos/dll/win32/wintrust/register.c Sat Sep 2 10:27:09 2006
@@ -1,0 +1,126 @@
+/*
+ * Register related wintrust functions
+ *
+ * Copyright 2006 Paul Vriens
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+
+#include "guiddef.h"
+#include "wintrust.h"
+#include "softpub.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
+
+/***********************************************************************
+ * WintrustAddActionID (WINTRUST.@)
+ */
+BOOL WINAPI WintrustAddActionID( GUID* pgActionID, DWORD fdwFlags,
+ CRYPT_REGISTER_ACTIONID* psProvInfo)
+{
+ FIXME("%p %lx %p\n", pgActionID, fdwFlags, psProvInfo);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
+
+/***********************************************************************
+ * WintrustRemoveActionID (WINTRUST.@)
+ */
+BOOL WINAPI WintrustRemoveActionID( GUID* pgActionID )
+{
+ FIXME("(%s)\n", debugstr_guid(pgActionID));
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
+
+/***********************************************************************
+ * DllRegisterServer (WINTRUST.@)
+ */
+HRESULT WINAPI DllRegisterServer(void)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+/***********************************************************************
+ * DllUnregisterServer (WINTRUST.@)
+ */
+HRESULT WINAPI DllUnregisterServer(void)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+/***********************************************************************
+ * SoftpubDllRegisterServer (WINTRUST.@)
+ */
+HRESULT WINAPI SoftpubDllRegisterServer(void)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+/***********************************************************************
+ * SoftpubDllUnregisterServer (WINTRUST.@)
+ */
+HRESULT WINAPI SoftpubDllUnregisterServer(void)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+/***********************************************************************
+ * mscat32DllRegisterServer (WINTRUST.@)
+ */
+HRESULT WINAPI mscat32DllRegisterServer(void)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+/***********************************************************************
+ * mscat32DllUnregisterServer (WINTRUST.@)
+ */
+HRESULT WINAPI mscat32DllUnregisterServer(void)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+/***********************************************************************
+ * mssip32DllRegisterServer (WINTRUST.@)
+ */
+HRESULT WINAPI mssip32DllRegisterServer(void)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
+
+/***********************************************************************
+ * mssip32DllUnregisterServer (WINTRUST.@)
+ */
+HRESULT WINAPI mssip32DllUnregisterServer(void)
+{
+ FIXME("stub\n");
+ return S_OK;
+}
Propchange: trunk/reactos/dll/win32/wintrust/register.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/wintrust/version.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/version…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/version.rc (original)
+++ trunk/reactos/dll/win32/wintrust/version.rc Sat Sep 2 10:27:09 2006
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WINE_FILENAME_STR "wintrust.dll"
Modified: trunk/reactos/dll/win32/wintrust/wintrust.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/wintrus…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/wintrust.rbuild (original)
+++ trunk/reactos/dll/win32/wintrust/wintrust.rbuild Sat Sep 2 10:27:09 2006
@@ -1,11 +1,18 @@
-<module name="wintrust" type="win32dll"
baseaddress="${BASEADDRESS_WINTRUST}" installbase="system32"
installname="wintrust.dll">
- <autoregister infsection="OleControlDlls"
type="DllRegisterServer" />
+<module name="wintrust" type="win32dll"
baseaddress="${BASEADDRESS_WINTRUST}" installbase="system32"
installname="wintrust.dll" allowwarnings="true">
<importlibrary definition="wintrust.spec.def" />
<include base="wintrust">.</include>
<include base="ReactOS">include/reactos/wine</include>
+ <define name="__REACTOS__" />
+ <define name="__WINESRC__" />
<define name="__USE_W32API" />
+ <define name="_WIN32_IE">0x600</define>
+ <define name="_WIN32_WINNT">0x501</define>
+ <define name="WINVER">0x501</define>
<library>wine</library>
+ <library>crypt32</library>
+ <library>kernel32</library>
<library>ntdll</library>
+ <file>register.c</file>
<file>wintrust_main.c</file>
<file>version.rc</file>
<file>wintrust.spec</file>
Modified: trunk/reactos/dll/win32/wintrust/wintrust.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/wintrus…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/wintrust.spec (original)
+++ trunk/reactos/dll/win32/wintrust/wintrust.spec Sat Sep 2 10:27:09 2006
@@ -3,7 +3,7 @@
@ stdcall CryptCATAdminAcquireContext(long ptr long)
@ stub CryptCATAdminAddCatalog
@ stdcall CryptCATAdminCalcHashFromFileHandle(long ptr ptr long)
-@ stub CryptCATAdminEnumCatalogFromHash
+@ stdcall CryptCATAdminEnumCatalogFromHash(long ptr long long ptr)
@ stub CryptCATAdminPauseServiceForBackup
@ stub CryptCATAdminReleaseCatalogContext
@ stdcall CryptCATAdminReleaseContext(long long)
@@ -60,8 +60,8 @@
@ stub SoftpubCheckCert
@ stub SoftpubCleanup
@ stub SoftpubDefCertInit
-@ stub SoftpubDllRegisterServer
-@ stub SoftpubDllUnregisterServer
+@ stdcall SoftpubDllRegisterServer()
+@ stdcall SoftpubDllUnregisterServer()
@ stub SoftpubDumpStructure
@ stub SoftpubFreeDefUsageCallData
@ stub SoftpubInitialize
@@ -71,7 +71,7 @@
@ stub TrustDecode
@ stub TrustFindIssuerCertificate
@ stub TrustFreeDecode
-@ stub TrustIsCertificateSelfSigned
+@ stdcall TrustIsCertificateSelfSigned(ptr)
@ stub TrustOpenStores
@ stub WTHelperCertFindIssuerCertificate
@ stub WTHelperCertIsSelfSigned
@@ -115,10 +115,10 @@
@ stub WintrustCertificateTrust
@ stub WintrustGetDefaultForUsage
@ stdcall WintrustGetRegPolicyFlags(ptr)
-@ stub WintrustLoadFunctionPointers
-@ stub WintrustRemoveActionID
+@ stdcall WintrustLoadFunctionPointers(ptr ptr)
+@ stdcall WintrustRemoveActionID(ptr)
@ stdcall WintrustSetRegPolicyFlags(long)
-@ stub mscat32DllRegisterServer
-@ stub mscat32DllUnregisterServer
-@ stub mssip32DllRegisterServer
-@ stub mssip32DllUnregisterServer
+@ stdcall mscat32DllRegisterServer()
+@ stdcall mscat32DllUnregisterServer()
+@ stdcall mssip32DllRegisterServer()
+@ stdcall mssip32DllUnregisterServer()
Modified: trunk/reactos/dll/win32/wintrust/wintrust_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/wintrus…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/wintrust_main.c (original)
+++ trunk/reactos/dll/win32/wintrust/wintrust_main.c Sat Sep 2 10:27:09 2006
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
@@ -25,6 +25,7 @@
#include "winerror.h"
#include "guiddef.h"
#include "wintrust.h"
+#include "softpub.h"
#include "mscat.h"
#include "objbase.h"
@@ -32,8 +33,37 @@
WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
+
+/***********************************************************************
+ * DllMain (WINTRUST.@)
+ */
+BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls( inst );
+ break;
+ }
+ return TRUE;
+}
+
/***********************************************************************
* CryptCATAdminAcquireContext (WINTRUST.@)
+ *
+ * Get a catalog administrator context handle.
+ *
+ * PARAMS
+ * catAdmin [O] Pointer to the context handle.
+ * sysSystem [I] Pointer to a GUID for the needed subsystem.
+ * dwFlags [I] Reserved.
+ *
+ * RETURNS
+ * Success: TRUE. catAdmin contains the context handle.
+ * Failure: FAIL.
+ *
*/
BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN* catAdmin,
const GUID *sysSystem, DWORD dwFlags )
@@ -55,7 +85,32 @@
}
/***********************************************************************
+ * CryptCATAdminEnumCatalogFromHash (WINTRUST.@)
+ */
+HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin,
+ BYTE* pbHash,
+ DWORD cbHash,
+ DWORD dwFlags,
+ HCATINFO* phPrevCatInfo )
+{
+ FIXME("%p %p %ld %ld %p\n", hCatAdmin, pbHash, cbHash, dwFlags,
phPrevCatInfo);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return NULL;
+}
+
+/***********************************************************************
* CryptCATAdminReleaseContext (WINTRUST.@)
+ *
+ * Release a catalog administrator context handle.
+ *
+ * PARAMS
+ * catAdmin [I] Pointer to the context handle.
+ * dwFlags [I] Reserved.
+ *
+ * RETURNS
+ * Success: TRUE.
+ * Failure: FAIL.
+ *
*/
BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN hCatAdmin, DWORD dwFlags )
{
@@ -65,12 +120,39 @@
}
/***********************************************************************
+ * TrustIsCertificateSelfSigned (WINTRUST.@)
+ */
+BOOL WINAPI TrustIsCertificateSelfSigned( PCCERT_CONTEXT cert )
+{
+ BOOL ret;
+
+ TRACE("%p\n", cert);
+ ret = CertCompareCertificateName(cert->dwCertEncodingType,
+ &cert->pCertInfo->Subject, &cert->pCertInfo->Issuer);
+ return ret;
+}
+
+/***********************************************************************
* WinVerifyTrust (WINTRUST.@)
+ *
+ * Verifies an object by calling the specified trust provider.
+ *
+ * PARAMS
+ * hwnd [I] Handle to a caller window.
+ * ActionID [I] Pointer to a GUID that identifies the action to perform.
+ * ActionData [I] Information used by the trust provider to verify the object.
+ *
+ * RETURNS
+ * Success: Zero.
+ * Failure: A TRUST_E_* error code.
+ *
+ * NOTES
+ * Trust providers can be found at:
+ * HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\
*/
LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, WINTRUST_DATA* ActionData )
{
- static const GUID WINTRUST_ACTION_GENERIC_VERIFY_V2 = { 0xaac56b, 0xcd44, 0x11d0,
- {
0x8c,0xc2,0x00,0xc0,0x4f,0xc2,0x95,0xee }};
+ static const GUID gen_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2;
FIXME("%p %s %p\n", hwnd, debugstr_guid(ActionID), ActionData);
@@ -87,7 +169,7 @@
*
*/
- if (IsEqualCLSID(ActionID, &WINTRUST_ACTION_GENERIC_VERIFY_V2))
+ if (IsEqualCLSID(ActionID, &gen_verify_v2))
return TRUST_E_PROVIDER_UNKNOWN;
return ERROR_SUCCESS;
@@ -125,12 +207,12 @@
}
/***********************************************************************
- * WintrustAddActionID (WINTRUST.@)
- */
-BOOL WINAPI WintrustAddActionID( GUID* pgActionID, DWORD fdwFlags,
- CRYPT_REGISTER_ACTIONID* psProvInfo)
-{
- FIXME("%p %lx %p\n", pgActionID, fdwFlags, psProvInfo);
+ * WintrustLoadFunctionPointers (WINTRUST.@)
+ */
+BOOL WINAPI WintrustLoadFunctionPointers( GUID* pgActionID,
+ CRYPT_PROVIDER_FUNCTIONS* pPfns )
+{
+ FIXME("%s %p\n", debugstr_guid(pgActionID), pPfns);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@@ -152,21 +234,3 @@
FIXME("stub: %lx\n", dwPolicyFlags);
return TRUE;
}
-
-/***********************************************************************
- * DllRegisterServer (WINTRUST.@)
- */
-HRESULT WINAPI DllRegisterServer(void)
-{
- FIXME("stub\n");
- return S_OK;
-}
-
-/***********************************************************************
- * DllUnregisterServer (WINTRUST.@)
- */
-HRESULT WINAPI DllUnregisterServer(void)
-{
- FIXME("stub\n");
- return S_OK;
-}
Added: trunk/reactos/dll/win32/wintrust/wintrust_ros.diff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/wintrus…
==============================================================================
--- trunk/reactos/dll/win32/wintrust/wintrust_ros.diff (added)
+++ trunk/reactos/dll/win32/wintrust/wintrust_ros.diff Sat Sep 2 10:27:09 2006
@@ -1,0 +1,31 @@
+Index: wintrust_main.c
+===================================================================
+--- wintrust_main.c (revision 23867)
++++ wintrust_main.c (working copy)
+@@ -152,7 +152,26 @@
+ */
+ LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, WINTRUST_DATA* ActionData )
+ {
++ static const GUID gen_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2;
++
+ FIXME("%p %s %p\n", hwnd, debugstr_guid(ActionID), ActionData);
++
++ /* Trust providers can be found at:
++ * HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\CertCheck\
++ *
++ * Process Explorer expects a correct implementation, so we
++ * return TRUST_E_PROVIDER_UNKNOWN.
++ *
++ * Girotel needs ERROR_SUCCESS.
++ *
++ * For now return TRUST_E_PROVIDER_UNKNOWN only when
++ * ActionID = WINTRUST_ACTION_GENERIC_VERIFY_V2.
++ *
++ */
++
++ if (IsEqualCLSID(ActionID, &gen_verify_v2))
++ return TRUST_E_PROVIDER_UNKNOWN;
++
+ return ERROR_SUCCESS;
+ }
+
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE (original)
+++ trunk/reactos/media/doc/README.WINE Sat Sep 2 10:27:09 2006
@@ -80,7 +80,7 @@
reactos/dll/win32/uxtheme # Autosync
reactos/dll/win32/version # Synced at 20060509
reactos/dll/win32/wininet # Synced to Wine-0_9_10
-reactos/dll/win32/wintrust # Synced to Wine-0_9_10
+reactos/dll/win32/wintrust # Autosync
reactos/dll/win32/winmm # Forked at Wine-20050628
reactos/dll/win32/winmm/midimap # Forked at Wine-20050628
reactos/dll/win32/winmm/wavemap # Forked at Wine-20050628