winehq.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
February
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2007
----- 2025 -----
February 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1085 discussions
Start a n
N
ew thread
Paul Vriens : cabinet/tests: Use GetModuleHandleA instead of LoadLibraryA.
by Alexandre Julliard
15 Aug '07
15 Aug '07
Module: wine Branch: master Commit: 85867205e5ce945c71531a7c703848b386117c66 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=85867205e5ce945c71531a7c7…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Aug 14 19:07:45 2007 +0200 cabinet/tests: Use GetModuleHandleA instead of LoadLibraryA. --- dlls/cabinet/tests/extract.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/cabinet/tests/extract.c b/dlls/cabinet/tests/extract.c index ad2fbb5..ef441c4 100644 --- a/dlls/cabinet/tests/extract.c +++ b/dlls/cabinet/tests/extract.c @@ -62,12 +62,9 @@ CHAR CURR_DIR[MAX_PATH]; static void init_function_pointers(void) { - hCabinet = LoadLibraryA("cabinet.dll"); + hCabinet = GetModuleHandleA("cabinet.dll"); - if (hCabinet) - { - pExtract = (void *)GetProcAddress(hCabinet, "Extract"); - } + pExtract = (void *)GetProcAddress(hCabinet, "Extract"); } /* creates a file with the specified name for tests */
1
0
0
0
Paul Vriens : advapi32/tests: Use GetModuleHandleA and skip.
by Alexandre Julliard
15 Aug '07
15 Aug '07
Module: wine Branch: master Commit: fc436b92e5cf9efbcb51f3f27b0302e785f3ffc7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc436b92e5cf9efbcb51f3f27…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Tue Aug 14 17:36:33 2007 +0200 advapi32/tests: Use GetModuleHandleA and skip. --- dlls/advapi32/tests/crypt_lmhash.c | 43 ++++++++++++++++++++++++++++++++--- 1 files changed, 39 insertions(+), 4 deletions(-) diff --git a/dlls/advapi32/tests/crypt_lmhash.c b/dlls/advapi32/tests/crypt_lmhash.c index bac7e17..b90e02c 100644 --- a/dlls/advapi32/tests/crypt_lmhash.c +++ b/dlls/advapi32/tests/crypt_lmhash.c @@ -406,7 +406,10 @@ static void test_SystemFunction_encrypt(descrypt func, int num) int r; if (!func) + { + skip("SystemFunction%03d is not available\n", num); return; + } r = func(NULL, NULL, NULL); ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); @@ -424,7 +427,10 @@ static void test_SystemFunction_decrypt(descrypt func, int num) int r; if (!func) + { + skip("SystemFunction%03d is not available\n", num); return; + } r = func(NULL, NULL, NULL); ok( r == STATUS_UNSUCCESSFUL, "wrong error code\n"); @@ -447,7 +453,10 @@ static void test_SystemFunction_enc32(descrypt func, int num) int r; if (!func) + { + skip("SystemFunction%03d is not available\n", num); return; + } memset(output, 0, sizeof output); @@ -466,7 +475,10 @@ static void test_SystemFunction_dec32(descrypt func, int num) int r; if (!func) + { + skip("SystemFunction%03d is not available\n", num); return; + } memset(output, 0, sizeof output); @@ -485,9 +497,16 @@ static void test_memcmpfunc(memcmpfunc fn) int r; if (!fn) + { + skip("function is not available\n"); return; + } - /* r = fn(NULL, NULL); - crashes */ + if (0) + { + /* crashes */ + r = fn(NULL, NULL); + } memset(arg1, 0, sizeof arg1); memset(arg2, 0, sizeof arg2); @@ -518,41 +537,55 @@ static void test_memcmpfunc(memcmpfunc fn) START_TEST(crypt_lmhash) { - HMODULE module; - - if (!(module = LoadLibrary("advapi32.dll"))) return; + HMODULE module = GetModuleHandleA("advapi32.dll"); pSystemFunction001 = (fnSystemFunction001)GetProcAddress( module, "SystemFunction001" ); if (pSystemFunction001) test_SystemFunction001(); + else + skip("SystemFunction001 is not available\n"); pSystemFunction002 = (fnSystemFunction002)GetProcAddress( module, "SystemFunction002" ); if (pSystemFunction002) test_SystemFunction002(); + else + skip("SystemFunction002 is not available\n"); pSystemFunction003 = (fnSystemFunction003)GetProcAddress( module, "SystemFunction003" ); if (pSystemFunction003) test_SystemFunction003(); + else + skip("SystemFunction002 is not available\n"); pSystemFunction004 = (fnSystemFunction004)GetProcAddress( module, "SystemFunction004" ); if (pSystemFunction004) test_SystemFunction004(); + else + skip("SystemFunction004 is not available\n"); pSystemFunction005 = (fnSystemFunction005)GetProcAddress( module, "SystemFunction005" ); if (pSystemFunction005) test_SystemFunction005(); + else + skip("SystemFunction005 is not available\n"); pSystemFunction006 = (fnSystemFunction006)GetProcAddress( module, "SystemFunction006" ); if (pSystemFunction006) test_SystemFunction006(); + else + skip("SystemFunction006 is not available\n"); pSystemFunction008 = (fnSystemFunction008)GetProcAddress( module, "SystemFunction008" ); if (pSystemFunction008) test_SystemFunction008(); + else + skip("SystemFunction008 is not available\n"); pSystemFunction009 = (fnSystemFunction009)GetProcAddress( module, "SystemFunction009" ); if (pSystemFunction009) test_SystemFunction009(); + else + skip("SystemFunction009 is not available\n"); pSystemFunction012 = (descrypt) GetProcAddress( module, "SystemFunction012"); pSystemFunction013 = (descrypt) GetProcAddress( module, "SystemFunction013"); @@ -605,4 +638,6 @@ START_TEST(crypt_lmhash) pSystemFunction032 = (fnSystemFunction032)GetProcAddress( module, "SystemFunction032" ); if (pSystemFunction032) test_SystemFunction032(); + else + skip("SystemFunction032 is not available\n"); }
1
0
0
0
Vitaliy Margolen : dinput: Fix dead zone calculation.
by Alexandre Julliard
15 Aug '07
15 Aug '07
Module: wine Branch: master Commit: 51fac7f28a8144d5d3dcf63d633a65aaf7a27e22 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=51fac7f28a8144d5d3dcf63d6…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Tue Aug 14 07:04:42 2007 -0600 dinput: Fix dead zone calculation. Based on patch by Artur Szymiec. --- dlls/dinput/joystick_linuxinput.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 21b77d6..feeb118 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -91,17 +91,20 @@ DWORD joystick_map_pov(POINTL *p) LONG joystick_map_axis(ObjProps *props, int val) { LONG ret; + LONG center = (props->lMax - props->lMin) / 2; /* map the value from the hmin-hmax range into the wmin-wmax range */ ret = MulDiv( val - props->lDevMin, props->lMax - props->lMin, - props->lDevMax - props->lDevMin ) + props->lMin; + props->lDevMax - props->lDevMin ); - if ((ret >= -props->lDeadZone / 2 ) && (ret <= props->lDeadZone / 2)) - ret = (props->lMax - props->lMin) / 2 + props->lMin; + if (abs( ret - center ) <= props->lDeadZone / 2 ) + ret = center; + + ret += props->lMin; TRACE( "(%d %d) -> (%d <%d> %d): val=%d ret=%d\n", props->lDevMin, props->lDevMax, - props->lMin, props->lDeadZone, props->lDevMax, + props->lMin, props->lDeadZone, props->lMax, val, ret ); return ret;
1
0
0
0
Alexandre Julliard : msvcrt: Use a valid parameter array when demangling a template name.
by Alexandre Julliard
15 Aug '07
15 Aug '07
Module: wine Branch: master Commit: 1b819cbe877ad08345bd42851a71b882687ed94f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1b819cbe877ad08345bd42851…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 14 18:10:53 2007 +0200 msvcrt: Use a valid parameter array when demangling a template name. --- dlls/msvcrt/tests/cpp.c | 7 ++++--- dlls/msvcrt/undname.c | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index 370a348..fa66349 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -873,7 +873,7 @@ static int strcmp_space(const char *s1, const char *s2) static void test_demangle(void) { - static struct {const char* in; const char* out;} test[] = { + static struct {const char* in; const char* out; unsigned int flags;} test[] = { {"??0bad_alloc@std@@QAE@ABV01@@Z", "public: __thiscall std::bad_alloc::bad_alloc(class std::bad_alloc const &)"}, {"??0bad_alloc@std@@QAE@PBD@Z", "public: __thiscall std::bad_alloc::bad_alloc(char const *)"}, {"??0bad_cast@@AAE@PBQBD@Z", "private: __thiscall bad_cast::bad_cast(char const * const *)"}, @@ -976,15 +976,16 @@ static void test_demangle(void) {"??2?$aaa@AAUbbb@@AAUccc@@AAU2@@ddd@1eee@2@QAEHXZ", "public: int __thiscall eee::eee::ddd::ddd::aaa<struct bbb &,struct ccc &,struct ccc &>::operator new(void)"}, {"?pSW@@3P6GHKPAX0PAU_tagSTACKFRAME@@0P6GH0K0KPAK@ZP6GPAX0K@ZP6GK0K@ZP6GK00PAU_tagADDRESS@@@Z@ZA", "int (__stdcall* pSW)(unsigned long,void *,void *,struct _tagSTACKFRAME *,void *,int (__stdcall*)(void *,unsigned long,void *,unsigned long,unsigned long *),void * (__stdcall*)(void *,unsigned long),unsigned long (__stdcall*)(void *,unsigned long),unsigned long (__stdcall*)(void *,void *,struct _tagADDRESS *))"}, {"?$_aaa@Vbbb@@", "_aaa<class bbb>"}, -{"??$_aaa@Vbbb@@", "??$_aaa@Vbbb@@"}, {"?$aaa@Vbbb@ccc@@Vddd@2@", "aaa<class ccc::bbb,class ccc::ddd>"}, +{ "??0?$Foo@P6GHPAX0@Z@@QAE@PAD@Z", "public: __thiscall Foo<int (__stdcall*)(void *,void *)>::Foo<int (__stdcall*)(void *,void *)>(char *)"}, +{ "??0?$Foo@P6GHPAX0@Z@@QAE@PAD@Z", "__thiscall Foo<int (__stdcall*)(void *,void *)>::Foo<int (__stdcall*)(void *,void *)>(char *)", 0x880}, }; int i, num_test = (sizeof(test)/sizeof(test[0])); char* name; for (i = 0; i < num_test; i++) { - name = p__unDName(0, test[i].in, 0, pmalloc, pfree, 0); + name = p__unDName(0, test[i].in, 0, pmalloc, pfree, test[i].flags); ok(name != NULL && !strcmp_space(test[i].out, name), "Got name \"%s\" for %d\n", name, i); pfree(name); diff --git a/dlls/msvcrt/undname.c b/dlls/msvcrt/undname.c index 5d2b816..c48e9ab 100644 --- a/dlls/msvcrt/undname.c +++ b/dlls/msvcrt/undname.c @@ -442,11 +442,13 @@ static char* get_template_name(struct parsed_symbol* sym) unsigned num_mark = sym->names.num; unsigned start_mark = sym->names.start; unsigned stack_mark = sym->stack.num; + struct array array_pmt; sym->names.start = sym->names.num; if (!(name = get_literal_string(sym))) return FALSE; - args = get_args(sym, NULL, FALSE, '<', '>'); + str_array_init(&array_pmt); + args = get_args(sym, &array_pmt, FALSE, '<', '>'); if (args != NULL) name = str_printf(sym, "%s%s", name, args); sym->names.num = num_mark;
1
0
0
0
Alexandre Julliard : make_makefiles: wined3d doesn' t depend on OpenGL libs anymore.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: 277b2542aaf18b2a76e7827026424883cd5222d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=277b2542aaf18b2a76e782702…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Aug 14 13:37:14 2007 +0200 make_makefiles: wined3d doesn't depend on OpenGL libs anymore. --- dlls/Makefile.in | 4 ++-- tools/make_makefiles | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index d51f783..e16b37d 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -8,7 +8,7 @@ VPATH = @srcdir@ # special configure-dependent targets GLU32FILES = glu32 -OPENGLFILES = opengl32 wined3d +OPENGLFILES = opengl32 QUARTZFILES = winequartz.drv XFILES = winex11.drv EXTRADIRS = @GLU32FILES@ @OPENGLFILES@ @QUARTZFILES@ @XFILES@ @@ -206,6 +206,7 @@ BASEDIRS = \ winealsa.drv \ wineaudioio.drv \ winecoreaudio.drv \ + wined3d \ winedos \ wineesd.drv \ winejack.drv \ @@ -313,7 +314,6 @@ SUBDIRS = \ $(TESTSUBDIRS) \ glu32 \ opengl32 \ - wined3d \ winequartz.drv \ winex11.drv diff --git a/tools/make_makefiles b/tools/make_makefiles index 0fc183c..df271a8 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -62,7 +62,6 @@ my %special_dlls = ( "glu32" => "GLU32FILES", "opengl32" => "OPENGLFILES", - "wined3d" => "OPENGLFILES", "winex11.drv" => "XFILES", "winequartz.drv" => "QUARTZFILES" );
1
0
0
0
Roderick Colenbrander : wined3d: Dynamically load OpenGL.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: 4ad17c0c3862e6b76dec9d7cdfe5cd5a9c3df046 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ad17c0c3862e6b76dec9d7cd…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Tue Aug 14 01:05:09 2007 +0200 wined3d: Dynamically load OpenGL. --- dlls/wined3d/Makefile.in | 3 +- dlls/wined3d/directx.c | 33 +- include/wine/wined3d_gl.h | 1465 ++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 1472 insertions(+), 29 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4ad17c0c3862e6b76dec9…
1
0
0
0
Juan Lang : wintrust: Implement SPC indirect data decoding.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: 261f02ca68f838ab5fe9013f2ea9d408b9747907 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=261f02ca68f838ab5fe9013f2…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Aug 13 14:36:08 2007 -0700 wintrust: Implement SPC indirect data decoding. --- dlls/wintrust/asn.c | 273 +++++++++++++++++++++++++++++++++++++++++++ dlls/wintrust/wintrust.spec | 2 +- 2 files changed, 274 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=261f02ca68f838ab5fe90…
1
0
0
0
Juan Lang : wintrust: Implement SPC indirect data encoding.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: f7e62befe8149fb3f98a4a9789d846263f8c7066 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f7e62befe8149fb3f98a4a978…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Aug 13 14:35:39 2007 -0700 wintrust: Implement SPC indirect data encoding. --- dlls/wintrust/asn.c | 226 +++++++++++++++++++++++++++++++++++++++++++ dlls/wintrust/wintrust.spec | 2 +- 2 files changed, 227 insertions(+), 1 deletions(-) diff --git a/dlls/wintrust/asn.c b/dlls/wintrust/asn.c index 02c0005..36bff15 100644 --- a/dlls/wintrust/asn.c +++ b/dlls/wintrust/asn.c @@ -18,6 +18,7 @@ * */ #include <stdarg.h> +#include <stdio.h> #include <assert.h> #define NONAMELESSUNION #include "windef.h" @@ -508,6 +509,231 @@ BOOL WINAPI WVTAsn1SpcPeImageDataEncode(DWORD dwCertEncodingType, return ret; } +static BOOL WINAPI CRYPT_AsnEncodeOid(DWORD dwCertEncodingType, + LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, + DWORD *pcbEncoded) +{ + LPCSTR pszObjId = (LPCSTR)pvStructInfo; + DWORD bytesNeeded = 0, lenBytes; + BOOL ret = TRUE; + int firstPos = 0; + BYTE firstByte = 0; + + TRACE("%s\n", debugstr_a(pszObjId)); + + if (pszObjId) + { + const char *ptr; + int val1, val2; + + if (sscanf(pszObjId, "%d.%d.%n", &val1, &val2, &firstPos) != 2) + { + SetLastError(CRYPT_E_ASN1_ERROR); + return FALSE; + } + bytesNeeded++; + firstByte = val1 * 40 + val2; + ptr = pszObjId + firstPos; + while (ret && *ptr) + { + int pos; + + /* note I assume each component is at most 32-bits long in base 2 */ + if (sscanf(ptr, "%d%n", &val1, &pos) == 1) + { + if (val1 >= 0x10000000) + bytesNeeded += 5; + else if (val1 >= 0x200000) + bytesNeeded += 4; + else if (val1 >= 0x4000) + bytesNeeded += 3; + else if (val1 >= 0x80) + bytesNeeded += 2; + else + bytesNeeded += 1; + ptr += pos; + if (*ptr == '.') + ptr++; + } + else + { + SetLastError(CRYPT_E_ASN1_ERROR); + return FALSE; + } + } + CRYPT_EncodeLen(bytesNeeded, NULL, &lenBytes); + } + else + lenBytes = 1; + bytesNeeded += 1 + lenBytes; + if (pbEncoded) + { + if (*pcbEncoded < bytesNeeded) + { + SetLastError(ERROR_MORE_DATA); + ret = FALSE; + } + else + { + *pbEncoded++ = ASN_OBJECTIDENTIFIER; + CRYPT_EncodeLen(bytesNeeded - 1 - lenBytes, pbEncoded, &lenBytes); + pbEncoded += lenBytes; + if (pszObjId) + { + const char *ptr; + int val, pos; + + *pbEncoded++ = firstByte; + ptr = pszObjId + firstPos; + while (ret && *ptr) + { + sscanf(ptr, "%d%n", &val, &pos); + { + unsigned char outBytes[5]; + int numBytes, i; + + if (val >= 0x10000000) + numBytes = 5; + else if (val >= 0x200000) + numBytes = 4; + else if (val >= 0x4000) + numBytes = 3; + else if (val >= 0x80) + numBytes = 2; + else + numBytes = 1; + for (i = numBytes; i > 0; i--) + { + outBytes[i - 1] = val & 0x7f; + val >>= 7; + } + for (i = 0; i < numBytes - 1; i++) + *pbEncoded++ = outBytes[i] | 0x80; + *pbEncoded++ = outBytes[i]; + ptr += pos; + if (*ptr == '.') + ptr++; + } + } + } + } + } + *pcbEncoded = bytesNeeded; + return ret; +} + +static BOOL WINAPI CRYPT_CopyEncodedBlob(DWORD dwCertEncodingType, + LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, + DWORD *pcbEncoded) +{ + const CRYPT_DER_BLOB *blob = (const CRYPT_DER_BLOB *)pvStructInfo; + BOOL ret = TRUE; + + if (!pbEncoded) + *pcbEncoded = blob->cbData; + else if (*pcbEncoded < blob->cbData) + { + *pcbEncoded = blob->cbData; + SetLastError(ERROR_MORE_DATA); + ret = FALSE; + } + else + { + if (blob->cbData) + memcpy(pbEncoded, blob->pbData, blob->cbData); + *pcbEncoded = blob->cbData; + } + return ret; +} + +static BOOL WINAPI CRYPT_AsnEncodeAlgorithmIdWithNullParams( + DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, + BYTE *pbEncoded, DWORD *pcbEncoded) +{ + const CRYPT_ALGORITHM_IDENTIFIER *algo = + (const CRYPT_ALGORITHM_IDENTIFIER *)pvStructInfo; + static const BYTE asn1Null[] = { ASN_NULL, 0 }; + static const CRYPT_DATA_BLOB nullBlob = { sizeof(asn1Null), + (LPBYTE)asn1Null }; + BOOL ret; + struct AsnEncodeSequenceItem items[2] = { + { algo->pszObjId, CRYPT_AsnEncodeOid, 0 }, + { NULL, CRYPT_CopyEncodedBlob, 0 }, + }; + + if (algo->Parameters.cbData) + items[1].pvStructInfo = &algo->Parameters; + else + items[1].pvStructInfo = &nullBlob; + ret = CRYPT_AsnEncodeSequence(dwCertEncodingType, items, + sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); + return ret; +} + +static BOOL WINAPI CRYPT_AsnEncodeAttributeTypeValue(DWORD dwCertEncodingType, + LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, + DWORD *pcbEncoded) +{ + const CRYPT_ATTRIBUTE_TYPE_VALUE *typeValue = + (const CRYPT_ATTRIBUTE_TYPE_VALUE *)pvStructInfo; + struct AsnEncodeSequenceItem items[] = { + { &typeValue->pszObjId, CRYPT_AsnEncodeOid, 0 }, + { &typeValue->Value, CRYPT_CopyEncodedBlob, 0 }, + }; + + return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, + items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); +} + +struct SPCDigest +{ + CRYPT_ALGORITHM_IDENTIFIER DigestAlgorithm; + CRYPT_HASH_BLOB Digest; +}; + +static BOOL WINAPI CRYPT_AsnEncodeSPCDigest(DWORD dwCertEncodingType, + LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, + DWORD *pcbEncoded) +{ + const struct SPCDigest *digest = (const struct SPCDigest *)pvStructInfo; + struct AsnEncodeSequenceItem items[] = { + { &digest->DigestAlgorithm, CRYPT_AsnEncodeAlgorithmIdWithNullParams, 0 }, + { &digest->Digest, CRYPT_CopyEncodedBlob, 0 }, + }; + + return CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, + items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); +} + +BOOL WINAPI WVTAsn1SpcIndirectDataContentEncode(DWORD dwCertEncodingType, + LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, + DWORD *pcbEncoded) +{ + BOOL ret = FALSE; + + TRACE("(0x%08x, %s, %p, %p, %p)\n", dwCertEncodingType, + debugstr_a(lpszStructType), pvStructInfo, pbEncoded, pcbEncoded); + + __TRY + { + const SPC_INDIRECT_DATA_CONTENT *data = + (const SPC_INDIRECT_DATA_CONTENT *)pvStructInfo; + struct AsnEncodeSequenceItem items[] = { + { &data->Data, CRYPT_AsnEncodeAttributeTypeValue, 0 }, + { &data->DigestAlgorithm, CRYPT_AsnEncodeSPCDigest, 0 }, + }; + + ret = CRYPT_AsnEncodeSequence(X509_ASN_ENCODING, + items, sizeof(items) / sizeof(items[0]), pbEncoded, pcbEncoded); + } + __EXCEPT_PAGE_FAULT + { + SetLastError(STATUS_ACCESS_VIOLATION); + } + __ENDTRY + return ret; +} + /* Gets the number of length bytes from the given (leading) length byte */ #define GET_LEN_BYTES(b) ((b) <= 0x7f ? 1 : 1 + ((b) & 0x7f)) diff --git a/dlls/wintrust/wintrust.spec b/dlls/wintrust/wintrust.spec index 7e31548..d7df156 100644 --- a/dlls/wintrust/wintrust.spec +++ b/dlls/wintrust/wintrust.spec @@ -93,7 +93,7 @@ @ stub WVTAsn1SpcFinancialCriteriaInfoDecode @ stub WVTAsn1SpcFinancialCriteriaInfoEncode @ stub WVTAsn1SpcIndirectDataContentDecode -@ stub WVTAsn1SpcIndirectDataContentEncode +@ stdcall WVTAsn1SpcIndirectDataContentEncode(long str ptr ptr ptr) @ stdcall WVTAsn1SpcLinkDecode(long str ptr long long ptr ptr) @ stdcall WVTAsn1SpcLinkEncode(long str ptr ptr ptr) @ stub WVTAsn1SpcMinimalCriteriaInfoDecode
1
0
0
0
Juan Lang : wintrust: Implement SPC PE image encoding.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: 5d965df2205c6004800c1eb9b6a89e229bb85011 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5d965df2205c6004800c1eb9b…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Aug 13 14:35:13 2007 -0700 wintrust: Implement SPC PE image encoding. --- dlls/wintrust/asn.c | 230 ++++++++++++++++++++++++++++++++++++++++++++- dlls/wintrust/tests/asn.c | 7 -- 2 files changed, 227 insertions(+), 10 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5d965df2205c6004800c1…
1
0
0
0
Juan Lang : wintrust: Implement SPC PE image decoding.
by Alexandre Julliard
14 Aug '07
14 Aug '07
Module: wine Branch: master Commit: 998bea104335a04e3f53159abe14ecc1624d0531 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=998bea104335a04e3f53159ab…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Aug 13 14:34:46 2007 -0700 wintrust: Implement SPC PE image decoding. --- dlls/wintrust/asn.c | 381 ++++++++++++++++++++++++++++++++++++++++++++- dlls/wintrust/tests/asn.c | 5 - 2 files changed, 377 insertions(+), 9 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=998bea104335a04e3f531…
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
109
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
Results per page:
10
25
50
100
200