ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2007
----- 2025 -----
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
380 discussions
Start a n
N
ew thread
[jimtabor] 26523: Pluggin NtGdiArcInternal and NtGdiPolyPolyDraw
by jimtabor@svn.reactos.org
Author: jimtabor Date: Thu Apr 26 18:53:36 2007 New Revision: 26523 URL:
http://svn.reactos.org/svn/reactos?rev=26523&view=rev
Log: Pluggin NtGdiArcInternal and NtGdiPolyPolyDraw Modified: trunk/reactos/dll/win32/gdi32/objects/region.c trunk/reactos/subsystems/win32/win32k/win32k.rbuild trunk/reactos/tools/nci/w32ksvc.db Modified: trunk/reactos/dll/win32/gdi32/objects/region.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/re…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/region.c (original) +++ trunk/reactos/dll/win32/gdi32/objects/region.c Thu Apr 26 18:53:36 2007 @@ -37,13 +37,11 @@ int inPolygons, int Mode) { -/* return (HRGN) NtGdiPolyPolyDraw( (HDC) Mode, + return (HRGN) NtGdiPolyPolyDraw( (HDC) Mode, (PPOINT) Point, (PULONG) Count, (ULONG) inPolygons, GdiPolyPolyRgn ); -*/ - return (HRGN) NULL; } Modified: trunk/reactos/subsystems/win32/win32k/win32k.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/wi…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/win32k.rbuild (original) +++ trunk/reactos/subsystems/win32/win32k/win32k.rbuild Thu Apr 26 18:53:36 2007 @@ -144,6 +144,7 @@ </directory> <directory name="objects"> <compilationunit name="objects.c"> + <file>arc.c</file> <file>bezier.c</file> <file>bitmaps.c</file> <file>brush.c</file> Modified: trunk/reactos/tools/nci/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/nci/w32ksvc.db?rev=2…
============================================================================== --- trunk/reactos/tools/nci/w32ksvc.db (original) +++ trunk/reactos/tools/nci/w32ksvc.db Thu Apr 26 18:53:36 2007 @@ -6,6 +6,7 @@ NtGdiAngleArc 6 NtGdiAnimatePalette 4 NtGdiArc 9 +NtGdiArcInternal 10 NtGdiArcTo 9 NtGdiBeginPath 1 NtGdiBitBlt 11 @@ -197,6 +198,7 @@ NtGdiPolyline 3 NtGdiPolylineTo 3 NtGdiPolyPatBlt 5 +NtGdiPolyPolyDraw 5 NtGdiPolyPolyline 4 NtGdiPolyTextOut 3 NtGdiPolygon 3
17 years, 9 months
1
0
0
0
[jimtabor] 26522: Start NtGdiPolyPolyDraw stub.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Thu Apr 26 18:42:22 2007 New Revision: 26522 URL:
http://svn.reactos.org/svn/reactos?rev=26522&view=rev
Log: Start NtGdiPolyPolyDraw stub. Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c Thu Apr 26 18:42:22 2007 @@ -998,6 +998,19 @@ return Ret; } + +ULONG_PTR +STDCALL +NtGdiPolyPolyDraw( IN HDC hdc, + IN PPOINT ppt, + IN PULONG pcpt, + IN ULONG ccpt, + IN INT iFunc ) +{ + return (ULONG_PTR) 0; +} + + BOOL FASTCALL IntRectangle(PDC dc,
17 years, 9 months
1
0
0
0
[hpoussin] 26521: Add some missing const
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Apr 26 18:02:59 2007 New Revision: 26521 URL:
http://svn.reactos.org/svn/reactos?rev=26521&view=rev
Log: Add some missing const Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c trunk/reactos/dll/win32/advapi32/crypt/crypt.h Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/crypt/c…
============================================================================== --- trunk/reactos/dll/win32/advapi32/crypt/crypt.c (original) +++ trunk/reactos/dll/win32/advapi32/crypt/crypt.c Thu Apr 26 18:02:59 2007 @@ -1553,7 +1553,7 @@ * Success: TRUE * Failure: FALSE */ -BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, BYTE *pbData, DWORD dwDataLen, +BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLen, HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY *phKey) { PCRYPTPROV prov = (PCRYPTPROV)hProv; @@ -1650,7 +1650,7 @@ * Success: TRUE * Failure: FALSE */ -BOOL WINAPI CryptSetHashParam (HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData, DWORD dwFlags) +BOOL WINAPI CryptSetHashParam (HCRYPTHASH hHash, DWORD dwParam, CONST BYTE *pbData, DWORD dwFlags) { PCRYPTPROV prov; PCRYPTHASH hash = (PCRYPTHASH)hHash; @@ -1680,7 +1680,7 @@ * Success: TRUE * Failure: FALSE */ -BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, DWORD dwFlags) +BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, CONST BYTE *pbData, DWORD dwFlags) { PCRYPTPROV prov; PCRYPTKEY key = (PCRYPTKEY)hKey; @@ -1834,7 +1834,7 @@ * Success: TRUE * Failure: FALSE */ -BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData, DWORD dwFlags) +BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, CONST BYTE *pbData, DWORD dwFlags) { PCRYPTPROV prov = (PCRYPTPROV)hProv; @@ -1888,7 +1888,7 @@ * Success: TRUE * Failure: FALSE */ -BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, BYTE *pbSignature, DWORD dwSigLen, +BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, CONST BYTE *pbSignature, DWORD dwSigLen, HCRYPTKEY hPubKey, LPCSTR sDescription, DWORD dwFlags) { PCRYPTHASH hash = (PCRYPTHASH)hHash; @@ -1914,7 +1914,7 @@ BOOL WINAPI CryptVerifySignatureW (HCRYPTHASH hHash, - BYTE *pbSignature, + CONST BYTE *pbSignature, DWORD dwSigLen, HCRYPTKEY hPubKey, LPCWSTR sDescription, Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/crypt/c…
============================================================================== --- trunk/reactos/dll/win32/advapi32/crypt/crypt.h (original) +++ trunk/reactos/dll/win32/advapi32/crypt/crypt.h Thu Apr 26 18:02:59 2007 @@ -49,9 +49,9 @@ BOOL (WINAPI *pCPHashSessionKey)(HCRYPTPROV hProv, HCRYPTHASH hHash, HCRYPTKEY hKey, DWORD dwFlags); BOOL (WINAPI *pCPImportKey)(HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLen, HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY *phKey); BOOL (WINAPI *pCPReleaseContext)(HCRYPTPROV hProv, DWORD dwFlags); - BOOL (WINAPI *pCPSetHashParam)(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData, DWORD dwFlags); - BOOL (WINAPI *pCPSetKeyParam)(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, DWORD dwFlags); - BOOL (WINAPI *pCPSetProvParam)(HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData, DWORD dwFlags); + BOOL (WINAPI *pCPSetHashParam)(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwParam, CONST BYTE *pbData, DWORD dwFlags); + BOOL (WINAPI *pCPSetKeyParam)(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam, CONST BYTE *pbData, DWORD dwFlags); + BOOL (WINAPI *pCPSetProvParam)(HCRYPTPROV hProv, DWORD dwParam, CONST BYTE *pbData, DWORD dwFlags); BOOL (WINAPI *pCPSignHash)(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescription, DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen); BOOL (WINAPI *pCPVerifySignature)(HCRYPTPROV hProv, HCRYPTHASH hHash, CONST BYTE *pbSignature, DWORD dwSigLen, HCRYPTKEY hPubKey, LPCWSTR sDescription, DWORD dwFlags); } PROVFUNCS, *PPROVFUNCS;
17 years, 9 months
1
0
0
0
[winesync] 26520: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Apr 26 17:38:13 2007 New Revision: 26520 URL:
http://svn.reactos.org/svn/reactos?rev=26520&view=rev
Log: Autosyncing with Wine HEAD Added: trunk/reactos/dll/win32/wintrust/crypt.c (with props) Modified: trunk/reactos/dll/win32/wintrust/register.c trunk/reactos/dll/win32/wintrust/wintrust.rbuild trunk/reactos/dll/win32/wintrust/wintrust.spec trunk/reactos/dll/win32/wintrust/wintrust_main.c trunk/reactos/dll/win32/wintrust/wintrust_ros.diff Added: trunk/reactos/dll/win32/wintrust/crypt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/crypt.c…
============================================================================== --- trunk/reactos/dll/win32/wintrust/crypt.c (added) +++ trunk/reactos/dll/win32/wintrust/crypt.c Thu Apr 26 17:38:13 2007 @@ -1,0 +1,207 @@ +/* + * WinTrust Cryptography functions + * + * Copyright 2006 James Hawkins + * + * 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 "wintrust.h" +#include "mscat.h" +#include "mssip.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(wintrust); + +/*********************************************************************** + * 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: FALSE. + * + */ +BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN* catAdmin, + const GUID *sysSystem, DWORD dwFlags ) +{ + FIXME("%p %s %x\n", catAdmin, debugstr_guid(sysSystem), dwFlags); + + if (catAdmin) *catAdmin = (HCATADMIN)0xdeadbeef; + return TRUE; +} + +/*********************************************************************** + * CryptCATAdminCalcHashFromFileHandle (WINTRUST.@) + */ +BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE hFile, DWORD* pcbHash, + BYTE* pbHash, DWORD dwFlags ) +{ + FIXME("%p %p %p %x\n", hFile, pcbHash, pbHash, dwFlags); + + if (pbHash && pcbHash) memset(pbHash, 0, *pcbHash); + return TRUE; +} + +/*********************************************************************** + * CryptCATAdminEnumCatalogFromHash (WINTRUST.@) + */ +HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, + BYTE* pbHash, + DWORD cbHash, + DWORD dwFlags, + HCATINFO* phPrevCatInfo ) +{ + FIXME("%p %p %d %d %p\n", hCatAdmin, pbHash, cbHash, dwFlags, phPrevCatInfo); + return NULL; +} + +/*********************************************************************** + * CryptCATAdminReleaseContext (WINTRUST.@) + * + * Release a catalog administrator context handle. + * + * PARAMS + * catAdmin [I] Context handle. + * dwFlags [I] Reserved. + * + * RETURNS + * Success: TRUE. + * Failure: FAIL. + * + */ +BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN hCatAdmin, DWORD dwFlags ) +{ + FIXME("%p %x\n", hCatAdmin, dwFlags); + return TRUE; +} + +/*********************************************************************** + * CryptCATAdminRemoveCatalog (WINTRUST.@) + * + * Remove a catalog file. + * + * PARAMS + * catAdmin [I] Context handle. + * pwszCatalogFile [I] Catalog file. + * dwFlags [I] Reserved. + * + * RETURNS + * Success: TRUE. + * Failure: FALSE. + * + */ +BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN hCatAdmin, LPCWSTR pwszCatalogFile, DWORD dwFlags) +{ + FIXME("%p %s %x\n", hCatAdmin, debugstr_w(pwszCatalogFile), dwFlags); + return DeleteFileW(pwszCatalogFile); +} + +/*********************************************************************** + * CryptCATClose (WINTRUST.@) + */ +BOOL WINAPI CryptCATClose(HANDLE hCatalog) +{ + FIXME("(%p) stub\n", hCatalog); + return TRUE; +} + +/*********************************************************************** + * CryptCATEnumerateMember (WINTRUST.@) + */ +CRYPTCATMEMBER *WINAPI CryptCATEnumerateMember(HANDLE hCatalog, CRYPTCATMEMBER* pPrevMember) +{ + FIXME("(%p, %p) stub\n", hCatalog, pPrevMember); + return NULL; +} + +/*********************************************************************** + * CryptCATOpen (WINTRUST.@) + */ +HANDLE WINAPI CryptCATOpen(LPWSTR pwszFileName, DWORD fdwOpenFlags, HCRYPTPROV hProv, + DWORD dwPublicVersion, DWORD dwEncodingType) +{ + FIXME("(%s, %d, %ld, %d, %d) stub\n", debugstr_w(pwszFileName), fdwOpenFlags, + hProv, dwPublicVersion, dwEncodingType); + return 0; +} + +/*********************************************************************** + * CryptSIPCreateIndirectData (WINTRUST.@) + */ +BOOL WINAPI CryptSIPCreateIndirectData(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pcbIndirectData, + SIP_INDIRECT_DATA* pIndirectData) +{ + FIXME("(%p %p %p) stub\n", pSubjectInfo, pcbIndirectData, pIndirectData); + + return FALSE; +} + +/*********************************************************************** + * CryptSIPGetSignedDataMsg (WINTRUST.@) + */ +BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pdwEncodingType, + DWORD dwIndex, DWORD* pcbSignedDataMsg, BYTE* pbSignedDataMsg) +{ + FIXME("(%p %p %d %p %p) stub\n", pSubjectInfo, pdwEncodingType, dwIndex, + pcbSignedDataMsg, pbSignedDataMsg); + + return FALSE; +} + +/*********************************************************************** + * CryptSIPPutSignedDataMsg (WINTRUST.@) + */ +BOOL WINAPI CryptSIPPutSignedDataMsg(SIP_SUBJECTINFO* pSubjectInfo, DWORD pdwEncodingType, + DWORD* pdwIndex, DWORD cbSignedDataMsg, BYTE* pbSignedDataMsg) +{ + FIXME("(%p %d %p %d %p) stub\n", pSubjectInfo, pdwEncodingType, pdwIndex, + cbSignedDataMsg, pbSignedDataMsg); + + return FALSE; +} + +/*********************************************************************** + * CryptSIPRemoveSignedDataMsg (WINTRUST.@) + */ +BOOL WINAPI CryptSIPRemoveSignedDataMsg(SIP_SUBJECTINFO* pSubjectInfo, + DWORD dwIndex) +{ + FIXME("(%p %d) stub\n", pSubjectInfo, dwIndex); + + return FALSE; +} + +/*********************************************************************** + * CryptSIPVerifyIndirectData (WINTRUST.@) + */ +BOOL WINAPI CryptSIPVerifyIndirectData(SIP_SUBJECTINFO* pSubjectInfo, + SIP_INDIRECT_DATA* pIndirectData) +{ + FIXME("(%p %p) stub\n", pSubjectInfo, pIndirectData); + + return FALSE; +} Propchange: trunk/reactos/dll/win32/wintrust/crypt.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: 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 (original) +++ trunk/reactos/dll/win32/wintrust/register.c Thu Apr 26 17:38:13 2007 @@ -23,104 +23,1063 @@ #include "windef.h" #include "winbase.h" #include "winerror.h" +#include "winuser.h" +#include "winreg.h" +#include "winnls.h" #include "guiddef.h" #include "wintrust.h" #include "softpub.h" +#include "mssip.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wintrust); +static CRYPT_TRUST_REG_ENTRY SoftpubInitialization; +static CRYPT_TRUST_REG_ENTRY SoftpubMessage; +static CRYPT_TRUST_REG_ENTRY SoftpubSignature; +static CRYPT_TRUST_REG_ENTRY SoftpubCertficate; +static CRYPT_TRUST_REG_ENTRY SoftpubCertCheck; +static CRYPT_TRUST_REG_ENTRY SoftpubFinalPolicy; +static CRYPT_TRUST_REG_ENTRY SoftpubCleanup; + +static CRYPT_TRUST_REG_ENTRY SoftpubDefCertInit; + +static CRYPT_TRUST_REG_ENTRY SoftpubDumpStructure; + +static CRYPT_TRUST_REG_ENTRY HTTPSCertificateTrust; +static CRYPT_TRUST_REG_ENTRY HTTPSFinalProv; + +static CRYPT_TRUST_REG_ENTRY OfficeInitializePolicy; +static CRYPT_TRUST_REG_ENTRY OfficeCleanupPolicy; + +static CRYPT_TRUST_REG_ENTRY DriverInitializePolicy; +static CRYPT_TRUST_REG_ENTRY DriverFinalPolicy; +static CRYPT_TRUST_REG_ENTRY DriverCleanupPolicy; + +static CRYPT_TRUST_REG_ENTRY GenericChainCertificateTrust; +static CRYPT_TRUST_REG_ENTRY GenericChainFinalProv; + +static const WCHAR Trust[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'C','r','y','p','t','o','g','r','a','p','h','y','\\', + 'P','r','o','v','i','d','e','r','s','\\', + 'T','r','u','s','t','\\', 0 }; + +static const WCHAR Initialization[] = {'I','n','i','t','i','a','l','i','z','a','t','i','o','n','\\', 0}; +static const WCHAR Message[] = {'M','e','s','s','a','g','e','\\', 0}; +static const WCHAR Signature[] = {'S','i','g','n','a','t','u','r','e','\\', 0}; +static const WCHAR Certificate[] = {'C','e','r','t','i','f','i','c','a','t','e','\\', 0}; +static const WCHAR CertCheck[] = {'C','e','r','t','C','h','e','c','k','\\', 0}; +static const WCHAR FinalPolicy[] = {'F','i','n','a','l','P','o','l','i','c','y','\\', 0}; +static const WCHAR DiagnosticPolicy[] = {'D','i','a','g','n','o','s','t','i','c','P','o','l','i','c','y','\\', 0}; +static const WCHAR Cleanup[] = {'C','l','e','a','n','u','p','\\', 0}; + +static const WCHAR DefaultId[] = {'D','e','f','a','u','l','t','I','d', 0}; +static const WCHAR Dll[] = {'$','D','L','L', 0}; + +/*********************************************************************** + * WINTRUST_InitRegStructs + * + * Helper function to allocate and initialize the members of the + * CRYPT_TRUST_REG_ENTRY structs. + */ +static void WINTRUST_InitRegStructs(void) +{ +#define WINTRUST_INITREGENTRY( action, dllname, functionname ) \ + action.cbStruct = sizeof(CRYPT_TRUST_REG_ENTRY); \ + action.pwszDLLName = HeapAlloc(GetProcessHeap(), 0, sizeof(dllname)); \ + lstrcpyW(action.pwszDLLName, dllname); \ + action.pwszFunctionName = HeapAlloc(GetProcessHeap(), 0, sizeof(functionname)); \ + lstrcpyW(action.pwszFunctionName, functionname); + + WINTRUST_INITREGENTRY(SoftpubInitialization, SP_POLICY_PROVIDER_DLL_NAME, SP_INIT_FUNCTION) + WINTRUST_INITREGENTRY(SoftpubMessage, SP_POLICY_PROVIDER_DLL_NAME, SP_OBJTRUST_FUNCTION) + WINTRUST_INITREGENTRY(SoftpubSignature, SP_POLICY_PROVIDER_DLL_NAME, SP_SIGTRUST_FUNCTION) + WINTRUST_INITREGENTRY(SoftpubCertficate, SP_POLICY_PROVIDER_DLL_NAME, WT_PROVIDER_CERTTRUST_FUNCTION) + WINTRUST_INITREGENTRY(SoftpubCertCheck, SP_POLICY_PROVIDER_DLL_NAME, SP_CHKCERT_FUNCTION) + WINTRUST_INITREGENTRY(SoftpubFinalPolicy, SP_POLICY_PROVIDER_DLL_NAME, SP_FINALPOLICY_FUNCTION) + WINTRUST_INITREGENTRY(SoftpubCleanup, SP_POLICY_PROVIDER_DLL_NAME, SP_CLEANUPPOLICY_FUNCTION) + WINTRUST_INITREGENTRY(SoftpubDefCertInit, SP_POLICY_PROVIDER_DLL_NAME, SP_GENERIC_CERT_INIT_FUNCTION) + WINTRUST_INITREGENTRY(SoftpubDumpStructure, SP_POLICY_PROVIDER_DLL_NAME, SP_TESTDUMPPOLICY_FUNCTION_TEST) + WINTRUST_INITREGENTRY(HTTPSCertificateTrust, SP_POLICY_PROVIDER_DLL_NAME, HTTPS_CERTTRUST_FUNCTION) + WINTRUST_INITREGENTRY(HTTPSFinalProv, SP_POLICY_PROVIDER_DLL_NAME, HTTPS_FINALPOLICY_FUNCTION) + WINTRUST_INITREGENTRY(OfficeInitializePolicy, OFFICE_POLICY_PROVIDER_DLL_NAME, OFFICE_INITPROV_FUNCTION) + WINTRUST_INITREGENTRY(OfficeCleanupPolicy, OFFICE_POLICY_PROVIDER_DLL_NAME, OFFICE_CLEANUPPOLICY_FUNCTION) + WINTRUST_INITREGENTRY(DriverInitializePolicy, SP_POLICY_PROVIDER_DLL_NAME, DRIVER_INITPROV_FUNCTION) + WINTRUST_INITREGENTRY(DriverFinalPolicy, SP_POLICY_PROVIDER_DLL_NAME, DRIVER_FINALPOLPROV_FUNCTION) + WINTRUST_INITREGENTRY(DriverCleanupPolicy, SP_POLICY_PROVIDER_DLL_NAME, DRIVER_CLEANUPPOLICY_FUNCTION) + WINTRUST_INITREGENTRY(GenericChainCertificateTrust, SP_POLICY_PROVIDER_DLL_NAME, GENERIC_CHAIN_CERTTRUST_FUNCTION) + WINTRUST_INITREGENTRY(GenericChainFinalProv, SP_POLICY_PROVIDER_DLL_NAME, GENERIC_CHAIN_FINALPOLICY_FUNCTION) + +#undef WINTRUST_INITREGENTRY +} + +/*********************************************************************** + * WINTRUST_FreeRegStructs + * + * Helper function to free 2 members of the CRYPT_TRUST_REG_ENTRY + * structs. + */ +static void WINTRUST_FreeRegStructs(void) +{ +#define WINTRUST_FREEREGENTRY( action ) \ + HeapFree(GetProcessHeap(), 0, action.pwszDLLName); \ + HeapFree(GetProcessHeap(), 0, action.pwszFunctionName); + + WINTRUST_FREEREGENTRY(SoftpubInitialization); + WINTRUST_FREEREGENTRY(SoftpubMessage); + WINTRUST_FREEREGENTRY(SoftpubSignature); + WINTRUST_FREEREGENTRY(SoftpubCertficate); + WINTRUST_FREEREGENTRY(SoftpubCertCheck); + WINTRUST_FREEREGENTRY(SoftpubFinalPolicy); + WINTRUST_FREEREGENTRY(SoftpubCleanup); + WINTRUST_FREEREGENTRY(SoftpubDefCertInit); + WINTRUST_FREEREGENTRY(SoftpubDumpStructure); + WINTRUST_FREEREGENTRY(HTTPSCertificateTrust); + WINTRUST_FREEREGENTRY(HTTPSFinalProv); + WINTRUST_FREEREGENTRY(OfficeInitializePolicy); + WINTRUST_FREEREGENTRY(OfficeCleanupPolicy); + WINTRUST_FREEREGENTRY(DriverInitializePolicy); + WINTRUST_FREEREGENTRY(DriverFinalPolicy); + WINTRUST_FREEREGENTRY(DriverCleanupPolicy); + WINTRUST_FREEREGENTRY(GenericChainCertificateTrust); + WINTRUST_FREEREGENTRY(GenericChainFinalProv); + +#undef WINTRUST_FREEREGENTRY +} + +/*********************************************************************** + * WINTRUST_guid2wstr + * + * Create a wide-string from a GUID + * + */ +static void WINTRUST_Guid2Wstr(const GUID* pgActionID, WCHAR* GuidString) +{ + static const WCHAR wszFormat[] = {'{','%','0','8','l','X','-','%','0','4','X','-','%','0','4','X','-', + '%','0','2','X','%','0','2','X','-','%','0','2','X','%','0','2','X','%','0','2','X','%','0','2', + 'X','%','0','2','X','%','0','2','X','}', 0}; + + wsprintfW(GuidString, wszFormat, pgActionID->Data1, pgActionID->Data2, pgActionID->Data3, + pgActionID->Data4[0], pgActionID->Data4[1], pgActionID->Data4[2], pgActionID->Data4[3], + pgActionID->Data4[4], pgActionID->Data4[5], pgActionID->Data4[6], pgActionID->Data4[7]); +} + +/*********************************************************************** + * WINTRUST_WriteProviderToReg + * + * Helper function for WintrustAddActionID + * + */ +static LONG WINTRUST_WriteProviderToReg(WCHAR* GuidString, + const WCHAR* FunctionType, + CRYPT_TRUST_REG_ENTRY RegEntry) +{ + static const WCHAR Function[] = {'$','F','u','n','c','t','i','o','n', 0}; + WCHAR ProvKey[MAX_PATH]; + HKEY Key; + LONG Res = ERROR_SUCCESS; + + /* Create the needed key string */ + ProvKey[0]='\0'; + lstrcatW(ProvKey, Trust); + lstrcatW(ProvKey, FunctionType); + lstrcatW(ProvKey, GuidString); + + if (!RegEntry.pwszDLLName || !RegEntry.pwszFunctionName) + return ERROR_INVALID_PARAMETER; + + Res = RegCreateKeyExW(HKEY_LOCAL_MACHINE, ProvKey, 0, NULL, 0, KEY_WRITE, NULL, &Key, NULL); + if (Res != ERROR_SUCCESS) goto error_close_key; + + /* Create the $DLL entry */ + Res = RegSetValueExW(Key, Dll, 0, REG_SZ, (BYTE*)RegEntry.pwszDLLName, + (lstrlenW(RegEntry.pwszDLLName) + 1)*sizeof(WCHAR)); + if (Res != ERROR_SUCCESS) goto error_close_key; + + /* Create the $Function entry */ + Res = RegSetValueExW(Key, Function, 0, REG_SZ, (BYTE*)RegEntry.pwszFunctionName, + (lstrlenW(RegEntry.pwszFunctionName) + 1)*sizeof(WCHAR)); + +error_close_key: + RegCloseKey(Key); + + return Res; +} + /*********************************************************************** * WintrustAddActionID (WINTRUST.@) + * + * Add the definitions of the actions a Trust provider can perform to + * the registry. + * + * PARAMS + * pgActionID [I] Pointer to a GUID for the Trust provider. + * fdwFlags [I] Flag to indicate whether registry errors are passed on. + * psProvInfo [I] Pointer to a structure with information about DLL + * name and functions. + * + * RETURNS + * Success: TRUE. + * Failure: FALSE. (Use GetLastError() for more information) + * + * NOTES + * Adding definitions is basically only adding relevant information + * to the registry. No verification takes place whether a DLL or it's + * entrypoints exist. + * Information in the registry will always be overwritten. + * */ 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; + WCHAR GuidString[39]; + LONG Res; + LONG WriteActionError = ERROR_SUCCESS; + + TRACE("%s %x %p\n", debugstr_guid(pgActionID), fdwFlags, psProvInfo); + + /* Some sanity checks. + * We use the W2K3 last error as it makes more sense (W2K leaves the last error + * as is). + */ + if (!pgActionID || + !psProvInfo || + (psProvInfo->cbStruct != sizeof(CRYPT_REGISTER_ACTIONID))) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + /* Create this string only once, instead of in the helper function */ + WINTRUST_Guid2Wstr( pgActionID, GuidString); + + /* Write the information to the registry */ + Res = WINTRUST_WriteProviderToReg(GuidString, Initialization , psProvInfo->sInitProvider); + if (Res != ERROR_SUCCESS) WriteActionError = Res; + Res = WINTRUST_WriteProviderToReg(GuidString, Message , psProvInfo->sObjectProvider); + if (Res != ERROR_SUCCESS) WriteActionError = Res; + Res = WINTRUST_WriteProviderToReg(GuidString, Signature , psProvInfo->sSignatureProvider); + if (Res != ERROR_SUCCESS) WriteActionError = Res; + Res = WINTRUST_WriteProviderToReg(GuidString, Certificate , psProvInfo->sCertificateProvider); + if (Res != ERROR_SUCCESS) WriteActionError = Res; + Res = WINTRUST_WriteProviderToReg(GuidString, CertCheck , psProvInfo->sCertificatePolicyProvider); + if (Res != ERROR_SUCCESS) WriteActionError = Res; + Res = WINTRUST_WriteProviderToReg(GuidString, FinalPolicy , psProvInfo->sFinalPolicyProvider); + if (Res != ERROR_SUCCESS) WriteActionError = Res; + Res = WINTRUST_WriteProviderToReg(GuidString, DiagnosticPolicy, psProvInfo->sTestPolicyProvider); + if (Res != ERROR_SUCCESS) WriteActionError = Res; + Res = WINTRUST_WriteProviderToReg(GuidString, Cleanup , psProvInfo->sCleanupProvider); + if (Res != ERROR_SUCCESS) WriteActionError = Res; + + /* Testing (by restricting access to the registry for some keys) shows that the last failing function + * will be used for last error. + * If the flag WT_ADD_ACTION_ID_RET_RESULT_FLAG is set and there are errors when adding the action + * we have to return FALSE. Errors includes both invalid entries as well as registry errors. + * Testing also showed that one error doesn't stop the registry writes. Every action will be dealt with. + */ + + if (WriteActionError != ERROR_SUCCESS) + { + SetLastError(WriteActionError); + + if (fdwFlags == WT_ADD_ACTION_ID_RET_RESULT_FLAG) + return FALSE; + } + + return TRUE; +} + +/*********************************************************************** + * WINTRUST_RemoveProviderFromReg + * + * Helper function for WintrustRemoveActionID + * + */ +static void WINTRUST_RemoveProviderFromReg(WCHAR* GuidString, + const WCHAR* FunctionType) +{ + WCHAR ProvKey[MAX_PATH]; + + /* Create the needed key string */ + ProvKey[0]='\0'; + lstrcatW(ProvKey, Trust); + lstrcatW(ProvKey, FunctionType); + lstrcatW(ProvKey, GuidString); + + /* We don't care about success or failure */ + RegDeleteKeyW(HKEY_LOCAL_MACHINE, ProvKey); } /*********************************************************************** * WintrustRemoveActionID (WINTRUST.@) + * + * Remove the definitions of the actions a Trust provider can perform + * from the registry. + * + * PARAMS + * pgActionID [I] Pointer to a GUID for the Trust provider. + * + * RETURNS + * Success: TRUE. (Use GetLastError() for more information) + * Failure: FALSE. (Use GetLastError() for more information) + * + * NOTES + * Testing shows that WintrustRemoveActionID always returns TRUE and + * that a possible error should be retrieved via GetLastError(). + * There are no checks if the definitions are in the registry. */ BOOL WINAPI WintrustRemoveActionID( GUID* pgActionID ) { - FIXME("(%s)\n", debugstr_guid(pgActionID)); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + WCHAR GuidString[39]; + + TRACE("(%s)\n", debugstr_guid(pgActionID)); + + if (!pgActionID) + { + SetLastError(ERROR_INVALID_PARAMETER); + return TRUE; + } + + /* Create this string only once, instead of in the helper function */ + WINTRUST_Guid2Wstr( pgActionID, GuidString); + + /* We don't care about success or failure */ + WINTRUST_RemoveProviderFromReg(GuidString, Initialization); + WINTRUST_RemoveProviderFromReg(GuidString, Message); + WINTRUST_RemoveProviderFromReg(GuidString, Signature); + WINTRUST_RemoveProviderFromReg(GuidString, Certificate); + WINTRUST_RemoveProviderFromReg(GuidString, CertCheck); + WINTRUST_RemoveProviderFromReg(GuidString, FinalPolicy); + WINTRUST_RemoveProviderFromReg(GuidString, DiagnosticPolicy); + WINTRUST_RemoveProviderFromReg(GuidString, Cleanup); + + return TRUE; +} + +/*********************************************************************** + * WINTRUST_WriteSingleUsageEntry + * + * Helper for WintrustAddDefaultForUsage, writes a single value and its + * data to: + * + * HKLM\Software\Microsoft\Cryptography\Trust\Usages\<OID> + */ +static LONG WINTRUST_WriteSingleUsageEntry(LPCSTR OID, + const WCHAR* Value, + WCHAR* Data) +{ + static const WCHAR Usages[] = {'U','s','a','g','e','s','\\', 0}; + WCHAR* UsageKey; + HKEY Key; + LONG Res = ERROR_SUCCESS; + WCHAR* OIDW; + DWORD Len; + + /* Turn OID into a wide-character string */ + Len = MultiByteToWideChar( CP_ACP, 0, OID, -1, NULL, 0 ); + OIDW = HeapAlloc( GetProcessHeap(), 0, Len * sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, OID, -1, OIDW, Len ); + + /* Allocate the needed space for UsageKey */ + UsageKey = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(Trust) + lstrlenW(Usages) + Len) * sizeof(WCHAR)); + /* Create the key string */ + lstrcpyW(UsageKey, Trust); + lstrcatW(UsageKey, Usages); + lstrcatW(UsageKey, OIDW); + + Res = RegCreateKeyExW(HKEY_LOCAL_MACHINE, UsageKey, 0, NULL, 0, KEY_WRITE, NULL, &Key, NULL); + if (Res == ERROR_SUCCESS) + { + /* Create the Value entry */ + Res = RegSetValueExW(Key, Value, 0, REG_SZ, (BYTE*)Data, + (lstrlenW(Data) + 1)*sizeof(WCHAR)); + } + RegCloseKey(Key); + + HeapFree(GetProcessHeap(), 0, OIDW); + HeapFree(GetProcessHeap(), 0, UsageKey); + + return Res; +} + +/*************************************************************************** + * WINTRUST_RegisterGenVerifyV2 + * + * Register WINTRUST_ACTION_GENERIC_VERIFY_V2 actions and usages. + * + * NOTES + * WINTRUST_ACTION_GENERIC_VERIFY_V2 ({00AAC56B-CD44-11D0-8CC2-00C04FC295EE} + * is defined in softpub.h + */ +static BOOL WINTRUST_RegisterGenVerifyV2(void) +{ + BOOL RegisteredOK = TRUE; + static GUID ProvGUID = WINTRUST_ACTION_GENERIC_VERIFY_V2; + CRYPT_REGISTER_ACTIONID ProvInfo = { sizeof(CRYPT_REGISTER_ACTIONID), + SoftpubInitialization, + SoftpubMessage, + SoftpubSignature, + SoftpubCertficate, + SoftpubCertCheck, + SoftpubFinalPolicy, + { 0, NULL, NULL }, /* No diagnostic policy */ + SoftpubCleanup }; + CRYPT_PROVIDER_REGDEFUSAGE DefUsage = { sizeof(CRYPT_PROVIDER_REGDEFUSAGE), + &ProvGUID, + NULL, /* No Dll provided */ + NULL, /* No load callback function */ + NULL }; /* No free callback function */ + + if (!WintrustAddDefaultForUsage(szOID_PKIX_KP_CODE_SIGNING, &DefUsage)) + RegisteredOK = FALSE; + + if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo)) + RegisteredOK = FALSE; + + return RegisteredOK; +} + +/*************************************************************************** + * WINTRUST_RegisterPublishedSoftware + * + * Register WIN_SPUB_ACTION_PUBLISHED_SOFTWARE actions and usages. + * + * NOTES + * WIN_SPUB_ACTION_PUBLISHED_SOFTWARE ({64B9D180-8DA2-11CF-8736-00AA00A485EB}) + * is defined in wintrust.h + */ +static BOOL WINTRUST_RegisterPublishedSoftware(void) +{ + static GUID ProvGUID = WIN_SPUB_ACTION_PUBLISHED_SOFTWARE; + CRYPT_REGISTER_ACTIONID ProvInfo = { sizeof(CRYPT_REGISTER_ACTIONID), + SoftpubInitialization, + SoftpubMessage, + SoftpubSignature, + SoftpubCertficate, + SoftpubCertCheck, + SoftpubFinalPolicy, + { 0, NULL, NULL }, /* No diagnostic policy */ + SoftpubCleanup }; + + if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo)) + return FALSE; + + return TRUE; +} + +#define WIN_SPUB_ACTION_PUBLISHED_SOFTWARE_NOBADUI { 0xc6b2e8d0, 0xe005, 0x11cf, { 0xa1,0x34,0x00,0xc0,0x4f,0xd7,0xbf,0x43 }} + +/*************************************************************************** + * WINTRUST_RegisterPublishedSoftwareNoBadUi + * + * Register WIN_SPUB_ACTION_PUBLISHED_SOFTWARE_NOBADUI actions and usages. + * + * NOTES + * WIN_SPUB_ACTION_PUBLISHED_SOFTWARE_NOBADUI ({C6B2E8D0-E005-11CF-A134-00C04FD7BF43}) + * is not defined in any include file. (FIXME: Find out if the name is correct). + */ +static BOOL WINTRUST_RegisterPublishedSoftwareNoBadUi(void) +{ + static GUID ProvGUID = WIN_SPUB_ACTION_PUBLISHED_SOFTWARE_NOBADUI; + CRYPT_REGISTER_ACTIONID ProvInfo = { sizeof(CRYPT_REGISTER_ACTIONID), + SoftpubInitialization, + SoftpubMessage, + SoftpubSignature, + SoftpubCertficate, + SoftpubCertCheck, + SoftpubFinalPolicy, + { 0, NULL, NULL }, /* No diagnostic policy */ + SoftpubCleanup }; + + if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo)) + return FALSE; + + return TRUE; +} + +/*************************************************************************** + * WINTRUST_RegisterGenCertVerify + * + * Register WINTRUST_ACTION_GENERIC_CERT_VERIFY actions and usages. + * + * NOTES + * WINTRUST_ACTION_GENERIC_CERT_VERIFY ({189A3842-3041-11D1-85E1-00C04FC295EE}) + * is defined in softpub.h + */ +static BOOL WINTRUST_RegisterGenCertVerify(void) +{ + static GUID ProvGUID = WINTRUST_ACTION_GENERIC_CERT_VERIFY; + CRYPT_REGISTER_ACTIONID ProvInfo = { sizeof(CRYPT_REGISTER_ACTIONID), + SoftpubDefCertInit, + SoftpubMessage, + SoftpubSignature, + SoftpubCertficate, + SoftpubCertCheck, + SoftpubFinalPolicy, + { 0, NULL, NULL }, /* No diagnostic policy */ + SoftpubCleanup }; + + if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo)) + return FALSE; + + return TRUE; +} + +/*************************************************************************** + * WINTRUST_RegisterTrustProviderTest + * + * Register WINTRUST_ACTION_TRUSTPROVIDER_TEST actions and usages. + * + * NOTES + * WINTRUST_ACTION_TRUSTPROVIDER_TEST ({573E31F8-DDBA-11D0-8CCB-00C04FC295EE}) + * is defined in softpub.h + */ +static BOOL WINTRUST_RegisterTrustProviderTest(void) +{ + static GUID ProvGUID = WINTRUST_ACTION_TRUSTPROVIDER_TEST; + CRYPT_REGISTER_ACTIONID ProvInfo = { sizeof(CRYPT_REGISTER_ACTIONID), + SoftpubInitialization, + SoftpubMessage, + SoftpubSignature, + SoftpubCertficate, + SoftpubCertCheck, + SoftpubFinalPolicy, + SoftpubDumpStructure, + SoftpubCleanup }; + + if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo)) + return FALSE; + + return TRUE; +} + +/*************************************************************************** + * WINTRUST_RegisterHttpsProv + * + * Register HTTPSPROV_ACTION actions and usages. + * + * NOTES + * HTTPSPROV_ACTION ({573E31F8-AABA-11D0-8CCB-00C04FC295EE}) + * is defined in softpub.h + */ +static BOOL WINTRUST_RegisterHttpsProv(void) +{ + BOOL RegisteredOK = TRUE; + static CHAR SoftpubLoadUsage[] = "SoftpubLoadDefUsageCallData"; + static CHAR SoftpubFreeUsage[] = "SoftpubFreeDefUsageCallData"; + static GUID ProvGUID = HTTPSPROV_ACTION; + CRYPT_REGISTER_ACTIONID ProvInfo = { sizeof(CRYPT_REGISTER_ACTIONID), + SoftpubInitialization, + SoftpubMessage, + SoftpubSignature, + HTTPSCertificateTrust, + SoftpubCertCheck, + HTTPSFinalProv, + { 0, NULL, NULL }, /* No diagnostic policy */ + SoftpubCleanup }; + CRYPT_PROVIDER_REGDEFUSAGE DefUsage = { sizeof(CRYPT_PROVIDER_REGDEFUSAGE), + &ProvGUID, + NULL, /* Will be filled later */ + SoftpubLoadUsage, + SoftpubFreeUsage }; + + DefUsage.pwszDllName = HeapAlloc(GetProcessHeap(), 0, sizeof(SP_POLICY_PROVIDER_DLL_NAME)); + lstrcpyW(DefUsage.pwszDllName, SP_POLICY_PROVIDER_DLL_NAME); + + if (!WintrustAddDefaultForUsage(szOID_PKIX_KP_SERVER_AUTH, &DefUsage)) + RegisteredOK = FALSE; + if (!WintrustAddDefaultForUsage(szOID_PKIX_KP_CLIENT_AUTH, &DefUsage)) + RegisteredOK = FALSE; + if (!WintrustAddDefaultForUsage(szOID_SERVER_GATED_CRYPTO, &DefUsage)) + RegisteredOK = FALSE; + if (!WintrustAddDefaultForUsage(szOID_SGC_NETSCAPE, &DefUsage)) + RegisteredOK = FALSE; + + HeapFree(GetProcessHeap(), 0, DefUsage.pwszDllName); + + if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo)) + RegisteredOK = FALSE; + + return RegisteredOK; +} + +/*************************************************************************** + * WINTRUST_RegisterOfficeSignVerify + * + * Register OFFICESIGN_ACTION_VERIFY actions and usages. + * + * NOTES + * OFFICESIGN_ACTION_VERIFY ({5555C2CD-17FB-11D1-85C4-00C04FC295EE}) + * is defined in softpub.h + */ +static BOOL WINTRUST_RegisterOfficeSignVerify(void) +{ + static GUID ProvGUID = OFFICESIGN_ACTION_VERIFY; + CRYPT_REGISTER_ACTIONID ProvInfo = { sizeof(CRYPT_REGISTER_ACTIONID), + OfficeInitializePolicy, + SoftpubMessage, + SoftpubSignature, + SoftpubCertficate, + SoftpubCertCheck, + SoftpubFinalPolicy, + { 0, NULL, NULL }, /* No diagnostic policy */ + OfficeCleanupPolicy }; + + if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo)) + return FALSE; + + return TRUE; +} + +/*************************************************************************** + * WINTRUST_RegisterDriverVerify + * + * Register DRIVER_ACTION_VERIFY actions and usages. + * + * NOTES + * DRIVER_ACTION_VERIFY ({F750E6C3-38EE-11D1-85E5-00C04FC295EE}) + * is defined in softpub.h + */ +static BOOL WINTRUST_RegisterDriverVerify(void) +{ + static GUID ProvGUID = DRIVER_ACTION_VERIFY; + CRYPT_REGISTER_ACTIONID ProvInfo = { sizeof(CRYPT_REGISTER_ACTIONID), + DriverInitializePolicy, + SoftpubMessage, + SoftpubSignature, + SoftpubCertficate, + SoftpubCertCheck, + DriverFinalPolicy, + { 0, NULL, NULL }, /* No diagnostic policy */ + DriverCleanupPolicy }; + + if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo)) + return FALSE; + + return TRUE; +} + +/*************************************************************************** + * WINTRUST_RegisterGenChainVerify + * + * Register WINTRUST_ACTION_GENERIC_CHAIN_VERIFY actions and usages. + * + * NOTES + * WINTRUST_ACTION_GENERIC_CHAIN_VERIFY ({FC451C16-AC75-11D1-B4B8-00C04FB66EA0}) + * is defined in softpub.h + */ +static BOOL WINTRUST_RegisterGenChainVerify(void) +{ + static GUID ProvGUID = WINTRUST_ACTION_GENERIC_CHAIN_VERIFY; + CRYPT_REGISTER_ACTIONID ProvInfo = { sizeof(CRYPT_REGISTER_ACTIONID), + SoftpubInitialization, + SoftpubMessage, + SoftpubSignature, + GenericChainCertificateTrust, + SoftpubCertCheck, + GenericChainFinalProv, + { 0, NULL, NULL }, /* No diagnostic policy */ + SoftpubCleanup }; + + if (!WintrustAddActionID(&ProvGUID, 0, &ProvInfo)) + return FALSE; + + return TRUE; +} + +/*********************************************************************** + * WintrustAddDefaultForUsage (WINTRUST.@) + * + * Write OID and callback functions to the registry. + * + * PARAMS + * pszUsageOID [I] Pointer to a GUID. + * psDefUsage [I] Pointer to a structure that specifies the callback functions. + * + * RETURNS + * Success: TRUE. + * Failure: FALSE. + * + * NOTES + * WintrustAddDefaultForUsage will only return TRUE or FALSE, no last + * error is set, not even when the registry cannot be written to. + */ +BOOL WINAPI WintrustAddDefaultForUsage(const char *pszUsageOID, + CRYPT_PROVIDER_REGDEFUSAGE *psDefUsage) +{ + static const WCHAR CBAlloc[] = {'C','a','l','l','b','a','c','k','A','l','l','o','c','F','u','n','c','t','i','o','n', 0}; + static const WCHAR CBFree[] = {'C','a','l','l','b','a','c','k','F','r','e','e','F','u','n','c','t','i','o','n', 0}; + LONG Res = ERROR_SUCCESS; + LONG WriteUsageError = ERROR_SUCCESS; + DWORD Len; + WCHAR GuidString[39]; + + TRACE("(%s %p)\n", debugstr_a(pszUsageOID), psDefUsage); + + /* Some sanity checks. */ + if (!pszUsageOID || + !psDefUsage || + !psDefUsage->pgActionID || + (psDefUsage->cbStruct != sizeof(CRYPT_PROVIDER_REGDEFUSAGE))) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (psDefUsage->pwszDllName) + { + Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, Dll, psDefUsage->pwszDllName); + if (Res != ERROR_SUCCESS) WriteUsageError = Res; + } + if (psDefUsage->pwszLoadCallbackDataFunctionName) + { + WCHAR* CallbackW; + + Len = MultiByteToWideChar( CP_ACP, 0, psDefUsage->pwszLoadCallbackDataFunctionName, -1, NULL, 0 ); + CallbackW = HeapAlloc( GetProcessHeap(), 0, Len * sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, psDefUsage->pwszLoadCallbackDataFunctionName, -1, CallbackW, Len ); + + Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, CBAlloc, CallbackW); + if (Res != ERROR_SUCCESS) WriteUsageError = Res; + + HeapFree(GetProcessHeap(), 0, CallbackW); + } + if (psDefUsage->pwszFreeCallbackDataFunctionName) + { + WCHAR* CallbackW; + + Len = MultiByteToWideChar( CP_ACP, 0, psDefUsage->pwszFreeCallbackDataFunctionName, -1, NULL, 0 ); + CallbackW = HeapAlloc( GetProcessHeap(), 0, Len * sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, psDefUsage->pwszFreeCallbackDataFunctionName, -1, CallbackW, Len ); + + Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, CBFree, CallbackW); + if (Res != ERROR_SUCCESS) WriteUsageError = Res; + + HeapFree(GetProcessHeap(), 0, CallbackW); + } + + WINTRUST_Guid2Wstr(psDefUsage->pgActionID, GuidString); + Res = WINTRUST_WriteSingleUsageEntry(pszUsageOID, DefaultId, GuidString); + if (Res != ERROR_SUCCESS) WriteUsageError = Res; + + if (WriteUsageError != ERROR_SUCCESS) + return FALSE; + + return TRUE; +} + +/*********************************************************************** + * WINTRUST_SIPPAddProvider + * + * Helper for DllRegisterServer. + */ +static BOOL WINTRUST_SIPPAddProvider(GUID* Subject, WCHAR* MagicNumber) +{ + static WCHAR CryptSIPGetSignedDataMsg[] = + {'C','r','y','p','t','S','I','P','G','e','t','S','i','g','n','e','d','D','a','t','a','M','s','g', 0}; + static WCHAR CryptSIPPutSignedDataMsg[] = + {'C','r','y','p','t','S','I','P','P','u','t','S','i','g','n','e','d','D','a','t','a','M','s','g', 0}; + static WCHAR CryptSIPCreateIndirectData[] = + {'C','r','y','p','t','S','I','P','C','r','e','a','t','e','I','n','d','i','r','e','c','t','D','a','t','a', 0}; + static WCHAR CryptSIPVerifyIndirectData[] = + {'C','r','y','p','t','S','I','P','V','e','r','i','f','y','I','n','d','i','r','e','c','t','D','a','t','a', 0}; + static WCHAR CryptSIPRemoveSignedDataMsg[] = + {'C','r','y','p','t','S','I','P','R','e','m','o','v','e','S','i','g','n','e','d','D','a','t','a','M','s','g', 0}; + SIP_ADD_NEWPROVIDER NewProv; + BOOL Ret; + + /* Clear and initialize the structure */ + memset(&NewProv, 0, sizeof(SIP_ADD_NEWPROVIDER)); + NewProv.cbStruct = sizeof(SIP_ADD_NEWPROVIDER); + NewProv.pwszDLLFileName = HeapAlloc(GetProcessHeap(), 0, sizeof(SP_POLICY_PROVIDER_DLL_NAME)); + /* Fill the structure */ + NewProv.pgSubject = Subject; + lstrcpyW(NewProv.pwszDLLFileName, SP_POLICY_PROVIDER_DLL_NAME); + NewProv.pwszMagicNumber = MagicNumber; + NewProv.pwszIsFunctionName = NULL; + NewProv.pwszGetFuncName = CryptSIPGetSignedDataMsg; + NewProv.pwszPutFuncName = CryptSIPPutSignedDataMsg; + NewProv.pwszCreateFuncName = CryptSIPCreateIndirectData; + NewProv.pwszVerifyFuncName = CryptSIPVerifyIndirectData; + NewProv.pwszRemoveFuncName = CryptSIPRemoveSignedDataMsg; + NewProv.pwszIsFunctionNameFmt2 = NULL; + + Ret = CryptSIPAddProvider(&NewProv); + + HeapFree(GetProcessHeap(), 0, NewProv.pwszDLLFileName); + + return Ret; } /*********************************************************************** * DllRegisterServer (WINTRUST.@) */ HRESULT WINAPI DllRegisterServer(void) +{ + static const CHAR SpcPeImageDataEncode[] = "WVTAsn1SpcPeImageDataEncode"; + static const CHAR SpcPeImageDataDecode[] = "WVTAsn1SpcPeImageDataDecode"; + static const CHAR SpcLinkEncode[] = "WVTAsn1SpcLinkEncode"; + static const CHAR SpcLinkDecode[] = "WVTAsn1SpcLinkDecode"; + static const CHAR SpcSigInfoEncode[] = "WVTAsn1SpcSigInfoEncode"; + static const CHAR SpcSigInfoDecode[] = "WVTAsn1SpcSigInfoDecode"; + static const CHAR SpcIndirectDataContentEncode[] = "WVTAsn1SpcIndirectDataContentEncode"; + static const CHAR SpcIndirectDataContentDecode[] = "WVTAsn1SpcIndirectDataContentDecode"; + static const CHAR SpcSpAgencyInfoEncode[] = "WVTAsn1SpcSpAgencyInfoEncode"; + static const CHAR SpcSpAgencyInfoDecode[] = "WVTAsn1SpcSpAgencyInfoDecode"; + static const CHAR SpcMinimalCriteriaInfoEncode[] = "WVTAsn1SpcMinimalCriteriaInfoEncode"; + static const CHAR SpcMinimalCriteriaInfoDecode[] = "WVTAsn1SpcMinimalCriteriaInfoDecode"; + static const CHAR SpcFinancialCriteriaInfoEncode[] = "WVTAsn1SpcFinancialCriteriaInfoEncode"; + static const CHAR SpcFinancialCriteriaInfoDecode[] = "WVTAsn1SpcFinancialCriteriaInfoDecode"; + static const CHAR SpcStatementTypeEncode[] = "WVTAsn1SpcStatementTypeEncode"; + static const CHAR SpcStatementTypeDecode[] = "WVTAsn1SpcStatementTypeDecode"; + static const CHAR CatNameValueEncode[] = "WVTAsn1CatNameValueEncode"; + static const CHAR CatNameValueDecode[] = "WVTAsn1CatNameValueDecode"; + static const CHAR CatMemberInfoEncode[] = "WVTAsn1CatMemberInfoEncode"; + static const CHAR CatMemberInfoDecode[] = "WVTAsn1CatMemberInfoDecode"; + static const CHAR SpcSpOpusInfoEncode[] = "WVTAsn1SpcSpOpusInfoEncode"; + static const CHAR SpcSpOpusInfoDecode[] = "WVTAsn1SpcSpOpusInfoDecode"; + static GUID Unknown1 = { 0xDE351A42, 0x8E59, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; + static GUID Unknown2 = { 0xC689AABA, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; + static GUID Unknown3 = { 0xC689AAB8, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; + static GUID Unknown4 = { 0xC689AAB9, 0x8E78, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; + static GUID Unknown5 = { 0xDE351A43, 0x8E59, 0x11D0, { 0x8C,0x47,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; + static GUID Unknown6 = { 0x9BA61D3F, 0xE73A, 0x11D0, { 0x8C,0xD2,0x00,0xC0,0x4F,0xC2,0x95,0xEE }}; + static WCHAR MagicNumber2[] = {'M','S','C','F', 0}; + static WCHAR MagicNumber3[] = {'0','x','0','0','0','0','4','5','5','0', 0}; + static WCHAR CafeBabe[] = {'0','x','c','a','f','e','b','a','b','e', 0}; + + HRESULT CryptRegisterRes = S_OK; + HRESULT TrustProviderRes = S_OK; + HRESULT SIPAddProviderRes = S_OK; + + TRACE("\n"); + + /* Testing on native shows that when an error is encountered in one of the CryptRegisterOIDFunction calls + * the rest of these calls is skipped. Registering is however continued for the trust providers. + * + * We are not totally in line with native as there all decoding functions are registered after all encoding + * functions. + */ +#define WINTRUST_REGISTEROID( oid, encode_funcname, decode_funcname ) \ + do { \ + if (!CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_ENCODE_OBJECT_FUNC, oid, SP_POLICY_PROVIDER_DLL_NAME, encode_funcname)) \ + { \ + CryptRegisterRes = HRESULT_FROM_WIN32(GetLastError()); \ + goto add_trust_providers; \ + } \ + if (!CryptRegisterOIDFunction(X509_ASN_ENCODING, CRYPT_OID_DECODE_OBJECT_FUNC, oid, SP_POLICY_PROVIDER_DLL_NAME, decode_funcname)) \ + { \ + CryptRegisterRes = HRESULT_FROM_WIN32(GetLastError()); \ + goto add_trust_providers; \ + } \ + } while (0) + + WINTRUST_REGISTEROID(SPC_PE_IMAGE_DATA_OBJID, SpcPeImageDataEncode, SpcPeImageDataDecode); + WINTRUST_REGISTEROID(SPC_PE_IMAGE_DATA_STRUCT, SpcPeImageDataEncode, SpcPeImageDataDecode); + WINTRUST_REGISTEROID(SPC_CAB_DATA_OBJID, SpcLinkEncode, SpcLinkDecode); + WINTRUST_REGISTEROID(SPC_CAB_DATA_STRUCT, SpcLinkEncode, SpcLinkDecode); + WINTRUST_REGISTEROID(SPC_JAVA_CLASS_DATA_OBJID, SpcLinkEncode, SpcLinkDecode); + WINTRUST_REGISTEROID(SPC_JAVA_CLASS_DATA_STRUCT, SpcLinkEncode, SpcLinkDecode); + WINTRUST_REGISTEROID(SPC_LINK_OBJID, SpcLinkEncode, SpcLinkDecode); + WINTRUST_REGISTEROID(SPC_LINK_STRUCT, SpcLinkEncode, SpcLinkDecode); + WINTRUST_REGISTEROID(SPC_SIGINFO_OBJID, SpcSigInfoEncode, SpcSigInfoDecode); + WINTRUST_REGISTEROID(SPC_SIGINFO_STRUCT, SpcSigInfoEncode, SpcSigInfoDecode); + WINTRUST_REGISTEROID(SPC_INDIRECT_DATA_OBJID, SpcIndirectDataContentEncode, SpcIndirectDataContentDecode); + WINTRUST_REGISTEROID(SPC_INDIRECT_DATA_CONTENT_STRUCT, SpcIndirectDataContentEncode, SpcIndirectDataContentDecode); + WINTRUST_REGISTEROID(SPC_SP_AGENCY_INFO_OBJID, SpcSpAgencyInfoEncode, SpcSpAgencyInfoDecode); + WINTRUST_REGISTEROID(SPC_SP_AGENCY_INFO_STRUCT, SpcSpAgencyInfoEncode, SpcSpAgencyInfoDecode); + WINTRUST_REGISTEROID(SPC_MINIMAL_CRITERIA_OBJID, SpcMinimalCriteriaInfoEncode, SpcMinimalCriteriaInfoDecode); + WINTRUST_REGISTEROID(SPC_MINIMAL_CRITERIA_STRUCT, SpcMinimalCriteriaInfoEncode, SpcMinimalCriteriaInfoDecode); + WINTRUST_REGISTEROID(SPC_FINANCIAL_CRITERIA_OBJID, SpcFinancialCriteriaInfoEncode, SpcFinancialCriteriaInfoDecode); + WINTRUST_REGISTEROID(SPC_FINANCIAL_CRITERIA_STRUCT, SpcFinancialCriteriaInfoEncode, SpcFinancialCriteriaInfoDecode); + WINTRUST_REGISTEROID(SPC_STATEMENT_TYPE_OBJID, SpcStatementTypeEncode, SpcStatementTypeDecode); + WINTRUST_REGISTEROID(SPC_STATEMENT_TYPE_STRUCT, SpcStatementTypeEncode, SpcStatementTypeDecode); + WINTRUST_REGISTEROID(CAT_NAMEVALUE_OBJID, CatNameValueEncode, CatNameValueDecode); + WINTRUST_REGISTEROID(CAT_NAMEVALUE_STRUCT, CatNameValueEncode, CatNameValueDecode); + WINTRUST_REGISTEROID(CAT_MEMBERINFO_OBJID, CatMemberInfoEncode, CatMemberInfoDecode); + WINTRUST_REGISTEROID(CAT_MEMBERINFO_STRUCT, CatMemberInfoEncode, CatMemberInfoDecode); + WINTRUST_REGISTEROID(SPC_SP_OPUS_INFO_OBJID, SpcSpOpusInfoEncode, SpcSpOpusInfoDecode); + WINTRUST_REGISTEROID(SPC_SP_OPUS_INFO_STRUCT, SpcSpOpusInfoEncode, SpcSpOpusInfoDecode); + +#undef WINTRUST_REGISTEROID + +add_trust_providers: + + /* Testing on W2K3 shows: + * All registry writes are tried. If one fails this part will return S_FALSE. + * + * Last error is set to the last error encountered, regardless if the first + * part failed or not. + */ + + /* Create the necessary action registry structures */ + WINTRUST_InitRegStructs(); + + /* Register several Trust Provider actions */ + if (!WINTRUST_RegisterGenVerifyV2()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterPublishedSoftware()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterPublishedSoftwareNoBadUi()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterGenCertVerify()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterTrustProviderTest()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterHttpsProv()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterOfficeSignVerify()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterDriverVerify()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterGenChainVerify()) + TrustProviderRes = S_FALSE; + + /* Free the registry structures */ + WINTRUST_FreeRegStructs(); + + /* Testing on W2K3 shows: + * All registry writes are tried. If one fails this part will return S_FALSE. + * + * Last error is set to the last error encountered, regardless if the previous + * parts failed or not. + */ + + if (!WINTRUST_SIPPAddProvider(&Unknown1, NULL)) + SIPAddProviderRes = S_FALSE; + if (!WINTRUST_SIPPAddProvider(&Unknown2, MagicNumber2)) + SIPAddProviderRes = S_FALSE; + if (!WINTRUST_SIPPAddProvider(&Unknown3, MagicNumber3)) + SIPAddProviderRes = S_FALSE; + if (!WINTRUST_SIPPAddProvider(&Unknown4, CafeBabe)) + SIPAddProviderRes = S_FALSE; + if (!WINTRUST_SIPPAddProvider(&Unknown5, CafeBabe)) + SIPAddProviderRes = S_FALSE; + if (!WINTRUST_SIPPAddProvider(&Unknown6, CafeBabe)) + SIPAddProviderRes = S_FALSE; + + /* Native does a CryptSIPRemoveProvider here for {941C2937-1292-11D1-85BE-00C04FC295EE}. + * This SIP Provider is however not found on up-to-date window install and native will + * set the last error to ERROR_FILE_NOT_FOUND. + * Wine has the last error set to ERROR_INVALID_PARAMETER. There shouldn't be an app + * depending on this last error though so there is no need to imitate native to the full extent. + * + * (The ERROR_INVALID_PARAMETER for Wine it totally valid as we (and native) do register + * a trust provider without a diagnostic policy). + */ + + /* If CryptRegisterRes is not S_OK it will always overrule the return value. */ + if (CryptRegisterRes != S_OK) + return CryptRegisterRes; + else if (SIPAddProviderRes == S_OK) + return TrustProviderRes; + else + return SIPAddProviderRes; +} + +/*********************************************************************** + * DllUnregisterServer (WINTRUST.@) + */ +HRESULT WINAPI DllUnregisterServer(void) { FIXME("stub\n"); return S_OK; } /*********************************************************************** - * DllUnregisterServer (WINTRUST.@) - */ -HRESULT WINAPI DllUnregisterServer(void) + * SoftpubDllRegisterServer (WINTRUST.@) + * + * Registers softpub.dll + * + * PARAMS + * + * RETURNS + * Success: S_OK. + * Failure: S_FALSE. (See also GetLastError()). + * + * NOTES + * DllRegisterServer in softpub.dll will call this function. + * See comments in DllRegisterServer. + */ +HRESULT WINAPI SoftpubDllRegisterServer(void) +{ + HRESULT TrustProviderRes = S_OK; + + TRACE("\n"); + + /* Create the necessary action registry structures */ + WINTRUST_InitRegStructs(); + + /* Register several Trust Provider actions */ + if (!WINTRUST_RegisterGenVerifyV2()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterPublishedSoftware()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterPublishedSoftwareNoBadUi()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterGenCertVerify()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterTrustProviderTest()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterHttpsProv()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterOfficeSignVerify()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterDriverVerify()) + TrustProviderRes = S_FALSE; + if (!WINTRUST_RegisterGenChainVerify()) + TrustProviderRes = S_FALSE; + + /* Free the registry structures */ + WINTRUST_FreeRegStructs(); + + return TrustProviderRes; +} + +/*********************************************************************** + * SoftpubDllUnregisterServer (WINTRUST.@) + */ +HRESULT WINAPI SoftpubDllUnregisterServer(void) { FIXME("stub\n"); return S_OK; } /*********************************************************************** - * SoftpubDllRegisterServer (WINTRUST.@) - */ -HRESULT WINAPI SoftpubDllRegisterServer(void) + * mscat32DllRegisterServer (WINTRUST.@) + */ +HRESULT WINAPI mscat32DllRegisterServer(void) { FIXME("stub\n"); return S_OK; } /*********************************************************************** - * SoftpubDllUnregisterServer (WINTRUST.@) - */ -HRESULT WINAPI SoftpubDllUnregisterServer(void) + * mscat32DllUnregisterServer (WINTRUST.@) + */ +HRESULT WINAPI mscat32DllUnregisterServer(void) { FIXME("stub\n"); return S_OK; } /*********************************************************************** - * mscat32DllRegisterServer (WINTRUST.@) - */ -HRESULT WINAPI mscat32DllRegisterServer(void) + * mssip32DllRegisterServer (WINTRUST.@) + */ +HRESULT WINAPI mssip32DllRegisterServer(void) { FIXME("stub\n"); return S_OK; } /*********************************************************************** - * mscat32DllUnregisterServer (WINTRUST.@) - */ -HRESULT WINAPI mscat32DllUnregisterServer(void) + * mssip32DllUnregisterServer (WINTRUST.@) + */ +HRESULT WINAPI mssip32DllUnregisterServer(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; -} 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 Thu Apr 26 17:38:13 2007 @@ -1,4 +1,5 @@ <module name="wintrust" type="win32dll" baseaddress="${BASEADDRESS_WINTRUST}" installbase="system32" installname="wintrust.dll" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="wintrust.spec.def" /> <include base="wintrust">.</include> <include base="ReactOS">include/reactos/wine</include> @@ -10,8 +11,11 @@ <define name="WINVER">0x501</define> <library>wine</library> <library>crypt32</library> + <library>user32</library> + <library>advapi32</library> <library>kernel32</library> <library>ntdll</library> + <file>crypt.c</file> <file>register.c</file> <file>wintrust_main.c</file> <file>version.rc</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 Thu Apr 26 17:38:13 2007 @@ -7,7 +7,7 @@ @ stub CryptCATAdminPauseServiceForBackup @ stub CryptCATAdminReleaseCatalogContext @ stdcall CryptCATAdminReleaseContext(long long) -@ stub CryptCATAdminRemoveCatalog +@ stdcall CryptCATAdminRemoveCatalog(ptr wstr long) @ stub CryptCATAdminResolveCatalogPath @ stub CryptCATCDFClose @ stub CryptCATCDFEnumAttributes @@ -18,28 +18,28 @@ @ stub CryptCATCDFEnumMembersByCDFTagEx @ stub CryptCATCDFOpen @ stub CryptCATCatalogInfoFromContext -@ stub CryptCATClose +@ stdcall CryptCATClose(long) @ stub CryptCATEnumerateAttr @ stub CryptCATEnumerateCatAttr -@ stub CryptCATEnumerateMember +@ stdcall CryptCATEnumerateMember(long ptr) @ stub CryptCATGetAttrInfo @ stub CryptCATGetCatAttrInfo @ stub CryptCATGetMemberInfo @ stub CryptCATHandleFromStore -@ stub CryptCATOpen +@ stdcall CryptCATOpen(wstr long long long long) @ stub CryptCATPersistStore @ stub CryptCATPutAttrInfo @ stub CryptCATPutCatAttrInfo @ stub CryptCATPutMemberInfo @ stub CryptCATStoreFromHandle @ stub CryptCATVerifyMember -@ stub CryptSIPCreateIndirectData +@ stdcall CryptSIPCreateIndirectData(ptr ptr ptr) @ stub CryptSIPGetInfo @ stub CryptSIPGetRegWorkingFlags -@ stub CryptSIPGetSignedDataMsg -@ stub CryptSIPPutSignedDataMsg -@ stub CryptSIPRemoveSignedDataMsg -@ stub CryptSIPVerifyIndirectData +@ stdcall CryptSIPGetSignedDataMsg(ptr ptr long ptr ptr) +@ stdcall CryptSIPPutSignedDataMsg(ptr long ptr long ptr) +@ stdcall CryptSIPRemoveSignedDataMsg(ptr long) +@ stdcall CryptSIPVerifyIndirectData(ptr ptr) @ stdcall -private DllRegisterServer() @ stdcall -private DllUnregisterServer() @ stub DriverCleanupPolicy @@ -111,7 +111,7 @@ @ stdcall WinVerifyTrust(long ptr ptr) @ stdcall WinVerifyTrustEx(long ptr ptr) @ stdcall WintrustAddActionID(ptr long ptr) -@ stub WintrustAddDefaultForUsage +@ stdcall WintrustAddDefaultForUsage(ptr ptr) @ stub WintrustCertificateTrust @ stub WintrustGetDefaultForUsage @ stdcall WintrustGetRegPolicyFlags(ptr) 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 Thu Apr 26 17:38:13 2007 @@ -51,75 +51,6 @@ } /*********************************************************************** - * 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 ) -{ - FIXME("%p %s %lx\n", catAdmin, debugstr_guid(sysSystem), dwFlags); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/*********************************************************************** - * CryptCATAdminCalcHashFromFileHandle (WINTRUST.@) - */ -BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE hFile, DWORD* pcbHash, - BYTE* pbHash, DWORD dwFlags ) -{ - FIXME("%p %p %p %lx\n", hFile, pcbHash, pbHash, dwFlags); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/*********************************************************************** - * 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 ) -{ - FIXME("%p %lx\n", hCatAdmin, dwFlags); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/*********************************************************************** * TrustIsCertificateSelfSigned (WINTRUST.@) */ BOOL WINAPI TrustIsCertificateSelfSigned( PCCERT_CONTEXT cert ) @@ -150,7 +81,7 @@ * Trust providers can be found at: * HKLM\SOFTWARE\Microsoft\Cryptography\Providers\Trust\ */ -LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, WINTRUST_DATA* ActionData ) +LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, LPVOID ActionData ) { static const GUID gen_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2; @@ -192,7 +123,7 @@ CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSigner, DWORD idxCounterSigner) { - FIXME("%p %ld %d %ld\n", pProvData, idxSigner, fCounterSigner, + FIXME("%p %d %d %d\n", pProvData, idxSigner, fCounterSigner, idxCounterSigner); return NULL; } @@ -231,6 +162,6 @@ */ BOOL WINAPI WintrustSetRegPolicyFlags( DWORD dwPolicyFlags) { - FIXME("stub: %lx\n", dwPolicyFlags); + FIXME("stub: %x\n", dwPolicyFlags); return TRUE; } Modified: 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 (original) +++ trunk/reactos/dll/win32/wintrust/wintrust_ros.diff Thu Apr 26 17:38:13 2007 @@ -2,9 +2,9 @@ =================================================================== --- wintrust_main.c (revision 23867) +++ wintrust_main.c (working copy) -@@ -152,7 +152,26 @@ +@@ -83,7 +83,26 @@ */ - LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, WINTRUST_DATA* ActionData ) + LONG WINAPI WinVerifyTrust( HWND hwnd, GUID *ActionID, LPVOID ActionData ) { + static const GUID gen_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2; +
17 years, 9 months
1
0
0
0
[winesync] 26519: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Apr 26 17:37:57 2007 New Revision: 26519 URL:
http://svn.reactos.org/svn/reactos?rev=26519&view=rev
Log: Autosyncing with Wine HEAD Added: trunk/reactos/dll/win32/crypt32/chain.c (with props) trunk/reactos/dll/win32/crypt32/crypt32_Fr.rc (with props) trunk/reactos/dll/win32/crypt32/sip.c (with props) Modified: trunk/reactos/dll/win32/crypt32/base64.c trunk/reactos/dll/win32/crypt32/cert.c trunk/reactos/dll/win32/crypt32/context.c trunk/reactos/dll/win32/crypt32/crl.c trunk/reactos/dll/win32/crypt32/crypt32.rbuild trunk/reactos/dll/win32/crypt32/crypt32.rc trunk/reactos/dll/win32/crypt32/crypt32.spec trunk/reactos/dll/win32/crypt32/crypt32_De.rc trunk/reactos/dll/win32/crypt32/crypt32_Ko.rc trunk/reactos/dll/win32/crypt32/crypt32_private.h trunk/reactos/dll/win32/crypt32/decode.c trunk/reactos/dll/win32/crypt32/encode.c trunk/reactos/dll/win32/crypt32/main.c trunk/reactos/dll/win32/crypt32/oid.c trunk/reactos/dll/win32/crypt32/proplist.c trunk/reactos/dll/win32/crypt32/protectdata.c trunk/reactos/dll/win32/crypt32/serialize.c trunk/reactos/dll/win32/crypt32/store.c trunk/reactos/dll/win32/crypt32/str.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/crypt32/base64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/base64.c…
Modified: trunk/reactos/dll/win32/crypt32/cert.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/cert.c?r…
Added: trunk/reactos/dll/win32/crypt32/chain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/chain.c?…
Modified: trunk/reactos/dll/win32/crypt32/context.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/context.…
Modified: trunk/reactos/dll/win32/crypt32/crl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crl.c?re…
Modified: trunk/reactos/dll/win32/crypt32/crypt32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32.…
Modified: trunk/reactos/dll/win32/crypt32/crypt32.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32.…
Modified: trunk/reactos/dll/win32/crypt32/crypt32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32.…
Modified: trunk/reactos/dll/win32/crypt32/crypt32_De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32_…
Added: trunk/reactos/dll/win32/crypt32/crypt32_Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32_…
Modified: trunk/reactos/dll/win32/crypt32/crypt32_Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32_…
Modified: trunk/reactos/dll/win32/crypt32/crypt32_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32_…
Modified: trunk/reactos/dll/win32/crypt32/decode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/decode.c…
Modified: trunk/reactos/dll/win32/crypt32/encode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/encode.c…
Modified: trunk/reactos/dll/win32/crypt32/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/main.c?r…
Modified: trunk/reactos/dll/win32/crypt32/oid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/oid.c?re…
Modified: trunk/reactos/dll/win32/crypt32/proplist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/proplist…
Modified: trunk/reactos/dll/win32/crypt32/protectdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/protectd…
Modified: trunk/reactos/dll/win32/crypt32/serialize.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/serializ…
Added: trunk/reactos/dll/win32/crypt32/sip.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/sip.c?re…
Modified: trunk/reactos/dll/win32/crypt32/store.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/store.c?…
Modified: trunk/reactos/dll/win32/crypt32/str.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/str.c?re…
17 years, 9 months
1
0
0
0
[hpoussin] 26518: Update some headers
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Apr 26 17:37:38 2007 New Revision: 26518 URL:
http://svn.reactos.org/svn/reactos?rev=26518&view=rev
Log: Update some headers Modified: trunk/reactos/include/psdk/mscat.h trunk/reactos/include/psdk/mssip.h trunk/reactos/include/psdk/softpub.h trunk/reactos/include/psdk/wincrypt.h trunk/reactos/include/psdk/wintrust.h Modified: trunk/reactos/include/psdk/mscat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mscat.h?rev=2…
============================================================================== --- trunk/reactos/include/psdk/mscat.h (original) +++ trunk/reactos/include/psdk/mscat.h Thu Apr 26 17:37:38 2007 @@ -19,6 +19,8 @@ #ifndef __WINE_MSCAT_H #define __WINE_MSCAT_H +#include <mssip.h> + typedef HANDLE HCATADMIN; typedef HANDLE HCATINFO; @@ -26,10 +28,33 @@ extern "C" { #endif + +#include <pshpack8.h> + +typedef struct CRYPTCATMEMBER_ { + DWORD cbStruct; + LPWSTR pwszReferenceTag; + LPWSTR pwszFileName; + GUID gSubjectType; + DWORD fdwMemberFlags; + struct SIP_INDIRECT_DATA_* pIndirectData; + DWORD dwCertVersion; + DWORD dwReserved; + HANDLE hReserved; + CRYPT_ATTR_BLOB sEncodedIndirectData; + CRYPT_ATTR_BLOB sEncodedMemberInfo; +} CRYPTCATMEMBER; + +#include <poppack.h> + + BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN*,const GUID*,DWORD); BOOL WINAPI CryptCATAdminCalcHashFromFileHandle(HANDLE,DWORD*,BYTE*,DWORD); HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN,BYTE*,DWORD,DWORD,HCATINFO*); BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN,DWORD); +BOOL WINAPI CryptCATClose(HANDLE); +CRYPTCATMEMBER* WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER*); +HANDLE WINAPI CryptCATOpen(LPWSTR,DWORD,HCRYPTPROV,DWORD,DWORD); #ifdef __cplusplus } Modified: trunk/reactos/include/psdk/mssip.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mssip.h?rev=2…
============================================================================== --- trunk/reactos/include/psdk/mssip.h (original) +++ trunk/reactos/include/psdk/mssip.h Thu Apr 26 17:37:38 2007 @@ -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 */ #ifndef __WINE_MSSIP_H @@ -115,7 +115,7 @@ #include <poppack.h> typedef BOOL (WINAPI * pCryptSIPGetSignedDataMsg)(SIP_SUBJECTINFO *,DWORD *,DWORD,DWORD *,BYTE *); -typedef BOOL (WINAPI * pCryptSIPPutSignedDataMsg)(SIP_SUBJECTINFO *,DWORD,DWORD,DWORD,BYTE); +typedef BOOL (WINAPI * pCryptSIPPutSignedDataMsg)(SIP_SUBJECTINFO *,DWORD,DWORD *,DWORD,BYTE *); typedef BOOL (WINAPI * pCryptSIPCreateIndirectData)(SIP_SUBJECTINFO *,DWORD *,SIP_INDIRECT_DATA *); typedef BOOL (WINAPI * pCryptSIPVerifyIndirectData)(SIP_SUBJECTINFO *,SIP_INDIRECT_DATA *); typedef BOOL (WINAPI * pCryptSIPRemoveSignedDataMsg)(SIP_SUBJECTINFO *,DWORD); @@ -162,12 +162,13 @@ /**********************************************************************/ BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO *,DWORD *,DWORD,DWORD *,BYTE *); -BOOL WINAPI CryptSIPPutSignedDataMsg(SIP_SUBJECTINFO *,DWORD,DWORD,DWORD,BYTE); +BOOL WINAPI CryptSIPPutSignedDataMsg(SIP_SUBJECTINFO *,DWORD,DWORD *,DWORD,BYTE *); BOOL WINAPI CryptSIPCreateIndirectData(SIP_SUBJECTINFO *,DWORD *,SIP_INDIRECT_DATA *); BOOL WINAPI CryptSIPVerifyIndirectData(SIP_SUBJECTINFO *,SIP_INDIRECT_DATA *); BOOL WINAPI CryptSIPRemoveSignedDataMsg(SIP_SUBJECTINFO *,DWORD); BOOL WINAPI CryptSIPLoad(const GUID *,DWORD,SIP_DISPATCH_INFO *); +BOOL WINAPI CryptSIPRetrieveSubjectGuid(LPCWSTR,HANDLE,GUID *); BOOL WINAPI CryptSIPRetrieveSubjectGuidForCatalogFile(LPCWSTR,HANDLE,GUID *); BOOL WINAPI CryptSIPAddProvider(SIP_ADD_NEWPROVIDER *); BOOL WINAPI CryptSIPRemoveProvider(GUID *); Modified: trunk/reactos/include/psdk/softpub.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/softpub.h?rev…
============================================================================== --- trunk/reactos/include/psdk/softpub.h (original) +++ trunk/reactos/include/psdk/softpub.h Thu Apr 26 17:37:38 2007 @@ -24,19 +24,157 @@ #define WINTRUST_ACTION_GENERIC_CERT_VERIFY \ { 0x189a3842, 0x3041, 0x11d1, { 0x85,0xe1,0x00,0xc0,0x4f,0xc2,0x95,0xee }} +#if defined(__GNUC__) +#define SP_GENERIC_CERT_INIT_FUNCTION (const WCHAR []) \ + {'S','o','f','t','p','u','b','D','e','f','C','e','r','t','I','n','i','t', 0} +#elif defined(_MSC_VER) +#define SP_GENERIC_CERT_INIT_FUNCTION L"SoftpubDefCertInit" +#else +static const WCHAR SP_GENERIC_CERT_INIT_FUNCTION[] = + {'S','o','f','t','p','u','b','D','e','f','C','e','r','t','I','n','i','t', 0}; +#endif + #define WINTRUST_ACTION_GENERIC_CHAIN_VERIFY \ { 0xfc451c16, 0xac75, 0x11d1, { 0xb4,0xb8,0x00,0xc0,0x4f,0xb6,0x6e,0xa0 }} + +#if defined(__GNUC__) +#define GENERIC_CHAIN_FINALPOLICY_FUNCTION (const WCHAR []) \ + {'G','e','n','e','r','i','c','C','h','a','i','n','F','i','n','a','l','P','r','o','v', 0} +#define GENERIC_CHAIN_CERTTRUST_FUNCTION (const WCHAR []) \ + {'G','e','n','e','r','i','c','C','h','a','i','n','C','e','r','t','i','f','i','c','a','t','e','T','r','u','s','t', 0} +#elif defined(_MSC_VER) +#define GENERIC_CHAIN_FINALPOLICY_FUNCTION L"GenericChainFinalProv" +#define GENERIC_CHAIN_CERTTRUST_FUNCTION L"GenericChainCertificateTrust" +#else +static const WCHAR GENERIC_CHAIN_FINALPOLICY_FUNCTION[] = + {'G','e','n','e','r','i','c','C','h','a','i','n','F','i','n','a','l','P','r','o','v', 0}; +static const WCHAR GENERIC_CHAIN_CERTTRUST_FUNCTION[] = + {'G','e','n','e','r','i','c','C','h','a','i','n','C','e','r','t','i','f','i','c','a','t','e','T','r','u','s','t', 0}; +#endif + +#if defined(__GNUC__) +#define SP_POLICY_PROVIDER_DLL_NAME (const WCHAR []) \ + {'W','I','N','T','R','U','S','T','.','D','L','L' ,0} +#elif defined(_MSC_VER) +#define SP_POLICY_PROVIDER_DLL_NAME L"WINTRUST.DLL" +#else +static const WCHAR SP_POLICY_PROVIDER_DLL_NAME[] = + {'W','I','N','T','R','U','S','T','.','D','L','L', 0}; +#endif #define WINTRUST_ACTION_GENERIC_VERIFY_V2 \ { 0xaac56b, 0xcd44, 0x11d0, { 0x8c,0xc2,0x00,0xc0,0x4f,0xc2,0x95,0xee }} +#if defined(__GNUC__) +#define SP_INIT_FUNCTION (const WCHAR []) \ + {'S','o','f','t','p','u','b','I','n','i','t','i','a','l','i','z','e', 0} +#define SP_OBJTRUST_FUNCTION (const WCHAR []) \ + {'S','o','f','t','p','u','b','L','o','a','d','M','e','s','s','a','g','e', 0} +#define SP_SIGTRUST_FUNCTION (const WCHAR []) \ + {'S','o','f','t','p','u','b','L','o','a','d','S','i','g','n','a','t','u','r','e', 0} +#define SP_CHKCERT_FUNCTION (const WCHAR []) \ + {'S','o','f','t','p','u','b','C','h','e','c','k','C','e','r','t', 0} +#define SP_FINALPOLICY_FUNCTION (const WCHAR []) \ + {'S','o','f','t','p','u','b','A','u','t','h','e','n','t','i','c','o','d','e', 0} +#define SP_CLEANUPPOLICY_FUNCTION (const WCHAR []) \ + {'S','o','f','t','p','u','b','C','l','e','a','n','u','p', 0} +#elif defined(_MSC_VER) +#define SP_INIT_FUNCTION L"SoftpubInitialize" +#define SP_OBJTRUST_FUNCTION L"SoftpubLoadMessage" +#define SP_SIGTRUST_FUNCTION L"SoftpubLoadSignature" +#define SP_CHKCERT_FUNCTION L"SoftpubCheckCert" +#define SP_FINALPOLICY_FUNCTION L"SoftpubAuthenticode" +#define SP_CLEANUPPOLICY_FUNCTION L"SoftpubCleanup" +#else +static const WCHAR SP_INIT_FUNCTION[] = + {'S','o','f','t','p','u','b','I','n','i','t','i','a','l','i','z','e', 0}; +static const WCHAR SP_OBJTRUST_FUNCTION[] = + {'S','o','f','t','p','u','b','L','o','a','d','M','e','s','s','a','g','e', 0}; +static const WCHAR SP_SIGTRUST_FUNCTION[] = + {'S','o','f','t','p','u','b','L','o','a','d','S','i','g','n','a','t','u','r','e', 0}; +static const WCHAR SP_CHKCERT_FUNCTION[] = + {'S','o','f','t','p','u','b','C','h','e','c','k','C','e','r','t', 0}; +static const WCHAR SP_FINALPOLICY_FUNCTION[] = + {'S','o','f','t','p','u','b','A','u','t','h','e','n','t','i','c','o','d','e', 0}; +static const WCHAR SP_CLEANUPPOLICY_FUNCTION[] = + {'S','o','f','t','p','u','b','C','l','e','a','n','u','p', 0}; +#endif + #define WINTRUST_ACTION_TRUSTPROVIDER_TEST \ { 0x573e31f8, 0xddba, 0x11d0, { 0x8c,0xcb,0x00,0xc0,0x4f,0xc2,0x95,0xee }} + +#if defined(__GNUC__) +#define SP_TESTDUMPPOLICY_FUNCTION_TEST (const WCHAR []) \ + {'S','o','f','t','p','u','b','D','u','m','p','S','t','r','u','c','t','u','r','e', 0} +#elif defined(_MSC_VER) +#define SP_TESTDUMPPOLICY_FUNCTION_TEST L"SoftpubDumpStructure" +#else +static const WCHAR SP_TESTDUMPPOLICY_FUNCTION_TEST[] = + {'S','o','f','t','p','u','b','D','u','m','p','S','t','r','u','c','t','u','r','e', 0}; +#endif + +#define HTTPSPROV_ACTION \ + { 0x573e31f8, 0xaaba, 0x11d0, { 0x8c,0xcb,0x00,0xc0,0x4f,0xc2,0x95,0xee }} + +#if defined(__GNUC__) +#define HTTPS_CERTTRUST_FUNCTION (const WCHAR []) \ + {'H','T','T','P','S','C','e','r','t','i','f','i','c','a','t','e','T','r','u','s','t', 0} +#define HTTPS_FINALPOLICY_FUNCTION (const WCHAR []) \ + {'H','T','T','P','S','F','i','n','a','l','P','r','o','v', 0} +#elif defined(_MSC_VER) +#define HTTPS_FINALPOLICY_FUNCTION L"HTTPSFinalProv" +#define HTTPS_CERTTRUST_FUNCTION L"HTTPSCertificateTrust" +#else +static const WCHAR HTTPS_CERTTRUST_FUNCTION[] = + {'H','T','T','P','S','C','e','r','t','i','f','i','c','a','t','e','T','r','u','s','t', 0}; +static const WCHAR HTTPS_FINALPOLICY_FUNCTION[] = + {'H','T','T','P','S','F','i','n','a','l','P','r','o','v', 0}; +#endif #define OFFICESIGN_ACTION_VERIFY \ { 0x5555c2cd, 0x17fb, 0x11d1, { 0x85,0xc4,0x00,0xc0,0x4f,0xc2,0x95,0xee }} +#if defined(__GNUC__) +#define OFFICE_POLICY_PROVIDER_DLL_NAME (const WCHAR []) \ + {'W','I','N','T','R','U','S','T','.','D','L','L' ,0} +#define OFFICE_INITPROV_FUNCTION (const WCHAR []) \ + {'O','f','f','i','c','e','I','n','i','t','i','a','l','i','z','e','P','o','l','i','c','y', 0} +#define OFFICE_CLEANUPPOLICY_FUNCTION (const WCHAR []) \ + {'O','f','f','i','c','e','C','l','e','a','n','u','p','P','o','l','i','c','y', 0} +#elif defined(_MSC_VER) +#define OFFICE_POLICY_PROVIDER_DLL_NAME SP_POLICY_PROVIDER_DLL_NAME +#define OFFICE_INITPROV_FUNCTION L"OfficeInitializePolicy" +#define OFFICE_CLEANUPPOLICY_FUNCTION L"OfficeCleanupPolicy" +#else +static const WCHAR OFFICE_POLICY_PROVIDER_DLL_NAME[] = + {'W','I','N','T','R','U','S','T','.','D','L','L', 0}; +static const WCHAR OFFICE_INITPROV_FUNCTION[] = + {'O','f','f','i','c','e','I','n','i','t','i','a','l','i','z','e','P','o','l','i','c','y', 0}; +static const WCHAR OFFICE_CLEANUPPOLICY_FUNCTION[] = + {'O','f','f','i','c','e','C','l','e','a','n','u','p','P','o','l','i','c','y', 0}; +#endif + #define DRIVER_ACTION_VERIFY \ { 0xf750e6c3, 0x38ee, 0x11d1, { 0x85,0xe5,0x00,0xc0,0x4f,0xc2,0x95,0xee }} +#if defined(__GNUC__) +#define DRIVER_INITPROV_FUNCTION (const WCHAR []) \ + {'D','r','i','v','e','r','I','n','i','t','i','a','l','i','z','e','P','o','l','i','c','y', 0} +#define DRIVER_FINALPOLPROV_FUNCTION (const WCHAR []) \ + {'D','r','i','v','e','r','F','i','n','a','l','P','o','l','i','c','y', 0} +#define DRIVER_CLEANUPPOLICY_FUNCTION (const WCHAR []) \ + {'D','r','i','v','e','r','C','l','e','a','n','u','p','P','o','l','i','c','y', 0} +#elif defined(_MSC_VER) +#define DRIVER_INITPROV_FUNCTION L"DriverInitializePolicy" +#define DRIVER_FINALPOLPROV_FUNCTION L"DriverFinalPolicy" +#define DRIVER_CLEANUPPOLICY_FUNCTION L"DriverCleanupPolicy" +#else +static const WCHAR DRIVER_INITPROV_FUNCTION[] = + {'D','r','i','v','e','r','I','n','i','t','i','a','l','i','z','e','P','o','l','i','c','y', 0}; +static const WCHAR DRIVER_FINALPOLPROV_FUNCTION[] = + {'D','r','i','v','e','r','F','i','n','a','l','P','o','l','i','c','y', 0}; +static const WCHAR DRIVER_CLEANUPPOLICY_FUNCTION[] = + {'D','r','i','v','e','r','C','l','e','a','n','u','p','P','o','l','i','c','y', 0}; +#endif + #endif /* __WINE_SOFTPUB_H */ Modified: trunk/reactos/include/psdk/wincrypt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wincrypt.h?re…
============================================================================== --- trunk/reactos/include/psdk/wincrypt.h (original) +++ trunk/reactos/include/psdk/wincrypt.h Thu Apr 26 17:37:38 2007 @@ -627,6 +627,11 @@ CRYPT_ATTRIBUTES UnauthAttrs; } CMSG_SIGNER_INFO, *PCMSG_SIGNER_INFO; +#define CMSG_VERIFY_SIGNER_PUBKEY 1 +#define CMSG_VERIFY_SIGNER_CERT 2 +#define CMSG_VERIFY_SIGNER_CHAIN 3 +#define CMSG_VERIFY_SIGNER_NULL 4 + typedef struct _CERT_REVOCATION_CRL_INFO { DWORD cbSize; PCCRL_CONTEXT pBaseCrlContext; @@ -645,11 +650,102 @@ PCERT_REVOCATION_CRL_INFO pCrlInfo; } CERT_REVOCATION_INFO, *PCERT_REVOCATION_INFO; +typedef struct _CERT_REVOCATION_PARA { + DWORD cbSize; + PCCERT_CONTEXT pIssuerCert; + DWORD cCertStore; + HCERTSTORE *rgCertStore; + HCERTSTORE hCrlStore; + LPFILETIME pftTimeToUse; +#ifdef CERT_REVOCATION_PARA_HAS_EXTRA_FIELDS + DWORD dwUrlRetrievalTimeout; + BOOL fCheckFreshnessTime; + DWORD dwFreshnessTime; + LPFILETIME pftCurrentTime; + PCERT_REVOCATION_CRL_INFO pCrlInfo; +#endif +} CERT_REVOCATION_PARA, *PCERT_REVOCATION_PARA; + +#define CERT_CONTEXT_REVOCATION_TYPE 1 +#define CERT_VERIFY_REV_CHAIN_FLAG 0x00000001 +#define CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION 0x00000002 +#define CERT_VERIFY_REV_ACCUMULATIVE_TIMEOUT_FLAG 0x00000004 + +typedef struct _CTL_VERIFY_USAGE_PARA { + DWORD cbSize; + CRYPT_DATA_BLOB ListIdentifier; + DWORD cCtlStore; + HCERTSTORE *rghCtlStore; + DWORD cSignerStore; + HCERTSTORE *rghSignerStore; +} CTL_VERIFY_USAGE_PARA, *PCTL_VERIFY_USAGE_PARA; + +typedef struct _CTL_VERIFY_USAGE_STATUS { + DWORD cbSize; + DWORD dwError; + DWORD dwFlags; + PCCTL_CONTEXT *ppCtl; + DWORD dwCtlEntryIndex; + PCCERT_CONTEXT *ppSigner; + DWORD dwSignerIndex; +} CTL_VERIFY_USAGE_STATUS, *PCTL_VERIFY_USAGE_STATUS; + +#define CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG 0x1 +#define CERT_VERIFY_TRUSTED_SIGNERS_FLAG 0x2 +#define CERT_VERIFY_NO_TIME_CHECK_FLAG 0x4 +#define CERT_VERIFY_ALLOW_MORE_USAGE_FLAG 0x8 +#define CERT_VERIFY_UPDATED_CTL_FLAG 0x1 + +typedef struct _CERT_REVOCATION_STATUS { + DWORD cbSize; + DWORD dwIndex; + DWORD dwError; + DWORD dwReason; + BOOL fHasFreshnessTime; + DWORD dwFreshnessTime; +} CERT_REVOCATION_STATUS, *PCERT_REVOCATION_STATUS; + typedef struct _CERT_TRUST_LIST_INFO { DWORD cbSize; PCTL_ENTRY pCtlEntry; PCCTL_CONTEXT pCtlContext; } CERT_TRUST_LIST_INFO, *PCERT_TRUST_LIST_INFO; + +#define CERT_TRUST_NO_ERROR 0x00000000 +#define CERT_TRUST_IS_NOT_TIME_VALID 0x00000001 +#define CERT_TRUST_IS_NOT_TIME_NESTED 0x00000002 +#define CERT_TRUST_IS_REVOKED 0x00000004 +#define CERT_TRUST_IS_NOT_SIGNATURE_VALID 0x00000008 +#define CERT_TRUST_IS_NOT_VALID_FOR_USAGE 0x00000010 +#define CERT_TRUST_IS_UNTRUSTED_ROOT 0x00000020 +#define CERT_TRUST_REVOCATION_STATUS_UNKNOWN 0x00000040 +#define CERT_TRUST_IS_CYCLIC 0x00000080 +#define CERT_TRUST_INVALID_EXTENSION 0x00000100 +#define CERT_TRUST_INVALID_POLICY_CONSTRAINTS 0x00000200 +#define CERT_TRUST_INVALID_BASIC_CONSTRAINTS 0x00000400 +#define CERT_TRUST_INVALID_NAME_CONSTRAINTS 0x00000800 +#define CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT 0x00001000 +#define CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT 0x00002000 +#define CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT 0x00004000 +#define CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT 0x00008000 +#define CERT_TRUST_IS_OFFLINE_REVOCATION 0x01000000 +#define CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY 0x02000000 + +#define CERT_TRUST_IS_PARTIAL_CHAIN 0x00001000 +#define CERT_TRUST_CTL_IS_NOT_TIME_VALID 0x00002000 +#define CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID 0x00004000 +#define CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE 0x00008000 + +#define CERT_TRUST_HAS_EXACT_MATCH_ISSUER 0x00000001 +#define CERT_TRUST_HAS_KEY_MATCH_ISSUER 0x00000002 +#define CERT_TRUST_HAS_NAME_MATCH_ISSUER 0x00000004 +#define CERT_TRUST_IS_SELF_SIGNED 0x00000008 + +#define CERT_TRUST_HAS_PREFERRED_ISSUER 0x00000100 +#define CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY 0x00000200 +#define CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS 0x00000400 + +#define CERT_TRUST_IS_COMPLEX_CHAIN 0x00010000 typedef struct _CERT_TRUST_STATUS { DWORD dwErrorStatus; @@ -685,7 +781,7 @@ DWORD cChain; PCERT_SIMPLE_CHAIN *rgpChain; DWORD cLowerQualityChainContext; - PCCERT_CHAIN_CONTEXT *rgbLowerQualityChainContext; + PCCERT_CHAIN_CONTEXT *rgpLowerQualityChainContext; BOOL fHasRevocationFreshnessTime; DWORD dwRevocationFreshnessTime; }; @@ -704,6 +800,52 @@ void *pvExtraPolicyStatus; } CERT_CHAIN_POLICY_STATUS, *PCERT_CHAIN_POLICY_STATUS; +#define CERT_CHAIN_POLICY_BASE ((LPCSTR)1) +#define CERT_CHAIN_POLICY_AUTHENTICODE ((LPCSTR)2) +#define CERT_CHAIN_POLICY_AUTHENTICODE_TS ((LPCSTR)3) +#define CERT_CHAIN_POLICY_SSL ((LPCSTR)4) +#define CERT_CHAIN_POLICY_BASIC_CONSTRAINTS ((LPCSTR)5) +#define CERT_CHAIN_POLICY_NT_AUTH ((LPCSTR)6) +#define CERT_CHAIN_POLICY_MICROSOFT_ROOT ((LPCSTR)7) + +typedef struct _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA { + DWORD cbSize; + DWORD dwRegPolicySettings; + PCMSG_SIGNER_INFO pSignerInfo; +} AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA, + *PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA; + +typedef struct _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS { + DWORD cbSize; + BOOL fCommercial; +} AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS, + *PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS; + +typedef struct _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA { + DWORD cbSize; + DWORD dwRegPolicySettings; + BOOL fCommercial; +} AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA, + *PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA; + +typedef struct _HTTPSPolicyCallbackData { + union { + DWORD cbStruct; + DWORD cbSize; + } DUMMYUNIONNAME; + DWORD dwAuthType; + DWORD fdwChecks; + WCHAR *pwszServerName; +} HTTPSPolicyCallbackData, *PHTTPSPolicyCallbackData; + +#define BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG 0x80000000 +#define BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG 0x40000000 + +#define MICROSOFT_ROOT_CERT_CHAIN_POLICY_ENABLE_TEST_ROOT_FLAG 0x00010000 + +#define USAGE_MATCH_TYPE_AND 0x00000000 +#define USAGE_MATCH_TYPE_OR 0x00000001 + typedef struct _CERT_USAGE_MATCH { DWORD dwType; CERT_ENHKEY_USAGE Usage; @@ -713,6 +855,18 @@ DWORD dwType; CTL_USAGE Usage; } CTL_USAGE_MATCH, *PCTL_USAGE_MATCH; + +#define CERT_CHAIN_REVOCATION_CHECK_END_CERT 0x10000000 +#define CERT_CHAIN_REVOCATION_CHECK_CHAIN 0x20000000 +#define CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 0x40000000 +#define CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY 0x80000000 + +#define CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT 0x08000000 + +#define CERT_CHAIN_DISABLE_PASS1_QUALITY_FILTERING 0x00000040 +#define CERT_CHAIN_RETURN_LOWER_QUALITY_CONTEXTS 0x00000080 +#define CERT_CHAIN_DISABLE_AUTH_ROOT_AUTO_UPDATE 0x00000100 +#define CERT_CHAIN_TIMESTAMP_TIME 0x00000200 typedef struct _CERT_CHAIN_PARA { DWORD cbSize; @@ -1010,6 +1164,81 @@ DWORD cGroup; DWORD *rgcGroupEntry; } CRYPT_URL_INFO, *PCRYPT_URL_INFO; + +#define URL_OID_CERTIFICATE_ISSUER ((LPCSTR)1) +#define URL_OID_CERTIFICATE_CRL_DIST_POINT ((LPCSTR)2) +#define URL_OID_CTL_ISSUER ((LPCSTR)3) +#define URL_OID_CTL_NEXT_UPDATE ((LPCSTR)4) +#define URL_OID_CRL_ISSUER ((LPCSTR)5) +#define URL_OID_CERTIFICATE_FRESHEST_CRL ((LPCSTR)6) +#define URL_OID_CRL_FRESHEST_CRL ((LPCSTR)7) +#define URL_OID_CROSS_CERT_DIST_POINT ((LPCSTR)8) + +typedef HANDLE HCRYPTASYNC, *PHCRYPTASYNC; + +typedef void (WINAPI *PFN_CRYPT_ASYNC_PARAM_FREE_FUNC)(LPSTR pszParamOid, + LPVOID pvParam); + +typedef struct _CRYPT_CREDENTIALS { + DWORD cbSize; + LPCSTR pszCredentialsOid; + LPVOID pvCredentials; +} CRYPT_CREDENTIALS, *PCRYPT_CREDENTIALS; + +#define CREDENTIAL_OID_PASSWORD_CREDENTIALS_A ((LPCSTR)1) +#define CREDENTIAL_OID_PASSWORD_CREDENTIALS_W ((LPCSTR)2) +#define CREDENTIAL_OID_PASSWORD_CREDENTIALS \ + WINELIB_NAME_AW(CREDENTIAL_OID_PASSWORD_CREDENTIALS_) + +typedef struct _CRYPT_PASSWORD_CREDENTIALSA { + DWORD cbSize; + LPSTR pszUsername; + LPSTR pszPassword; +} CRYPT_PASSWORD_CREDENTIALSA, *PCRYPT_PASSWORD_CREDENTIALSA; + +typedef struct _CRYPT_PASSWORD_CREDENTIALSW { + DWORD cbSize; + LPWSTR pszUsername; + LPWSTR pszPassword; +} CRYPT_PASSWORD_CREDENTIALSW, *PCRYPT_PASSWORD_CREDENTIALSW; +#define CRYPT_PASSWORD_CREDENTIALS WINELIB_NAME_AW(CRYPT_PASSWORD_CREDENTIALS) +#define PCRYPT_PASSWORD_CREDENTIALS WINELIB_NAME_AW(PCRYPT_PASSWORD_CREDENTIALS) + +typedef struct _CRYPT_RETRIEVE_AUX_INFO { + DWORD cbSize; + FILETIME *pLastSyncTime; + DWORD dwMaxUrlRetrievalByteCount; +} CRYPT_RETRIEVE_AUX_INFO, *PCRYPT_RETRIEVE_AUX_INFO; + +#define CONTEXT_OID_CREATE_OBJECT_CONTEXT_FUNC "ContextDllCreateObjectContext" + +#define CONTEXT_OID_CERTIFICATE ((LPCSTR)1) +#define CONTEXT_OID_CRL ((LPCSTR)2) +#define CONTEXT_OID_CTL ((LPCSTR)3) +#define CONTEXT_OID_PKCS7 ((LPCSTR)4) +#define CONTEXT_OID_CAPI2_ANY ((LPCSTR)5) + +#define CRYPT_RETRIEVE_MULTIPLE_OBJECTS 0x00000001 +#define CRYPT_CACHE_ONLY_RETRIEVAL 0x00000002 +#define CRYPT_WIRE_ONLY_RETRIEVAL 0x00000004 +#define CRYPT_DONT_CACHE_RESULT 0x00000008 +#define CRYPT_ASYNC_RETRIEVAL 0x00000010 +#define CRYPT_STICKY_CACHE_RETRIEVAL 0x00001000 +#define CRYPT_LDAP_SCOPE_BASE_ONLY_RETRIEVAL 0x00002000 +#define CRYPT_OFFLINE_CHECK_RETRIEVAL 0x00004000 +#define CRYPT_LDAP_INSERT_ENTRY_ATTRIBUTE 0x00008000 +#define CRYPT_LDAP_SIGN_RETRIEVAL 0x00010000 +#define CRYPT_NO_AUTH_RETRIEVAL 0x00020000 +#define CRYPT_LDAP_AREC_EXCLUSIVE_RETRIEVAL 0x00040000 +#define CRYPT_AIA_RETRIEVAL 0x00080000 + +#define CRYPT_VERIFY_CONTEXT_SIGNATURE 0x00000020 +#define CRYPT_VERIFY_DATA_HASH 0x00000040 +#define CRYPT_KEEP_TIME_VALID 0x00000080 +#define CRYPT_DONT_VERIFY_SIGNATURE 0x00000100 +#define CRYPT_DONT_CHECK_TIME_VALIDITY 0x00000200 +#define CRYPT_CHECK_FRESHNESS_TIME_VALIDITY 0x00000400 +#define CRYPT_ACCUMULATIVE_TIMEOUT 0x00000800 /* OID group IDs */ #define CRYPT_HASH_ALG_OID_GROUP_ID 1 @@ -1093,7 +1322,7 @@ #define ALG_SID_MD4 2 #define ALG_SID_MD5 3 #define ALG_SID_SHA 4 -#define ALG_SID_SHA1 CALG_SHA +#define ALG_SID_SHA1 ALG_SID_SHA #define ALG_SID_MAC 5 #define ALG_SID_RIPEMD 6 #define ALG_SID_RIPEMD160 7 @@ -1600,6 +1829,92 @@ 't','i','f','i','c','a','t','e','s',0 }; #endif +#if defined(__GNUC__) +#define CERT_EFSBLOB_REGPATH (const WCHAR[])\ +{'S','o','f','t','w','a','r','e','\\','P','o','l','i','c','i','e','s','\\',\ + 'M','i','c','r','o','s','o','f','t','\\','S','y','s','t','e','m','C','e','r',\ + 't','i','f','i','c','a','t','e','s','\\','E','F','S',0 } +#define CERT_EFSBLOB_VALUE_NAME (const WCHAR[]) {'E','F','S','B','l','o','b',0 } +#elif defined(_MSC_VER) +#define CERT_EFSBLOB_REGPATH CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH L"\\EFS" +#define CERT_EFSBLOB_VALUE_NAME L"EFSBlob" +#else +static const WCHAR CERT_EFSBLOB_REGPATH[] = + {'S','o','f','t','w','a','r','e','\\','P','o','l','i','c','i','e','s','\\', + 'M','i','c','r','o','s','o','f','t','\\','S','y','s','t','e','m','C','e','r', + 't','i','f','i','c','a','t','e','s','\\','E','F','S',0 }; +static const CERT_EFSBLOB_VALUE_NAME[] = { 'E','F','S','B','l','o','b',0 }; +#endif + +#if defined(__GNUC__) +#define CERT_PROT_ROOT_FLAGS_REGPATH (const WCHAR[])\ +{'\\','R','o','o','t','\\','P','r','o','t','e','c','t','e','d','R','o','o','t',\ + 's',0 } +#define CERT_PROT_ROOT_FLAGS_VALUE_NAME (const WCHAR[])\ +{'F','l','a','g','s',0 } +#elif defined(_MSC_VER) +#define CERT_PROT_ROOT_FLAGS_REGPATH L"\\Root\\ProtectedRoots" +#define CERT_PROT_ROOT_FLAGS_VALUE_NAME L"Flags" +#else +static const WCHAR CERT_PROT_ROOT_FLAGS_REGPATH[] = + { '\\','R','o','o','t','\\','P','r','o','t','e','c','t','e','d','R','o','o', + 't','s',0 }; +static const WCHAR CERT_PROT_ROOT_FLAGS_VALUE_NAME[] = {'F','l','a','g','s',0 }; +#endif + +#define CERT_PROT_ROOT_DISABLE_CURRENT_USER_FLAG 0x01 +#define CERT_PROT_ROOT_INHIBIT_ADD_AT_INIT_FLAG 0x02 +#define CERT_PROT_ROOT_INHIBIT_PURGE_LM_FLAG 0x04 +#define CERT_PROT_ROOT_DISABLE_LM_AUTH_FLAG 0x08 +#define CERT_PROT_ROOT_DISABLE_NT_AUTH_REQUIRED_FLAG 0x10 +#define CERT_PROT_ROOT_DISABLE_NOT_DEFINED_NAME_CONSTRAINT_FLAG 0x20 + +#if defined(__GNUC__) +#define CERT_TRUST_PUB_SAFER_GROUP_POLICY_REGPATH (const WCHAR[])\ +{'S','o','f','t','w','a','r','e','\\','P','o','l','i','c','i','e','s','\\',\ + 'M','i','c','r','o','s','o','f','t','\\','S','y','s','t','e','m','C','e','r',\ + 't','i','f','i','c','a','t','e','s','\\','T','r','u','s','t','e','d',\ + 'P','u','b','l','i','s','h','e','r','\\','S','a','f','e','r',0 } +#elif defined(_MSC_VER) +#define CERT_TRUST_PUB_SAFER_GROUP_POLICY_REGPATH \ + CERT_GROUP_POLICY_SYSTEM_STORE_REGPATH L"\\TrustedPublisher\\Safer" +#else +static const WCHAR CERT_TRUST_PUB_SAFER_GROUP_POLICY_REGPATH[] = + {'S','o','f','t','w','a','r','e','\\','P','o','l','i','c','i','e','s','\\', + 'M','i','c','r','o','s','o','f','t','\\','S','y','s','t','e','m','C','e','r', + 't','i','f','i','c','a','t','e','s','\\','T','r','u','s','t','e','d', + 'P','u','b','l','i','s','h','e','r','\\','S','a','f','e','r',0 }; +#endif + +#if defined(__GNUC__) +#define CERT_TRUST_PUB_SAFER_LOCAL_MACHINE_REGPATH (const WCHAR[])\ +{'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',\ + 'S','y','s','t','e','m','C','e','r','t','i','f','i','c','a','t','e','s','\\',\ + 'T','r','u','s','t','e','d','P','u','b','l','i','s','h','e','r','\\',\ + 'S','a','f','e','r',0 } +#define CERT_TRUST_PUB_AUTHENTICODE_FLAGS_VALUE_NAME (const WCHAR[])\ +{'A','u','t','h','e','n','t','i','c','o','d','e','F','l','a','g','s',0 }; +#elif defined(_MSC_VER) +#define CERT_TRUST_PUB_SAFER_LOCAL_MACHINE_REGPATH \ + CERT_LOCAL_MACHINE_SYSTEM_STORE_REGPATH L"\\TrustedPublisher\\Safer" +#define CERT_TRUST_PUB_AUTHENTICODE_FLAGS_VALUE_NAME L"AuthenticodeFlags" +#else +static const WCHAR CERT_TRUST_PUB_SAFER_LOCAL_MACHINE_REGPATH[] = + {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', + 'S','y','s','t','e','m','C','e','r','t','i','f','i','c','a','t','e','s','\\', + 'T','r','u','s','t','e','d','P','u','b','l','i','s','h','e','r','\\', + 'S','a','f','e','r',0 }; +static const WCHAR CERT_TRUST_PUB_AUTHENTICODE_FLAGS_VALUE_NAME[] = + { 'A','u','t','h','e','n','t','i','c','o','d','e','F','l','a','g','s',0 }; +#endif + +#define CERT_TRUST_PUB_ALLOW_END_USER_TRUST 0x00000000 +#define CERT_TRUST_PUB_ALLOW_MACHINE_ADMIN_TRUST 0x00000001 +#define CERT_TRUST_PUB_ALLOW_ENTERPRISE_ADMIN_TRUST 0x00000002 +#define CERT_TRUST_PUB_ALLOW_TRUST_MASK 0x00000003 +#define CERT_TRUST_PUB_CHECK_PUBLISHER_REV_FLAG 0x00000100 +#define CERT_TRUST_PUB_CHECK_TIMESTAMP_REV_FLAG 0x00000200 + /* flags for CertOpenStore dwFlags */ #define CERT_STORE_NO_CRYPT_RELEASE_FLAG 0x00000001 #define CERT_STORE_SET_LOCALIZED_NAME_FLAG 0x00000002 @@ -1616,6 +1931,15 @@ #define CERT_STORE_CREATE_NEW_FLAG 0x00002000 #define CERT_STORE_OPEN_EXISTING_FLAG 0x00004000 #define CERT_STORE_READONLY_FLAG 0x00008000 + +#define CERT_REGISTRY_STORE_REMOTE_FLAG 0x00010000 +#define CERT_REGISTRY_STORE_SERIALIZED_FLAG 0x00020000 +#define CERT_REGISTRY_STORE_ROAMING_FLAG 0x00040000 +#define CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG 0x00080000 +#define CERT_REGISTRY_STORE_LM_GPT_FLAG 0x01000000 +#define CERT_REGISTRY_STORE_CLIENT_GPT_FLAG 0x80000000 + +#define CERT_FILE_STORE_COMMIT_ENABLE_FLAG 0x00010000 /* dwAddDisposition */ #define CERT_STORE_ADD_NEW 1 @@ -2270,6 +2594,9 @@ #ifndef szOID_SERVER_GATED_CRYPTO #define szOID_SERVER_GATED_CRYPTO "1.3.6.1.4.1.311.10.3.3" #endif +#ifndef szOID_SGC_NETSCAPE +#define szOID_SGC_NETSCAPE "2.16.840.1.113730.4.1" +#endif #define szOID_KP_EFS "1.3.6.1.4.1.311.10.3.4" #define szOID_EFS_RECOVERY "1.3.6.1.4.1.311.10.3.4.1" #define szOID_WHQL_CRYPTO "1.3.6.1.4.1.311.10.3.5" @@ -2554,6 +2881,91 @@ #define CERT_NAME_ISSUER_FLAG 0x00000001 #define CERT_NAME_DISABLE_IE4_UTF8_FLAG 0x00010000 +/* CryptFormatObject flags */ +#define CRYPT_FORMAT_STR_MULTI_LINE 0x0001 +#define CRYPT_FORMAT_STR_NO_HEX 0x0010 + +#define CRYPT_FORMAT_SIMPLE 0x0001 +#define CRYPT_FORMAT_X509 0x0002 +#define CRYPT_FORMAT_OID 0x0004 +#define CRYPT_FORMAT_RDN_SEMICOLON 0x0100 +#define CRYPT_FORMAT_RDN_CRLF 0x0200 +#define CRYPT_FORMAT_RDN_UNQUOTE 0x0400 +#define CRYPT_FORMAT_RDN_REVERSE 0x0800 + +#define CRYPT_FORMAT_COMMA 0x1000 +#define CRYPT_FORMAT_SEMICOLON CRYPT_FORMAT_RDN_SEMICOLON +#define CRYPT_FORMAT_CRLF CRYPT_FORMAT_RDN_CRLF + +/* CryptQueryObject types and flags */ +#define CERT_QUERY_OBJECT_FILE 1 +#define CERT_QUERY_OBJECT_BLOB 2 + +#define CERT_QUERY_CONTENT_CERT 1 +#define CERT_QUERY_CONTENT_CTL 2 +#define CERT_QUERY_CONTENT_CRL 3 +#define CERT_QUERY_CONTENT_SERIALIZED_STORE 4 +#define CERT_QUERY_CONTENT_SERIALIZED_CERT 5 +#define CERT_QUERY_CONTENT_SERIALIZED_CTL 6 +#define CERT_QUERY_CONTENT_SERIALIZED_CRL 7 +#define CERT_QUERY_CONTENT_PKCS7_SIGNED 8 +#define CERT_QUERY_CONTENT_PKCS7_UNSIGNED 9 +#define CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED 10 +#define CERT_QUERY_CONTENT_PKCS10 11 +#define CERT_QUERY_CONTENT_PFX 12 +#define CERT_QUERY_CONTENT_CERT_PAIR 13 + +#define CERT_QUERY_CONTENT_FLAG_CERT (1 << CERT_QUERY_CONTENT_CERT) +#define CERT_QUERY_CONTENT_FLAG_CTL (1 << CERT_QUERY_CONTENT_CTL) +#define CERT_QUERY_CONTENT_FLAG_CRL (1 << CERT_QUERY_CONTENT_CRL) +#define CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE \ + (1 << CERT_QUERY_CONTENT_SERIALIZED_STORE) +#define CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT \ + (1 << CERT_QUERY_CONTENT_SERIALIZED_CERT) +#define CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL \ + (1 << CERT_QUERY_CONTENT_SERIALIZED_CTL) +#define CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL \ + (1 << CERT_QUERY_CONTENT_SERIALIZED_CRL) +#define CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED \ + (1 << CERT_QUERY_CONTENT_PKCS7_SIGNED) +#define CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED \ + (1 << CERT_QUERY_CONTENT_PKCS7_UNSIGNED) +#define CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED \ + (1 << CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED) +#define CERT_QUERY_CONTENT_FLAG_PKCS10 (1 << CERT_QUERY_CONTENT_PKCS10) +#define CERT_QUERY_CONTENT_FLAG_PFX (1 << CERT_QUERY_CONTENT_PFX) +#define CERT_QUERY_CONTENT_FLAG_CERT_PAIR (1 << CERT_QUERY_CONTENT_CERT_PAIR) + +#define CERT_QUERY_CONTENT_FLAG_ALL \ + CERT_QUERY_CONTENT_FLAG_CERT | \ + CERT_QUERY_CONTENT_FLAG_CTL | \ + CERT_QUERY_CONTENT_FLAG_CRL | \ + CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE | \ + CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT | \ + CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL | \ + CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL | \ + CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | \ + CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED | \ + CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED | \ + CERT_QUERY_CONTENT_FLAG_PKCS10 | \ + CERT_QUERY_CONTENT_FLAG_PFX | \ + CERT_QUERY_CONTENT_FLAG_CERT_PAIR + +#define CERT_QUERY_FORMAT_BINARY 1 +#define CERT_QUERY_FORMAT_BASE64_ENCODED 2 +#define CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED 3 + +#define CERT_QUERY_FORMAT_FLAG_BINARY (1 << CERT_QUERY_FORMAT_BINARY) +#define CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED \ + (1 << CERT_QUERY_FORMAT_BASE64_ENCODED) +#define CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED \ + (1 << CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED) + +#define CERT_QUERY_FORMAT_FLAG_ALL \ + CERT_QUERY_FORMAT_FLAG_BINARY | \ + CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED | \ + CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED \ + #define CERT_SET_KEY_PROV_HANDLE_PROP_ID 0x00000001 #define CERT_SET_KEY_CONTEXT_PROP_ID 0x00000001 @@ -2565,6 +2977,32 @@ #define CRYPT_ACQUIRE_USE_PROV_INFO_FLAG 0x00000002 #define CRYPT_ACQUIRE_COMPARE_KEY_FLAG 0x00000004 #define CRYPT_ACQUIRE_SILENT_FLAG 0x00000040 + +/* Chain engines and chains */ +typedef HANDLE HCERTCHAINENGINE; +#define HCCE_CURRENT_USER ((HCERTCHAINENGINE)NULL) +#define HCCE_LOCAL_MACHINE ((HCERTCHAINENGINE)1) + +#define CERT_CHAIN_CACHE_END_CERT 0x00000001 +#define CERT_CHAIN_THREAD_STORE_SYNC 0x00000002 +#define CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL 0x00000004 +#define CERT_CHAIN_USE_LOCAL_MACHINE_STORE 0x00000008 +#define CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE 0x00000010 +#define CERT_CHAIN_ENABLE_SHARE_STORE 0x00000020 + +typedef struct _CERT_CHAIN_ENGINE_CONFIG +{ + DWORD cbSize; + HCERTSTORE hRestrictedRoot; + HCERTSTORE hRestrictedTrust; + HCERTSTORE hRestrictedOther; + DWORD cAdditionalStore; + HCERTSTORE *rghAdditionalStore; + DWORD dwFlags; + DWORD dwUrlRetrievalTimeout; + DWORD MaximumCachedCertificates; + DWORD CycleDetectionModulus; +} CERT_CHAIN_ENGINE_CONFIG, *PCERT_CHAIN_ENGINE_CONFIG; /* function declarations */ /* advapi32.dll */ @@ -2614,28 +3052,28 @@ DWORD dwFlags, LPWSTR pszProvName, DWORD *pcbProvName); #define CryptGetDefaultProvider WINELIB_NAME_AW(CryptGetDefaultProvider) BOOL WINAPI CryptGetUserKey (HCRYPTPROV hProv, DWORD dwKeySpec, HCRYPTKEY *phUserKey); -BOOL WINAPI CryptHashData (HCRYPTHASH hHash, const BYTE *pbData, DWORD dwDataLen, DWORD dwFlags); +BOOL WINAPI CryptHashData (HCRYPTHASH hHash, CONST BYTE *pbData, DWORD dwDataLen, DWORD dwFlags); BOOL WINAPI CryptHashSessionKey (HCRYPTHASH hHash, HCRYPTKEY hKey, DWORD dwFlags); -BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, BYTE *pbData, DWORD dwDataLen, +BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, CONST BYTE *pbData, DWORD dwDataLen, HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY *phKey); BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags); -BOOL WINAPI CryptSetHashParam (HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData, DWORD dwFlags); -BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData, DWORD dwFlags); +BOOL WINAPI CryptSetHashParam (HCRYPTHASH hHash, DWORD dwParam, CONST BYTE *pbData, DWORD dwFlags); +BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, CONST BYTE *pbData, DWORD dwFlags); BOOL WINAPI CryptSetProviderA (LPCSTR pszProvName, DWORD dwProvType); BOOL WINAPI CryptSetProviderW (LPCWSTR pszProvName, DWORD dwProvType); #define CryptSetProvider WINELIB_NAME_AW(CryptSetProvider) BOOL WINAPI CryptSetProviderExA (LPCSTR pszProvName, DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags); BOOL WINAPI CryptSetProviderExW (LPCWSTR pszProvName, DWORD dwProvType, DWORD *pdwReserved, DWORD dwFlags); #define CryptSetProviderEx WINELIB_NAME_AW(CryptSetProviderEx) -BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData, DWORD dwFlags); +BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, CONST BYTE *pbData, DWORD dwFlags); BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescription, DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen); BOOL WINAPI CryptSignHashW (HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescription, DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen); #define CryptSignHash WINELIB_NAME_AW(CryptSignHash) -BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, BYTE *pbSignature, DWORD dwSigLen, +BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, CONST BYTE *pbSignature, DWORD dwSigLen, HCRYPTKEY hPubKey, LPCSTR sDescription, DWORD dwFlags); -BOOL WINAPI CryptVerifySignatureW (HCRYPTHASH hHash, BYTE *pbSignature, DWORD dwSigLen, +BOOL WINAPI CryptVerifySignatureW (HCRYPTHASH hHash, CONST BYTE *pbSignature, DWORD dwSigLen, HCRYPTKEY hPubKey, LPCWSTR sDescription, DWORD dwFlags); #define CryptVerifySignature WINELIB_NAME_AW(CryptVerifySignature) @@ -2657,6 +3095,13 @@ DWORD cchString, DWORD dwFlags, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags); #define CryptStringToBinary WINELIB_NAME_AW(CryptStringToBinary) + +BOOL WINAPI CryptCreateAsyncHandle(DWORD dwFlags, PHCRYPTASYNC phAsync); +BOOL WINAPI CryptSetAsyncParam(HCRYPTASYNC hAsync, LPSTR pszParamOid, + LPVOID pvParam, PFN_CRYPT_ASYNC_PARAM_FREE_FUNC pfnFree); +BOOL WINAPI CryptGetAsyncParam(HCRYPTASYNC hAsync, LPSTR pszParamOid, + LPVOID *ppvParam, PFN_CRYPT_ASYNC_PARAM_FREE_FUNC *ppfnFree); +BOOL WINAPI CryptCloseAsyncHandle(HCRYPTASYNC hAsync); BOOL WINAPI CryptRegisterDefaultOIDFunction(DWORD,LPCSTR,DWORD,LPCWSTR); BOOL WINAPI CryptRegisterOIDFunction(DWORD,LPCSTR,LPCSTR,LPCWSTR,LPCSTR); @@ -2733,6 +3178,23 @@ void WINAPI CertRemoveStoreFromCollection(HCERTSTORE hCollectionStore, HCERTSTORE hSiblingStore); +BOOL WINAPI CertCreateCertificateChainEngine(PCERT_CHAIN_ENGINE_CONFIG pConfig, + HCERTCHAINENGINE *phChainEngine); + +BOOL WINAPI CertResyncCertificateChainEngine(HCERTCHAINENGINE hChainEngine); + +void WINAPI CertFreeCertificateChainEngine(HCERTCHAINENGINE hChainEngine); + +BOOL WINAPI CertGetCertificateChain(HCERTCHAINENGINE hChainEngine, + PCCERT_CONTEXT pCertContext, LPFILETIME pTime, HCERTSTORE hAdditionalStore, + PCERT_CHAIN_PARA pChainPara, DWORD dwFlags, LPVOID pvReserved, + PCCERT_CHAIN_CONTEXT *ppChainContext); + +PCCERT_CHAIN_CONTEXT WINAPI CertDuplicateCertificateChain( + PCCERT_CHAIN_CONTEXT pChainContext); + +void WINAPI CertFreeCertificateChain(PCCERT_CHAIN_CONTEXT pChainContext); + PCCERT_CHAIN_CONTEXT WINAPI CertFindChainInStore(HCERTSTORE hCertStore, DWORD dwCertEncodingType, DWORD dwFindFlags, DWORD dwFindType, const void *pvFindPara, PCCERT_CHAIN_CONTEXT pPrevChainContext); @@ -2835,6 +3297,8 @@ PCRYPT_INTEGER_BLOB pInt2); BOOL WINAPI CertComparePublicKeyInfo(DWORD dwCertEncodingType, PCERT_PUBLIC_KEY_INFO pPublicKey1, PCERT_PUBLIC_KEY_INFO pPublicKey2); +DWORD WINAPI CertGetPublicKeyLength(DWORD dwCertEncodingType, + PCERT_PUBLIC_KEY_INFO pPublicKey); const void *CertCreateContext(DWORD dwContextType, DWORD dwEncodingType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, @@ -2923,9 +3387,17 @@ const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, PCRYPT_DECODE_PARA pDecodePara, void *pvStructInfo, DWORD *pcbStructInfo); +BOOL WINAPI CryptFormatObject(DWORD dwCertEncodingType, DWORD dwFormatType, + DWORD dwFormatStrType, void *pFormatStruct, LPCSTR lpszStructType, + const BYTE *pbEncoded, DWORD cbEncoded, void *pbFormat, DWORD *pcbFormat); + BOOL WINAPI CryptHashCertificate(HCRYPTPROV hCryptProv, ALG_ID Algid, DWORD dwFlags, const BYTE *pbEncoded, DWORD cbEncoded, BYTE *pbComputedHash, DWORD *pcbComputedHash); + +BOOL WINAPI CryptHashPublicKeyInfo(HCRYPTPROV hCryptProv, ALG_ID Algid, + DWORD dwFlags, DWORD dwCertEncodingType, PCERT_PUBLIC_KEY_INFO pInfo, + BYTE *pbComputedHash, DWORD *pcbComputedHash); BOOL WINAPI CryptHashToBeSigned(HCRYPTPROV hCryptProv, DWORD dwCertEncodingType, const BYTE *pbEncoded, DWORD cbEncoded, BYTE *pbComputedHash, @@ -2976,6 +3448,17 @@ PCRL_INFO pCrlInfo); LONG WINAPI CertVerifyTimeValidity(LPFILETIME pTimeToVerify, PCERT_INFO pCertInfo); +BOOL WINAPI CertVerifyValidityNesting(PCERT_INFO pSubjectInfo, + PCERT_INFO pIssuerInfo); + +BOOL WINAPI CertVerifyCTLUsage(DWORD dwEncodingType, DWORD dwSubjectType, + void *pvSubject, PCTL_USAGE pSubjectUsage, DWORD dwFlags, + PCTL_VERIFY_USAGE_PARA pVerifyUsagePara, + PCTL_VERIFY_USAGE_STATUS pVerifyUsageStatus); + +BOOL WINAPI CertVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType, + DWORD cContext, void *rgpvContext[], DWORD dwFlags, + PCERT_REVOCATION_PARA pRevPara, PCERT_REVOCATION_STATUS pRevStatus); BOOL WINAPI CryptExportPublicKeyInfo(HCRYPTPROV hCryptProv, DWORD dwKeySpec, DWORD dwCertEncodingType, PCERT_PUBLIC_KEY_INFO pInfo, DWORD *pcbInfo); @@ -3096,6 +3579,16 @@ PCRYPT_URL_ARRAY pUrlArray, DWORD *pcbUrlArray, PCRYPT_URL_INFO pUrlInfo, DWORD *pcbUrlInfo, LPVOID pvReserved); +BOOL WINAPI CryptRetrieveObjectByUrlA(LPCSTR pszURL, LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, DWORD dwTimeout, LPVOID *ppvObject, + HCRYPTASYNC hAsyncRetrieve, PCRYPT_CREDENTIALS pCredentials, LPVOID pvVerify, + PCRYPT_RETRIEVE_AUX_INFO pAuxInfo); +BOOL WINAPI CryptRetrieveObjectByUrlW(LPCWSTR pszURL, LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, DWORD dwTimeout, LPVOID *ppvObject, + HCRYPTASYNC hAsyncRetrieve, PCRYPT_CREDENTIALS pCredentials, LPVOID pvVerify, + PCRYPT_RETRIEVE_AUX_INFO pAuxInfo); +#define CryptRetrieveObjectByUrl WINELIB_NAME_AW(CryptRetrieveObjectByUrl) + #ifdef __cplusplus } #endif Modified: trunk/reactos/include/psdk/wintrust.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wintrust.h?re…
============================================================================== --- trunk/reactos/include/psdk/wintrust.h (original) +++ trunk/reactos/include/psdk/wintrust.h Thu Apr 26 17:37:38 2007 @@ -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 */ #ifndef __WINE_WINTRUST_H @@ -76,6 +76,23 @@ FILETIME* psftVerifyAsOf; } WINTRUST_CERT_INFO, *PWINTRUST_CERT_INFO; +#define WTCI_DONT_OPEN_STORES 0x00000001 +#define WTCI_OPEN_ONLY_ROOT 0x00000002 + +/* dwUIChoice */ +#define WTD_UI_ALL 1 +#define WTD_UI_NONE 2 +#define WTD_UI_NOBAD 3 +#define WTD_UI_NOGOOD 4 +/* fdwRevocationChecks */ +#define WTD_REVOKE_NONE 0 +#define WTD_REVOKE_WHOLECHAIN 1 +/* dwUnionChoice */ +#define WTD_CHOICE_FILE 1 +#define WTD_CHOICE_CATALOG 2 +#define WTD_CHOICE_BLOB 3 +#define WTD_CHOICE_SIGNER 4 +#define WTD_CHOICE_CERT 5 typedef struct _WINTRUST_DATA { @@ -101,6 +118,28 @@ DWORD dwUIContext; } WINTRUST_DATA, *PWINTRUST_DATA; +#define WTD_STATEACTION_IGNORE 0 +#define WTD_STATEACTION_VERIFY 1 +#define WTD_STATEACTION_CLOSE 2 +#define WTD_STATEACTION_AUTO_CACHE 3 +#define WTD_STATEACTION_AUTO_CACHE_FLUSH 4 + +#define WTD_PROV_FLAGS_MASK 0x0000ffff +#define WTD_USE_IE4_TRUST_FLAG 0x00000001 +#define WTD_NO_IE4_CHAIN_FLAG 0x00000002 +#define WTD_NO_POLICY_USAGE_FLAG 0x00000004 +#define WTD_REVOCATION_CHECK_NONE 0x00000010 +#define WTD_REVOCATION_CHECK_END_CERT 0x00000020 +#define WTD_REVOCATION_CHECK_CHAIN 0x00000040 +#define WTD_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT 0x00000080 +#define WTD_SAFER_FLAG 0x00000100 +#define WTD_HASH_ONLY_FLAG 0x00000200 +#define WTD_USE_DEFAULT_OSVER_CHECK 0x00000400 +#define WTD_LIFETIME_SIGNING_FLAG 0x00000800 + +#define WTD_UICONTEXT_EXECUTE 0 +#define WTD_UICONTEXT_INSTALL 1 + typedef struct _CRYPT_TRUST_REG_ENTRY { DWORD cbStruct; @@ -120,6 +159,15 @@ CRYPT_TRUST_REG_ENTRY sTestPolicyProvider; CRYPT_TRUST_REG_ENTRY sCleanupProvider; } CRYPT_REGISTER_ACTIONID, *PCRYPT_REGISTER_ACTIONID; + +typedef struct _CRYPT_PROVIDER_REGDEFUSAGE +{ + DWORD cbStruct; + GUID *pgActionID; + WCHAR *pwszDllName; + char *pwszLoadCallbackDataFunctionName; + char *pwszFreeCallbackDataFunctionName; +} CRYPT_PROVIDER_REGDEFUSAGE, *PCRYPT_PROVIDER_REGDEFUSAGE; typedef struct _CRYPT_PROVUI_DATA { DWORD cbStruct; @@ -283,14 +331,40 @@ #include <poppack.h> +#define WTPF_TRUSTTEST 0x00000020 +#define WTPF_TESTCANBEVALID 0x00000080 +#define WTPF_IGNOREEXPIRATION 0x00000100 +#define WTPF_IGNOREREVOKATION 0x00000200 +#define WTPF_OFFLINEOK_IND 0x00000400 +#define WTPF_OFFLINEOK_COM 0x00000800 +#define WTPF_OFFLINEOKNBU_IND 0x00001000 +#define WTPF_OFFLINEOKNBU_COM 0x00002000 +#define WTPF_VERIFY_V1_OFF 0x00010000 +#define WTPF_IGNOREREVOCATIONONTS 0x00020000 +#define WTPF_ALLOWONLYPERTRUST 0x00040000 + +#define WT_ADD_ACTION_ID_RET_RESULT_FLAG 1 #ifdef __cplusplus extern "C" { #endif +#if defined(__GNUC__) +#define WT_PROVIDER_CERTTRUST_FUNCTION (const WCHAR []) \ + {'W','i','n','t','r','u','s','t','C','e','r','t','i','f','i','c','a','t','e','T','r','u','s','t', 0} +#elif defined(_MSC_VER) +#define WT_PROVIDER_CERTTRUST_FUNCTION L"WintrustCertificateTrust" +#else +static const WCHAR WT_PROVIDER_CERTTRUST_FUNCTION[] = + {'W','i','n','t','r','u','s','t','C','e','r','t','i','f','i','c','a','t','e','T','r','u','s','t', 0}; +#endif + BOOL WINAPI WintrustAddActionID(GUID*,DWORD,CRYPT_REGISTER_ACTIONID*); +BOOL WINAPI WintrustRemoveActionID(GUID*); +BOOL WINAPI WintrustLoadFunctionPointers(GUID*,CRYPT_PROVIDER_FUNCTIONS*); +BOOL WINAPI WintrustAddDefaultForUsage(const char*,CRYPT_PROVIDER_REGDEFUSAGE*); void WINAPI WintrustGetRegPolicyFlags(DWORD*); -LONG WINAPI WinVerifyTrust(HWND,GUID*,WINTRUST_DATA*); +LONG WINAPI WinVerifyTrust(HWND,GUID*,LPVOID); HRESULT WINAPI WinVerifyTrustEx(HWND,GUID*,WINTRUST_DATA*); CRYPT_PROVIDER_SGNR * WINAPI WTHelperGetProvSignerFromChain( @@ -298,6 +372,37 @@ DWORD idxCounterSigner); CRYPT_PROVIDER_DATA * WINAPI WTHelperProvDataFromStateData(HANDLE hStateData); +#define SPC_INDIRECT_DATA_OBJID "1.3.6.1.4.1.311.2.1.4" +#define SPC_SP_AGENCY_INFO_OBJID "1.3.6.1.4.1.311.2.1.10" +#define SPC_STATEMENT_TYPE_OBJID "1.3.6.1.4.1.311.2.1.11" +#define SPC_SP_OPUS_INFO_OBJID "1.3.6.1.4.1.311.2.1.12" +#define SPC_PE_IMAGE_DATA_OBJID "1.3.6.1.4.1.311.2.1.15" +#define SPC_JAVA_CLASS_DATA_OBJID "1.3.6.1.4.1.311.2.1.20" +#define SPC_CAB_DATA_OBJID "1.3.6.1.4.1.311.2.1.25" +#define SPC_MINIMAL_CRITERIA_OBJID "1.3.6.1.4.1.311.2.1.26" +#define SPC_FINANCIAL_CRITERIA_OBJID "1.3.6.1.4.1.311.2.1.27" +#define SPC_LINK_OBJID "1.3.6.1.4.1.311.2.1.28" +#define SPC_SIGINFO_OBJID "1.3.6.1.4.1.311.2.1.30" +#define CAT_NAMEVALUE_OBJID "1.3.6.1.4.1.311.12.2.1" +#define CAT_MEMBERINFO_OBJID "1.3.6.1.4.1.311.12.2.2" + +#define SPC_SP_AGENCY_INFO_STRUCT ((LPCSTR) 2000) +#define SPC_MINIMAL_CRITERIA_STRUCT ((LPCSTR) 2001) +#define SPC_FINANCIAL_CRITERIA_STRUCT ((LPCSTR) 2002) +#define SPC_INDIRECT_DATA_CONTENT_STRUCT ((LPCSTR) 2003) +#define SPC_PE_IMAGE_DATA_STRUCT ((LPCSTR) 2004) +#define SPC_LINK_STRUCT ((LPCSTR) 2005) +#define SPC_STATEMENT_TYPE_STRUCT ((LPCSTR) 2006) +#define SPC_SP_OPUS_INFO_STRUCT ((LPCSTR) 2007) +#define SPC_CAB_DATA_STRUCT ((LPCSTR) 2008) +#define SPC_JAVA_CLASS_DATA_STRUCT ((LPCSTR) 2009) +#define SPC_SIGINFO_STRUCT ((LPCSTR) 2130) +#define CAT_NAMEVALUE_STRUCT ((LPCSTR) 2221) +#define CAT_MEMBERINFO_STRUCT ((LPCSTR) 2222) + +#define WIN_SPUB_ACTION_PUBLISHED_SOFTWARE \ + { 0x64b9d180, 0x8da2, 0x11cf, { 0x87,0x36,0x00,0xaa,0x00,0xa4,0x85,0xeb }} + #ifdef __cplusplus } #endif
17 years, 9 months
1
0
0
0
[winesync] 26517: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Apr 26 15:37:49 2007 New Revision: 26517 URL:
http://svn.reactos.org/svn/reactos?rev=26517&view=rev
Log: Autosyncing with Wine HEAD Modified: trunk/reactos/dll/win32/clusapi/clusapi.c (props changed) trunk/reactos/dll/win32/clusapi/clusapi.rbuild (contents, props changed) trunk/reactos/dll/win32/clusapi/clusapi.spec (props changed) Propchange: trunk/reactos/dll/win32/clusapi/clusapi.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/clusapi/clusapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/clusapi/clusapi.…
============================================================================== --- trunk/reactos/dll/win32/clusapi/clusapi.rbuild (original) +++ trunk/reactos/dll/win32/clusapi/clusapi.rbuild Thu Apr 26 15:37:49 2007 @@ -1,17 +1,16 @@ -<module name="clusapi" type="win32dll" baseaddress="${BASEADDRESS_CLUSAPI}" installbase="system32" installname="clusapi2.dll" allowwarnings="false"> - <importlibrary definition="clusapi.spec.def" /> - <include base="clusapi">.</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>user32</library> - <library>kernel32</library> - <library>ntdll</library> - <file>clusapi.c</file> - <file>clusapi.spec</file> -</module> +<module name="clusapi" type="win32dll" baseaddress="${BASEADDRESS_CLUSAPI}" installbase="system32" installname="clusapi.dll" allowwarnings="true"> + <importlibrary definition="clusapi.spec.def" /> + <include base="clusapi">.</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>kernel32</library> + <library>ntdll</library> + <file>clusapi.c</file> + <file>clusapi.spec</file> +</module> Propchange: trunk/reactos/dll/win32/clusapi/clusapi.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/dll/win32/clusapi/clusapi.spec ------------------------------------------------------------------------------ svn:eol-style = native
17 years, 9 months
1
0
0
0
[hpoussin] 26516: Add clusapi.dll to bootcd, and set it as autosynced in README.WINE
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Apr 26 15:36:30 2007 New Revision: 26516 URL:
http://svn.reactos.org/svn/reactos?rev=26516&view=rev
Log: Add clusapi.dll to bootcd, and set it as autosynced in README.WINE Modified: trunk/reactos/boot/bootdata/packages/reactos.dff trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff Thu Apr 26 15:36:30 2007 @@ -146,13 +146,14 @@ dll\win32\cabinet\cabinet.dll 1 dll\win32\cards\cards.dll 1 dll\win32\cfgmgr32\cfgmgr32.dll 1 +dll\win32\clusapi\clusapi.dll 1 dll\win32\console\console.dll 1 dll\win32\comctl32\comctl32.dll 1 dll\win32\comdlg32\comdlg32.dll 1 dll\win32\crtdll\crtdll.dll 1 dll\win32\crypt32\crypt32.dll 1 dll\win32\cryptdll\cryptdll.dll 1 -dll\win32\cryptui\cryptui.dll 1 +dll\win32\cryptui\cryptui.dll 1 dll\win32\dbghelp\dbghelp.dll 1 dll\win32\devmgr\devmgr.dll 1 dll\win32\dhcpcsvc\dhcpcsvc.dll 1 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 Thu Apr 26 15:36:30 2007 @@ -40,6 +40,7 @@ reactos/dll/win32/advpack # Autosync reactos/dll/win32/avifil32 # Autosync reactos/dll/win32/cabinet # Autosync +reactos/dll/win32/clusapi # Autosync reactos/dll/win32/comctl32 # Autosync reactos/dll/win32/comdlg32 # Synced to Wine-0_9_16 reactos/dll/win32/crypt32 # Autosync
17 years, 9 months
1
0
0
0
[gedmurphy] 26515: add clusapi base address
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Thu Apr 26 15:32:51 2007 New Revision: 26515 URL:
http://svn.reactos.org/svn/reactos?rev=26515&view=rev
Log: add clusapi base address Modified: trunk/reactos/baseaddress.rbuild Modified: trunk/reactos/baseaddress.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/baseaddress.rbuild?rev=265…
============================================================================== --- trunk/reactos/baseaddress.rbuild (original) +++ trunk/reactos/baseaddress.rbuild Thu Apr 26 15:32:51 2007 @@ -106,6 +106,7 @@ <property name="BASEADDRESS_GDIPLUS" value="0x76a00000" /> <property name="BASEADDRESS_WINTRUST" value="0x76c30000" /> <property name="BASEADDRESS_IMAGEHLP" value="0x76c90000" /> + <property name="BASEADDRESS_CLUSAPI" value="0x76d10000" /> <property name="BASEADDRESS_DHCPCSVC" value="0x76d80000" /> <property name="BASEADDRESS_FMIFS" value="0x76df0000" /> <property name="BASEADDRESS_MSVFW32" value="0x77400000" />
17 years, 9 months
1
0
0
0
[gedmurphy] 26514: - add a minimal clusapi.h. part 2 of clusapi - this header will need a lot more work.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Thu Apr 26 15:32:13 2007 New Revision: 26514 URL:
http://svn.reactos.org/svn/reactos?rev=26514&view=rev
Log: - add a minimal clusapi.h. part 2 of clusapi - this header will need a lot more work. Added: trunk/reactos/include/psdk/clusapi.h Added: trunk/reactos/include/psdk/clusapi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/clusapi.h?rev…
============================================================================== --- trunk/reactos/include/psdk/clusapi.h (added) +++ trunk/reactos/include/psdk/clusapi.h Thu Apr 26 15:32:13 2007 @@ -1,0 +1,19 @@ + +#ifndef _CLUSAPI_H +#define _CLUSAPI_H + +#ifdef __cplusplus +extern "C" { +#endif + +DWORD +WINAPI +GetNodeClusterState( + IN LPCWSTR lpszNodeName, + OUT DWORD *pdwClusterState + ); + +#ifdef __cplusplus +} +#endif +#endif // _CLUSAPI_H
17 years, 9 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
38
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Results per page:
10
25
50
100
200