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
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 2013
----- 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
14 participants
265 discussions
Start a n
N
ew thread
[hbelusca] 58676: [ROSAPPS] Fix the remaining 'lenght' --> 'length' misspelling.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Apr 4 19:41:50 2013 New Revision: 58676 URL:
http://svn.reactos.org/svn/reactos?rev=58676&view=rev
Log: [ROSAPPS] Fix the remaining 'lenght' --> 'length' misspelling. Modified: trunk/rosapps/applications/sysutils/utils/pice/module/disassembler.c Modified: trunk/rosapps/applications/sysutils/utils/pice/module/disassembler.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/util…
============================================================================== --- trunk/rosapps/applications/sysutils/utils/pice/module/disassembler.c [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/utils/pice/module/disassembler.c [iso-8859-1] Thu Apr 4 19:41:50 2013 @@ -184,7 +184,7 @@ ULONG dwULONG; // Temporary ULONG storage USHORT wUSHORT; // Temporary USHORT storage UCHAR bUCHAR; // Temporary UCHAR storage - UCHAR bInstrLen; // Current instruction lenght in UCHARs + UCHAR bInstrLen; // Current instruction length in UCHARs UCHAR bOpcode; // Current opcode that is being disassembled UCHAR bSegOverride; // 0 default segment. >0, segment index UCHAR bMod=0; // Mod field of the instruction @@ -198,7 +198,7 @@ UCHAR bBase; // Base field of the s-i-b UCHAR LPSTR pSymbolName; // used to symbolic name of value - bInstrLen = 0; // Reset instruction lenght to zero + bInstrLen = 0; // Reset instruction length to zero bSegOverride = 0; // Set default segment (no override) nPos = 0; // Reset printing position sPtr = NULL; // Points to no message by default
11 years, 8 months
1
0
0
0
[hbelusca] 58675: [REACTOS] Fix the remaining 'lenght' --> 'length' misspelling. There are others, but in 3rd-party code. So don't correct them.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Apr 4 19:39:56 2013 New Revision: 58675 URL:
http://svn.reactos.org/svn/reactos?rev=58675&view=rev
Log: [REACTOS] Fix the remaining 'lenght' --> 'length' misspelling. There are others, but in 3rd-party code. So don't correct them. Modified: trunk/reactos/base/applications/sndrec32/audio_waveout.cpp Modified: trunk/reactos/base/applications/sndrec32/audio_waveout.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
============================================================================== --- trunk/reactos/base/applications/sndrec32/audio_waveout.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/sndrec32/audio_waveout.cpp [iso-8859-1] Thu Apr 4 19:39:56 2013 @@ -152,7 +152,7 @@ // // Sets the correct base address and - // lenght for the little buffer. + // length for the little buffer. // wave_headers[ i ].dwBufferLength = mb_size / buffers;
11 years, 8 months
1
0
0
0
[hbelusca] 58674: [ROSTESTS] Fix spelling of 'length' in various places. Patch by andygui CORE-7043 #resolve #comment Part for ROSTests committed in r58674, thanks!
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Apr 4 19:35:20 2013 New Revision: 58674 URL:
http://svn.reactos.org/svn/reactos?rev=58674&view=rev
Log: [ROSTESTS] Fix spelling of 'length' in various places. Patch by andygui CORE-7043 #resolve #comment Part for ROSTests committed in r58674, thanks! Modified: trunk/rostests/drivers/ntoskrnl/IoEaTest.cpp Modified: trunk/rostests/drivers/ntoskrnl/IoEaTest.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/drivers/ntoskrnl/IoEaTest…
============================================================================== --- trunk/rostests/drivers/ntoskrnl/IoEaTest.cpp [iso-8859-1] (original) +++ trunk/rostests/drivers/ntoskrnl/IoEaTest.cpp [iso-8859-1] Thu Apr 4 19:35:20 2013 @@ -34,7 +34,7 @@ ULONG NextEaBufferOffset; UINT IntEaLength; - /* Lenght of the rest. Inital equal to EaLength */ + /* Length of the rest. Inital equal to EaLength */ IntEaLength = EaLength; /* Inital EaBuffer equal to EaBuffer */ EaBufferEnd = EaBuffer;
11 years, 8 months
1
0
0
0
[hbelusca] 58673: [ROSAPPS] Fix spelling of 'length' in various places. Patch by andygui CORE-7043 #comment Part for ROSApps committed in r58673, thanks!
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Apr 4 19:34:27 2013 New Revision: 58673 URL:
http://svn.reactos.org/svn/reactos?rev=58673&view=rev
Log: [ROSAPPS] Fix spelling of 'length' in various places. Patch by andygui CORE-7043 #comment Part for ROSApps committed in r58673, thanks! Modified: trunk/rosapps/applications/sysutils/utils/pice/module/disassembler.c Modified: trunk/rosapps/applications/sysutils/utils/pice/module/disassembler.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/util…
============================================================================== --- trunk/rosapps/applications/sysutils/utils/pice/module/disassembler.c [iso-8859-1] (original) +++ trunk/rosapps/applications/sysutils/utils/pice/module/disassembler.c [iso-8859-1] Thu Apr 4 19:34:27 2013 @@ -57,7 +57,7 @@ UCHAR Codes[20]; // Buffer where to store code UCHARs UCHAR bAsciiLen; // Length of the ascii result - UCHAR bInstrLen; // Instruction lenght in UCHARs + UCHAR bInstrLen; // Instruction length in UCHARs int nDisplacement; // Scanner: possible constant displacement int nScanEnum; // Scanner: specific flags SCAN_*
11 years, 8 months
1
0
0
0
[hbelusca] 58672: [REACTOS] Fix spelling of 'length' in various places. Patch by andygui Concerning kdio.c, we can see that the original author didn't see his misspelling since he used two differen...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Apr 4 19:29:36 2013 New Revision: 58672 URL:
http://svn.reactos.org/svn/reactos?rev=58672&view=rev
Log: [REACTOS] Fix spelling of 'length' in various places. Patch by andygui Concerning kdio.c, we can see that the original author didn't see his misspelling since he used two different variables named: KdpScreenLineLength and KdpScreenLineLenght ! ; the latter being renamed here KdpScreenLineLengthDefault to make the difference. CORE-7043 #comment Part for ReactOS committed in r58672, thanks! Modified: trunk/reactos/base/applications/calc/lang/el-GR.rc trunk/reactos/base/applications/calc/lang/ko-KR.rc trunk/reactos/base/applications/calc/lang/th-TH.rc trunk/reactos/base/applications/sndrec32/audio_resampler_acm.cpp trunk/reactos/base/applications/sndrec32/audio_wavein.hpp trunk/reactos/base/applications/sndrec32/lang/de-DE.rc trunk/reactos/base/applications/sndrec32/lang/en-US.rc trunk/reactos/base/applications/sndrec32/lang/es-ES.rc trunk/reactos/base/services/eventlog/file.c trunk/reactos/boot/freeldr/freeldr/include/fs/ext2.h trunk/reactos/dll/win32/kernel32/client/path.c trunk/reactos/drivers/filesystems/fastfat/fastio.c trunk/reactos/drivers/filesystems/fastfat_new/fastio.c trunk/reactos/include/ndk/iofuncs.h trunk/reactos/lib/drivers/lwip/src/core/snmp/msg_out.c trunk/reactos/lib/drivers/lwip/src/core/tcp_in.c trunk/reactos/ntoskrnl/io/iomgr/util.c trunk/reactos/ntoskrnl/io/pnpmgr/pnputil.c trunk/reactos/ntoskrnl/kd/kdio.c Modified: trunk/reactos/base/applications/calc/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
============================================================================== --- trunk/reactos/base/applications/calc/lang/el-GR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/lang/el-GR.rc [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -444,7 +444,7 @@ IDS_CONV_CONSUMPTION "Consumption (engines)" IDS_CONV_CURRENCY "Î£Ï Î½Î¬Î»Î»Î±Î³Î¼Î±" IDS_CONV_ENERGY "ÎνÎÏγεια" - IDS_CONV_LENGTH "Lenghts" + IDS_CONV_LENGTH "Lengths" IDS_CONV_POWER "ÎÏναμη" IDS_CONV_PRESSURE "ΠίεÏη" IDS_CONV_TEMPERATURE "ÎεÏμοκÏαÏία" Modified: trunk/reactos/base/applications/calc/lang/ko-KR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
============================================================================== --- trunk/reactos/base/applications/calc/lang/ko-KR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/lang/ko-KR.rc [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -448,7 +448,7 @@ IDS_CONV_CONSUMPTION "Consumption (engines)" IDS_CONV_CURRENCY "Currencies" IDS_CONV_ENERGY "Energy" - IDS_CONV_LENGTH "Lenghts" + IDS_CONV_LENGTH "Lengths" IDS_CONV_POWER "Power" IDS_CONV_PRESSURE "Pressure" IDS_CONV_TEMPERATURE "Temperature" Modified: trunk/reactos/base/applications/calc/lang/th-TH.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
============================================================================== --- trunk/reactos/base/applications/calc/lang/th-TH.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/calc/lang/th-TH.rc [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -449,7 +449,7 @@ IDS_CONV_CONSUMPTION "Consumption (engines)" IDS_CONV_CURRENCY "Currencies" IDS_CONV_ENERGY "Energy" - IDS_CONV_LENGTH "Lenghts" + IDS_CONV_LENGTH "Lengths" IDS_CONV_POWER "Power" IDS_CONV_PRESSURE "Pressure" IDS_CONV_TEMPERATURE "Temperature" Modified: trunk/reactos/base/applications/sndrec32/audio_resampler_acm.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
============================================================================== --- trunk/reactos/base/applications/sndrec32/audio_resampler_acm.cpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/sndrec32/audio_resampler_acm.cpp [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -118,7 +118,7 @@ // - // Calcs source buffer lenght + // Calcs source buffer length // src_buflen = ( unsigned int ) @@ -130,7 +130,7 @@ // - // Calcs destination source buffer lenght + // Calcs destination source buffer length // with help of ACM apis // Modified: trunk/reactos/base/applications/sndrec32/audio_wavein.hpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
============================================================================== --- trunk/reactos/base/applications/sndrec32/audio_wavein.hpp [iso-8859-1] (original) +++ trunk/reactos/base/applications/sndrec32/audio_wavein.hpp [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -229,7 +229,7 @@ // - // Set seconds lenght for each + // Set seconds length for each // buffer. // Modified: trunk/reactos/base/applications/sndrec32/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
============================================================================== --- trunk/reactos/base/applications/sndrec32/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/sndrec32/lang/de-DE.rc [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -45,7 +45,7 @@ STRINGTABLE BEGIN IDS_STRPOS "Position: %.2f s"//FIXME - IDS_STRDUR "Lenght: %.2f s" + IDS_STRDUR "Length: %.2f s" IDS_STRBUF "Buffer: %.2f kb" IDS_STRFMT "%.1f kHz %u bits" IDS_STRMONO "mono" Modified: trunk/reactos/base/applications/sndrec32/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
============================================================================== --- trunk/reactos/base/applications/sndrec32/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/sndrec32/lang/en-US.rc [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -45,7 +45,7 @@ STRINGTABLE BEGIN IDS_STRPOS "Position: %.2f s" - IDS_STRDUR "Lenght: %.2f s" + IDS_STRDUR "Length: %.2f s" IDS_STRBUF "Buffer: %.2f kb" IDS_STRFMT "%.1f kHz %u bits" IDS_STRMONO "mono" Modified: trunk/reactos/base/applications/sndrec32/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndrec32…
============================================================================== --- trunk/reactos/base/applications/sndrec32/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/sndrec32/lang/es-ES.rc [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -45,7 +45,7 @@ STRINGTABLE BEGIN IDS_STRPOS "Position: %.2f s"//FIXME - IDS_STRDUR "Lenght: %.2f s" + IDS_STRDUR "Length: %.2f s" IDS_STRBUF "Buffer: %.2f kb" IDS_STRFMT "%.1f kHz %u bits" IDS_STRMONO "mono" Modified: trunk/reactos/base/services/eventlog/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/fil…
============================================================================== --- trunk/reactos/base/services/eventlog/file.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/file.c [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -983,7 +983,7 @@ /* Check the size of the record as the record adding may be larger */ if (OverWriteLength >= BufSize) { - DPRINT("Record will fit. Lenght %d, BufSize %d\n", OverWriteLength, BufSize); + DPRINT("Record will fit. Length %d, BufSize %d\n", OverWriteLength, BufSize); LogFile->Header.StartOffset = LogfOffsetByNumber(LogFile, LogFile->Header.OldestRecordNumber); break; } Modified: trunk/reactos/boot/freeldr/freeldr/include/fs/ext2.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/fs/ext2.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/fs/ext2.h [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -43,7 +43,7 @@ #define EXT2_MAGIC 0xEF53 /* Amount of indirect blocks in an inode. */ #define INDIRECT_BLOCKS 12 -/* Maximum lenght of a pathname. */ +/* Maximum length of a pathname. */ #define EXT2_PATH_MAX 4096 /* Maximum nesting of symlinks, used to prevent a loop. */ #define EXT2_MAX_SYMLINKCNT 8 Modified: trunk/reactos/dll/win32/kernel32/client/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/client/path.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/path.c [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -1437,7 +1437,7 @@ RtlFreeHeap(RtlGetProcessHeap(), 0, PathString.Buffer); } - /* Return the final result lenght */ + /* Return the final result length */ return Result; } Modified: trunk/reactos/drivers/filesystems/fastfat/fastio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fastio.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fastio.c [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -12,7 +12,7 @@ static BOOLEAN NTAPI VfatFastIoCheckIfPossible(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, - IN ULONG Lenght, + IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, IN BOOLEAN CheckForReadOperation, Modified: trunk/reactos/drivers/filesystems/fastfat_new/fastio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/fastio.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/fastio.c [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -17,7 +17,7 @@ NTAPI FatFastIoCheckIfPossible(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, - IN ULONG Lenght, + IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, IN BOOLEAN CheckForReadOperation, Modified: trunk/reactos/include/ndk/iofuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/iofuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/iofuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/iofuncs.h [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -1029,7 +1029,7 @@ _In_ HANDLE FileHandle, _Out_ PIO_STATUS_BLOCK IoStatusBlock, _In_ PLARGE_INTEGER ByteOffset, - _In_ PLARGE_INTEGER Lenght, + _In_ PLARGE_INTEGER Length, _In_opt_ ULONG Key ); Modified: trunk/reactos/lib/drivers/lwip/src/core/snmp/msg_out.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/lwip/src/core/…
============================================================================== --- trunk/reactos/lib/drivers/lwip/src/core/snmp/msg_out.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/lwip/src/core/snmp/msg_out.c [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -313,7 +313,7 @@ * * @param vb_len varbind-list length * @param rhl points to returned header lengths - * @return the required lenght for encoding the response header + * @return the required length for encoding the response header */ static u16_t snmp_resp_header_sum(struct snmp_msg_pstat *m_stat, u16_t vb_len) @@ -360,7 +360,7 @@ * * @param vb_len varbind-list length * @param thl points to returned header lengths - * @return the required lenght for encoding the trap header + * @return the required length for encoding the trap header */ static u16_t snmp_trap_header_sum(struct snmp_msg_trap *m_trap, u16_t vb_len) @@ -415,7 +415,7 @@ * annotates lengths in varbind for second encoding pass. * * @param root points to the root of the variable binding list - * @return the required lenght for encoding the variable bindings + * @return the required length for encoding the variable bindings */ static u16_t snmp_varbind_list_sum(struct snmp_varbind_root *root) @@ -429,7 +429,7 @@ vb = root->tail; while ( vb != NULL ) { - /* encoded value lenght depends on type */ + /* encoded value length depends on type */ switch (vb->value_type) { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): Modified: trunk/reactos/lib/drivers/lwip/src/core/tcp_in.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/lwip/src/core/…
============================================================================== --- trunk/reactos/lib/drivers/lwip/src/core/tcp_in.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/lwip/src/core/tcp_in.c [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -1382,7 +1382,7 @@ } break; } else { - /* Either the lenghts are the same or the incoming + /* Either the lengths are the same or the incoming segment was smaller than the old one; in either case, we ditch the incoming segment. */ break; Modified: trunk/reactos/ntoskrnl/io/iomgr/util.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/util.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/util.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/util.c [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -171,7 +171,7 @@ PAGED_CODE(); - /* Lenght of the rest. Inital equal to EaLength */ + /* Length of the rest. Inital equal to EaLength */ IntEaLength = EaLength; /* Inital EaBuffer equal to EaBuffer */ Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnputil.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnputil…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnputil.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnputil.c [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -156,7 +156,7 @@ /* Null-terminate the string ourselves */ (*UnicodeStringList)[i].Buffer[n / sizeof(WCHAR)] = UNICODE_NULL; - /* Set the lenghts */ + /* Set the lengths */ (*UnicodeStringList)[i].Length = (USHORT)n; (*UnicodeStringList)[i].MaximumLength = (USHORT)(n + sizeof(UNICODE_NULL)); } Modified: trunk/reactos/ntoskrnl/kd/kdio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdio.c?rev=586…
============================================================================== --- trunk/reactos/ntoskrnl/kd/kdio.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/kd/kdio.c [iso-8859-1] Thu Apr 4 19:29:36 2013 @@ -31,8 +31,8 @@ /* Current Port in use. FIXME: Do we support more then one? */ ULONG KdpPort; -#define KdpScreenLineLenght 80 -CHAR KdpScreenLineBuffer[KdpScreenLineLenght + 1] = ""; +#define KdpScreenLineLengthDefault 80 +CHAR KdpScreenLineBuffer[KdpScreenLineLengthDefault + 1] = ""; ULONG KdpScreenLineBufferPos = 0, KdpScreenLineLength = 0; const ULONG KdpDmesgBufferSize = 128 * 1024; // 512*1024; // 5*1024*1024; @@ -427,7 +427,7 @@ KdpScreenLineBuffer[KdpScreenLineLength] = '\0'; } - if(*pch == '\n' || KdpScreenLineLength == KdpScreenLineLenght) + if(*pch == '\n' || KdpScreenLineLength == KdpScreenLineLengthDefault) { /* Print buffered characters */ if(KdpScreenLineBufferPos != KdpScreenLineLength)
11 years, 8 months
1
0
0
0
[hbelusca] 58671: [RAPPS] Address grammatical issues with reactos/base/applications/rapps/lang/fr-FR.rc resource script Patch by andygui CORE-7044 #resolve #comment Problem solved ; ) r58671
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Apr 4 19:11:04 2013 New Revision: 58671 URL:
http://svn.reactos.org/svn/reactos?rev=58671&view=rev
Log: [RAPPS] Address grammatical issues with reactos/base/applications/rapps/lang/fr-FR.rc resource script Patch by andygui CORE-7044 #resolve #comment Problem solved ;) r58671 Modified: trunk/reactos/base/applications/rapps/lang/fr-FR.rc Modified: trunk/reactos/base/applications/rapps/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
============================================================================== --- trunk/reactos/base/applications/rapps/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/lang/fr-FR.rc [iso-8859-1] Thu Apr 4 19:11:04 2013 @@ -184,7 +184,7 @@ IDS_AVAILABLEFORINST "Disponible pour installation" IDS_UPDATES "Mises à jour" IDS_APPLICATIONS "Applications" - IDS_CHOOSE_FOLDER_TEXT "Choisissez un dossier dans lequel seront téléchargés les programmes :" + IDS_CHOOSE_FOLDER_TEXT "Choisissez un dossier dans lequel les programmes seront téléchargés :" IDS_CHOOSE_FOLDER_ERROR "Le dossier que vous avez spécifié n'existe pas. Le créer ?" IDS_USER_NOT_ADMIN "Vous devez être un administrateur pour démarrer ""ReactOS Applications Manager""!" IDS_APP_REG_REMOVE "Etes-vous sûr de vouloir supprimer les données du programme installé du registre ?"
11 years, 8 months
1
0
0
0
[akhaldi] 58670: [CRT/LOCALE] * Improve the locale support a bit up to Wine 1.5.26.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Apr 3 22:46:22 2013 New Revision: 58670 URL:
http://svn.reactos.org/svn/reactos?rev=58670&view=rev
Log: [CRT/LOCALE] * Improve the locale support a bit up to Wine 1.5.26. Modified: trunk/reactos/lib/sdk/crt/include/internal/locale.h trunk/reactos/lib/sdk/crt/include/internal/wine/msvcrt.h trunk/reactos/lib/sdk/crt/locale/locale.c trunk/reactos/lib/sdk/crt/mbstring/_setmbcp.c Modified: trunk/reactos/lib/sdk/crt/include/internal/locale.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/include/intern…
============================================================================== --- trunk/reactos/lib/sdk/crt/include/internal/locale.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/include/internal/locale.h [iso-8859-1] Wed Apr 3 22:46:22 2013 @@ -90,7 +90,7 @@ int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN; MSVCRT_pthreadmbcinfo get_mbcinfo(void) DECLSPEC_HIDDEN; -LCID MSVCRT_locale_to_LCID(const char *locale) DECLSPEC_HIDDEN; +LCID MSVCRT_locale_to_LCID(const char*, unsigned short*) DECLSPEC_HIDDEN; void __init_global_locale(); extern MSVCRT__locale_t global_locale; Modified: trunk/reactos/lib/sdk/crt/include/internal/wine/msvcrt.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/include/intern…
============================================================================== --- trunk/reactos/lib/sdk/crt/include/internal/wine/msvcrt.h [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/include/internal/wine/msvcrt.h [iso-8859-1] Wed Apr 3 22:46:22 2013 @@ -15,6 +15,22 @@ * 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 + * + * NOTES + * Naming conventions + * - Symbols are prefixed with MSVCRT_ if they conflict + * with libc symbols + * - Internal symbols are usually prefixed by msvcrt_. + * - Exported symbols that are not present in the public + * headers are usually kept the same as the original. + * Other conventions + * - To avoid conflicts with the standard C library, + * no msvcrt headers are included in the implementation. + * - Instead, symbols are duplicated here, prefixed with + * MSVCRT_, as explained above. + * - To avoid inconsistencies, a test for each symbol is + * added into tests/headers.c. Please always add a + * corresponding test when you add a new symbol! */ #ifndef __WINE_MSVCRT_H @@ -89,6 +105,15 @@ #define MSVCRT__WRITE_ABORT_MSG 1 #define MSVCRT__CALL_REPORTFAULT 2 +#define MSVCRT_LC_ALL LC_ALL +#define MSVCRT_LC_COLLATE LC_COLLATE +#define MSVCRT_LC_CTYPE LC_CTYPE +#define MSVCRT_LC_MONETARY LC_MONETARY +#define MSVCRT_LC_NUMERIC LC_NUMERIC +#define MSVCRT_LC_TIME LC_TIME +#define MSVCRT_LC_MIN LC_MIN +#define MSVCRT_LC_MAX LC_MAX + #define MSVCRT__OUT_TO_DEFAULT 0 #define MSVCRT__OUT_TO_STDERR 1 #define MSVCRT__OUT_TO_MSGBOX 2 Modified: trunk/reactos/lib/sdk/crt/locale/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/locale/locale.…
============================================================================== --- trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/locale/locale.c [iso-8859-1] Wed Apr 3 22:46:22 2013 @@ -121,9 +121,12 @@ { int len; + if(!cmp[0]) + return 0; + buff[0] = 0; GetLocaleInfoA(lcid, flags|LOCALE_NOUSEROVERRIDE, buff, MAX_ELEM_LEN); - if (!buff[0] || !cmp[0]) + if (!buff[0]) return 0; /* Partial matches are only allowed on language/country names */ @@ -166,7 +169,7 @@ TRACE("Found country:%s->%s\n", res->search_country, buff); flags |= FOUND_COUNTRY; } - else if (res->match_flags & FOUND_COUNTRY) + else if (!flags && (res->match_flags & FOUND_COUNTRY)) { return CONTINUE_LOOKING; } @@ -179,7 +182,7 @@ flags |= FOUND_CODEPAGE; memcpy(res->found_codepage,res->search_codepage,MAX_ELEM_LEN); } - else if (res->match_flags & FOUND_CODEPAGE) + else if (!flags && (res->match_flags & FOUND_CODEPAGE)) { return CONTINUE_LOOKING; } @@ -202,7 +205,7 @@ extern int atoi(const char *); /* Internal: Find the LCID for a locale specification */ -LCID MSVCRT_locale_to_LCID(const char *locale) +LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage) { LCID lcid; locale_search_t search; @@ -247,7 +250,7 @@ lcid = MAKELCID(search.found_lang_id, SORT_DEFAULT); /* Populate partial locale, translating LCID to locale string elements */ - if (!search.found_codepage[0]) { + if (!(search.match_flags & FOUND_CODEPAGE)) { /* Even if a codepage is not enumerated for a locale * it can be set if valid */ if (search.search_codepage[0]) { @@ -255,10 +258,10 @@ memcpy(search.found_codepage,search.search_codepage,MAX_ELEM_LEN); else { /* Special codepage values: OEM & ANSI */ - if (strcasecmp(search.search_codepage,"OCP")) { + if (!strcasecmp(search.search_codepage,"OCP")) { GetLocaleInfoA(lcid, LOCALE_IDEFAULTCODEPAGE, search.found_codepage, MAX_ELEM_LEN); - } else if (strcasecmp(search.search_codepage,"ACP")) { + } else if (!strcasecmp(search.search_codepage,"ACP")) { GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE, search.found_codepage, MAX_ELEM_LEN); } else @@ -276,12 +279,15 @@ search.found_codepage, MAX_ELEM_LEN); } } + if (codepage) + *codepage = atoi(search.found_codepage); return lcid; } /* INTERNAL: Set lc_handle, lc_id and lc_category in threadlocinfo struct */ -static BOOL update_threadlocinfo_category(LCID lcid, MSVCRT__locale_t loc, int category) +static BOOL update_threadlocinfo_category(LCID lcid, unsigned short cp, + MSVCRT__locale_t loc, int category) { char buf[256], *p; int len; @@ -305,9 +311,7 @@ loc->locinfo->lc_id[category].wLanguage; } - if(GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE - |LOCALE_NOUSEROVERRIDE, buf, 256)) - loc->locinfo->lc_id[category].wCodePage = atoi(buf); + loc->locinfo->lc_id[category].wCodePage = cp; loc->locinfo->lc_handle[category] = lcid; @@ -318,15 +322,15 @@ len += GetLocaleInfoA(lcid, LOCALE_SENGCOUNTRY |LOCALE_NOUSEROVERRIDE, &buf[len], 256-len); buf[len-1] = '.'; - len += GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE - |LOCALE_NOUSEROVERRIDE, &buf[len], 256-len); - - loc->locinfo->lc_category[category].locale = malloc(len); - loc->locinfo->lc_category[category].refcount = malloc(sizeof(int)); + sprintf(buf+len, "%d", cp); + len += strlen(buf+len)+1; + + loc->locinfo->lc_category[category].locale = MSVCRT_malloc(len); + loc->locinfo->lc_category[category].refcount = MSVCRT_malloc(sizeof(int)); if(!loc->locinfo->lc_category[category].locale || !loc->locinfo->lc_category[category].refcount) { - free(loc->locinfo->lc_category[category].locale); - free(loc->locinfo->lc_category[category].refcount); + MSVCRT_free(loc->locinfo->lc_category[category].locale); + MSVCRT_free(loc->locinfo->lc_category[category].refcount); loc->locinfo->lc_category[category].locale = NULL; loc->locinfo->lc_category[category].refcount = NULL; return TRUE; @@ -372,22 +376,22 @@ int i; - for(i=LC_MIN+1; i<LC_MAX; i++) { + for(i=MSVCRT_LC_MIN+1; i<MSVCRT_LC_MAX; i++) { if(strcmp(locinfo->lc_category[i].locale, locinfo->lc_category[i+1].locale)) break; } - if(i==LC_MAX) - return locinfo->lc_category[LC_COLLATE].locale; + if(i==MSVCRT_LC_MAX) + return locinfo->lc_category[MSVCRT_LC_COLLATE].locale; sprintf(current_lc_all, "LC_COLLATE=%s;LC_CTYPE=%s;LC_MONETARY=%s;LC_NUMERIC=%s;LC_TIME=%s", - locinfo->lc_category[LC_COLLATE].locale, - locinfo->lc_category[LC_CTYPE].locale, - locinfo->lc_category[LC_MONETARY].locale, - locinfo->lc_category[LC_NUMERIC].locale, - locinfo->lc_category[LC_TIME].locale); + locinfo->lc_category[MSVCRT_LC_COLLATE].locale, + locinfo->lc_category[MSVCRT_LC_CTYPE].locale, + locinfo->lc_category[MSVCRT_LC_MONETARY].locale, + locinfo->lc_category[MSVCRT_LC_NUMERIC].locale, + locinfo->lc_category[MSVCRT_LC_TIME].locale); return current_lc_all; } @@ -419,7 +423,7 @@ TRACE("\n"); size = cur->str.names.short_mon[0]-cur->str.names.short_wday[0]; - out = malloc(size+1); + out = MSVCRT_malloc(size+1); if(!out) return NULL; @@ -452,7 +456,7 @@ TRACE("\n"); size = cur->str.names.am-cur->str.names.short_mon[0]; - out = malloc(size+1); + out = MSVCRT_malloc(size+1); if(!out) return NULL; @@ -479,14 +483,14 @@ void* CDECL _Gettnames(void) { MSVCRT___lc_time_data *ret, *cur = get_locinfo()->lc_time_curr; - int i, size = sizeof(MSVCRT___lc_time_data); + unsigned int i, size = sizeof(MSVCRT___lc_time_data); TRACE("\n"); for(i=0; i<sizeof(cur->str.str)/sizeof(cur->str.str[0]); i++) size += strlen(cur->str.str[i])+1; - ret = malloc(size); + ret = MSVCRT_malloc(size); if(!ret) return NULL; memcpy(ret, cur, size); @@ -644,37 +648,37 @@ if(InterlockedDecrement(&locinfo->refcount)) return; - for(i=LC_MIN+1; i<=LC_MAX; i++) { - free(locinfo->lc_category[i].locale); - free(locinfo->lc_category[i].refcount); + for(i=MSVCRT_LC_MIN+1; i<=MSVCRT_LC_MAX; i++) { + MSVCRT_free(locinfo->lc_category[i].locale); + MSVCRT_free(locinfo->lc_category[i].refcount); } if(locinfo->lconv) { - free(locinfo->lconv->decimal_point); - free(locinfo->lconv->thousands_sep); - free(locinfo->lconv->grouping); - free(locinfo->lconv->int_curr_symbol); - free(locinfo->lconv->currency_symbol); - free(locinfo->lconv->mon_decimal_point); - free(locinfo->lconv->mon_thousands_sep); - free(locinfo->lconv->mon_grouping); - free(locinfo->lconv->positive_sign); - free(locinfo->lconv->negative_sign); - } - free(locinfo->lconv_intl_refcount); - free(locinfo->lconv_num_refcount); - free(locinfo->lconv_mon_refcount); - free(locinfo->lconv); - - free(locinfo->ctype1_refcount); - free(locinfo->ctype1); - - free(locinfo->pclmap); - free(locinfo->pcumap); - - free(locinfo->lc_time_curr); - - free(locinfo); + MSVCRT_free(locinfo->lconv->decimal_point); + MSVCRT_free(locinfo->lconv->thousands_sep); + MSVCRT_free(locinfo->lconv->grouping); + MSVCRT_free(locinfo->lconv->int_curr_symbol); + MSVCRT_free(locinfo->lconv->currency_symbol); + MSVCRT_free(locinfo->lconv->mon_decimal_point); + MSVCRT_free(locinfo->lconv->mon_thousands_sep); + MSVCRT_free(locinfo->lconv->mon_grouping); + MSVCRT_free(locinfo->lconv->positive_sign); + MSVCRT_free(locinfo->lconv->negative_sign); + } + MSVCRT_free(locinfo->lconv_intl_refcount); + MSVCRT_free(locinfo->lconv_num_refcount); + MSVCRT_free(locinfo->lconv_mon_refcount); + MSVCRT_free(locinfo->lconv); + + MSVCRT_free(locinfo->ctype1_refcount); + MSVCRT_free(locinfo->ctype1); + + MSVCRT_free(locinfo->pclmap); + MSVCRT_free(locinfo->pcumap); + + MSVCRT_free(locinfo->lc_time_curr); + + MSVCRT_free(locinfo); } /* INTERNAL: frees MSVCRT_pthreadmbcinfo struct */ @@ -686,13 +690,13 @@ if(InterlockedDecrement(&mbcinfo->refcount)) return; - free(mbcinfo); + MSVCRT_free(mbcinfo); } /* _get_current_locale - not exported in native msvcrt */ MSVCRT__locale_t CDECL MSVCRT__get_current_locale(void) { - MSVCRT__locale_t loc = malloc(sizeof(MSVCRT__locale_tstruct)); + MSVCRT__locale_t loc = MSVCRT_malloc(sizeof(MSVCRT__locale_tstruct)); if(!loc) return NULL; @@ -711,7 +715,7 @@ free_locinfo(locale->locinfo); free_mbcinfo(locale->mbcinfo); - free(locale); + MSVCRT_free(locale); } /* _create_locale - not exported in native msvcrt */ @@ -748,50 +752,61 @@ MSVCRT__locale_t loc; LCID lcid[6] = { 0 }, lcid_tmp; + unsigned short cp[6] = { 0 }; char buf[256]; int i, ret, size; TRACE("(%d %s)\n", category, locale); - if(category<LC_MIN || category>LC_MAX || !locale) + if(category<MSVCRT_LC_MIN || category>MSVCRT_LC_MAX || !locale) return NULL; - if(locale[0]=='C' && !locale[1]) - lcid[0] = CP_ACP; - else if(!locale[0]) + if(locale[0]=='C' && !locale[1]) { + lcid[0] = 0; + cp[0] = CP_ACP; + } else if(!locale[0]) { lcid[0] = GetSystemDefaultLCID(); - else if (locale[0] == 'L' && locale[1] == 'C' && locale[2] == '_') { + GetLocaleInfoA(lcid[0], LOCALE_IDEFAULTANSICODEPAGE + |LOCALE_NOUSEROVERRIDE, buf, sizeof(buf)); + cp[0] = atoi(buf); + + for(i=1; i<6; i++) { + lcid[i] = lcid[0]; + cp[i] = cp[0]; + } + } else if (locale[0] == 'L' && locale[1] == 'C' && locale[2] == '_') { const char *p; while(1) { locale += 3; /* LC_ */ if(!memcmp(locale, collate, sizeof(collate)-1)) { - i = LC_COLLATE; + i = MSVCRT_LC_COLLATE; locale += sizeof(collate)-1; } else if(!memcmp(locale, ctype, sizeof(ctype)-1)) { - i = LC_CTYPE; + i = MSVCRT_LC_CTYPE; locale += sizeof(ctype)-1; } else if(!memcmp(locale, monetary, sizeof(monetary)-1)) { - i = LC_MONETARY; + i = MSVCRT_LC_MONETARY; locale += sizeof(monetary)-1; } else if(!memcmp(locale, numeric, sizeof(numeric)-1)) { - i = LC_NUMERIC; + i = MSVCRT_LC_NUMERIC; locale += sizeof(numeric)-1; } else if(!memcmp(locale, time, sizeof(time)-1)) { - i = LC_TIME; + i = MSVCRT_LC_TIME; locale += sizeof(time)-1; } else return NULL; p = strchr(locale, ';'); - if(locale[0]=='C' && (locale[1]==';' || locale[1]=='\0')) + if(locale[0]=='C' && (locale[1]==';' || locale[1]=='\0')) { lcid[i] = 0; - else if(p) { + cp[i] = CP_ACP; + } else if(p) { memcpy(buf, locale, p-locale); buf[p-locale] = '\0'; - lcid[i] = MSVCRT_locale_to_LCID(buf); + lcid[i] = MSVCRT_locale_to_LCID(buf, &cp[i]); } else - lcid[i] = MSVCRT_locale_to_LCID(locale); + lcid[i] = MSVCRT_locale_to_LCID(locale, &cp[i]); if(lcid[i] == -1) return NULL; @@ -802,30 +817,30 @@ locale = p+1; } } else { - lcid[0] = MSVCRT_locale_to_LCID(locale); + lcid[0] = MSVCRT_locale_to_LCID(locale, &cp[0]); if(lcid[0] == -1) return NULL; - } - - for(i=1; i<6; i++) { - if(!lcid[i]) + + for(i=1; i<6; i++) { lcid[i] = lcid[0]; - } - - loc = malloc(sizeof(MSVCRT__locale_tstruct)); + cp[i] = cp[0]; + } + } + + loc = MSVCRT_malloc(sizeof(MSVCRT__locale_tstruct)); if(!loc) return NULL; - loc->locinfo = malloc(sizeof(MSVCRT_threadlocinfo)); + loc->locinfo = MSVCRT_malloc(sizeof(MSVCRT_threadlocinfo)); if(!loc->locinfo) { - free(loc); + MSVCRT_free(loc); return NULL; } - loc->mbcinfo = malloc(sizeof(MSVCRT_threadmbcinfo)); + loc->mbcinfo = MSVCRT_malloc(sizeof(MSVCRT_threadmbcinfo)); if(!loc->mbcinfo) { - free(loc->locinfo); - free(loc); + MSVCRT_free(loc->locinfo); + MSVCRT_free(loc); return NULL; } @@ -833,49 +848,49 @@ loc->locinfo->refcount = 1; loc->mbcinfo->refcount = 1; - loc->locinfo->lconv = malloc(sizeof(struct MSVCRT_lconv)); + loc->locinfo->lconv = MSVCRT_malloc(sizeof(struct MSVCRT_lconv)); if(!loc->locinfo->lconv) { MSVCRT__free_locale(loc); return NULL; } memset(loc->locinfo->lconv, 0, sizeof(struct MSVCRT_lconv)); - loc->locinfo->pclmap = malloc(sizeof(char[256])); - loc->locinfo->pcumap = malloc(sizeof(char[256])); + loc->locinfo->pclmap = MSVCRT_malloc(sizeof(char[256])); + loc->locinfo->pcumap = MSVCRT_malloc(sizeof(char[256])); if(!loc->locinfo->pclmap || !loc->locinfo->pcumap) { MSVCRT__free_locale(loc); return NULL; } - if(lcid[LC_COLLATE] && (category==LC_ALL || category==LC_COLLATE)) { - if(update_threadlocinfo_category(lcid[LC_COLLATE], loc, LC_COLLATE)) { - MSVCRT__free_locale(loc); - return NULL; - } - - loc->locinfo->lc_collate_cp = loc->locinfo->lc_id[LC_COLLATE].wCodePage; + if(lcid[MSVCRT_LC_COLLATE] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_COLLATE)) { + if(update_threadlocinfo_category(lcid[MSVCRT_LC_COLLATE], cp[MSVCRT_LC_COLLATE], loc, MSVCRT_LC_COLLATE)) { + MSVCRT__free_locale(loc); + return NULL; + } + + loc->locinfo->lc_collate_cp = loc->locinfo->lc_id[MSVCRT_LC_COLLATE].wCodePage; } else loc->locinfo->lc_category[LC_COLLATE].locale = _strdup("C"); - if(lcid[LC_CTYPE] && (category==LC_ALL || category==LC_CTYPE)) { - CPINFO cp; + if(lcid[MSVCRT_LC_CTYPE] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_CTYPE)) { + CPINFO cp_info; int j; - if(update_threadlocinfo_category(lcid[LC_CTYPE], loc, LC_CTYPE)) { - MSVCRT__free_locale(loc); - return NULL; - } - - loc->locinfo->lc_codepage = loc->locinfo->lc_id[LC_CTYPE].wCodePage; + if(update_threadlocinfo_category(lcid[MSVCRT_LC_CTYPE], cp[MSVCRT_LC_CTYPE], loc, MSVCRT_LC_CTYPE)) { + MSVCRT__free_locale(loc); + return NULL; + } + + loc->locinfo->lc_codepage = loc->locinfo->lc_id[MSVCRT_LC_CTYPE].wCodePage; loc->locinfo->lc_clike = 1; - if(!GetCPInfo(loc->locinfo->lc_codepage, &cp)) { - MSVCRT__free_locale(loc); - return NULL; - } - loc->locinfo->mb_cur_max = cp.MaxCharSize; - - loc->locinfo->ctype1_refcount = malloc(sizeof(int)); - loc->locinfo->ctype1 = malloc(sizeof(short[257])); + if(!GetCPInfo(loc->locinfo->lc_codepage, &cp_info)) { + MSVCRT__free_locale(loc); + return NULL; + } + loc->locinfo->mb_cur_max = cp_info.MaxCharSize; + + loc->locinfo->ctype1_refcount = MSVCRT_malloc(sizeof(int)); + loc->locinfo->ctype1 = MSVCRT_malloc(sizeof(short[257])); if(!loc->locinfo->ctype1_refcount || !loc->locinfo->ctype1) { MSVCRT__free_locale(loc); return NULL; @@ -892,12 +907,12 @@ /* builtin GetStringTypeA doesn't set output to 0 on invalid input */ loc->locinfo->ctype1[i] = 0; - GetStringTypeA(lcid[LC_CTYPE], CT_CTYPE1, buf, + GetStringTypeA(lcid[MSVCRT_LC_CTYPE], CT_CTYPE1, buf, 1, loc->locinfo->ctype1+i); } - for(i=0; cp.LeadByte[i+1]!=0; i+=2) - for(j=cp.LeadByte[i]; j<=cp.LeadByte[i+1]; j++) + for(i=0; cp_info.LeadByte[i+1]!=0; i+=2) + for(j=cp_info.LeadByte[i]; j<=cp_info.LeadByte[i+1]; j++) loc->locinfo->ctype1[j+1] |= _LEADBYTE; } else { loc->locinfo->lc_clike = 1; @@ -914,10 +929,10 @@ } - if(lcid[LC_CTYPE]) { - LCMapStringA(lcid[LC_CTYPE], LCMAP_LOWERCASE, buf, 256, + if(lcid[MSVCRT_LC_CTYPE]) { + LCMapStringA(lcid[MSVCRT_LC_CTYPE], LCMAP_LOWERCASE, buf, 256, (char*)loc->locinfo->pclmap, 256); - LCMapStringA(lcid[LC_CTYPE], LCMAP_UPPERCASE, buf, 256, + LCMapStringA(lcid[MSVCRT_LC_CTYPE], LCMAP_UPPERCASE, buf, 256, (char*)loc->locinfo->pcumap, 256); } else { for(i=0; i<256; i++) { @@ -926,16 +941,16 @@ } } - _setmbcp_l(loc->locinfo->lc_id[LC_CTYPE].wCodePage, lcid[LC_CTYPE], loc->mbcinfo); - - if(lcid[LC_MONETARY] && (category==LC_ALL || category==LC_MONETARY)) { - if(update_threadlocinfo_category(lcid[LC_MONETARY], loc, LC_MONETARY)) { - MSVCRT__free_locale(loc); - return NULL; - } - - loc->locinfo->lconv_intl_refcount = malloc(sizeof(int)); - loc->locinfo->lconv_mon_refcount = malloc(sizeof(int)); + _setmbcp_l(loc->locinfo->lc_id[MSVCRT_LC_CTYPE].wCodePage, lcid[MSVCRT_LC_CTYPE], loc->mbcinfo); + + if(lcid[MSVCRT_LC_MONETARY] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_MONETARY)) { + if(update_threadlocinfo_category(lcid[MSVCRT_LC_MONETARY], cp[MSVCRT_LC_MONETARY], loc, MSVCRT_LC_MONETARY)) { + MSVCRT__free_locale(loc); + return NULL; + } + + loc->locinfo->lconv_intl_refcount = MSVCRT_malloc(sizeof(int)); + loc->locinfo->lconv_mon_refcount = MSVCRT_malloc(sizeof(int)); if(!loc->locinfo->lconv_intl_refcount || !loc->locinfo->lconv_mon_refcount) { MSVCRT__free_locale(loc); return NULL; @@ -944,47 +959,47 @@ *loc->locinfo->lconv_intl_refcount = 1; *loc->locinfo->lconv_mon_refcount = 1; - i = GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_SINTLSYMBOL + i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SINTLSYMBOL |LOCALE_NOUSEROVERRIDE, buf, 256); - if(i && (loc->locinfo->lconv->int_curr_symbol = malloc(i))) + if(i && (loc->locinfo->lconv->int_curr_symbol = MSVCRT_malloc(i))) memcpy(loc->locinfo->lconv->int_curr_symbol, buf, i); else { MSVCRT__free_locale(loc); return NULL; } - i = GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_SCURRENCY + i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SCURRENCY |LOCALE_NOUSEROVERRIDE, buf, 256); - if(i && (loc->locinfo->lconv->currency_symbol = malloc(i))) + if(i && (loc->locinfo->lconv->currency_symbol = MSVCRT_malloc(i))) memcpy(loc->locinfo->lconv->currency_symbol, buf, i); else { MSVCRT__free_locale(loc); return NULL; } - i = GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_SMONDECIMALSEP + i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONDECIMALSEP |LOCALE_NOUSEROVERRIDE, buf, 256); - if(i && (loc->locinfo->lconv->mon_decimal_point = malloc(i))) + if(i && (loc->locinfo->lconv->mon_decimal_point = MSVCRT_malloc(i))) memcpy(loc->locinfo->lconv->mon_decimal_point, buf, i); else { MSVCRT__free_locale(loc); return NULL; } - i = GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_SMONTHOUSANDSEP + i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONTHOUSANDSEP |LOCALE_NOUSEROVERRIDE, buf, 256); - if(i && (loc->locinfo->lconv->mon_thousands_sep = malloc(i))) + if(i && (loc->locinfo->lconv->mon_thousands_sep = MSVCRT_malloc(i))) memcpy(loc->locinfo->lconv->mon_thousands_sep, buf, i); else { MSVCRT__free_locale(loc); return NULL; } - i = GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_SMONGROUPING + i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SMONGROUPING |LOCALE_NOUSEROVERRIDE, buf, 256); if(i>1) i = i/2 + (buf[i-2]=='0'?0:1); - if(i && (loc->locinfo->lconv->mon_grouping = malloc(i))) { + if(i && (loc->locinfo->lconv->mon_grouping = MSVCRT_malloc(i))) { for(i=0; buf[i+1]==';'; i+=2) loc->locinfo->lconv->mon_grouping[i/2] = buf[i]-'0'; loc->locinfo->lconv->mon_grouping[i/2] = buf[i]-'0'; @@ -995,25 +1010,25 @@ return NULL; } - i = GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_SPOSITIVESIGN + i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SPOSITIVESIGN |LOCALE_NOUSEROVERRIDE, buf, 256); - if(i && (loc->locinfo->lconv->positive_sign = malloc(i))) + if(i && (loc->locinfo->lconv->positive_sign = MSVCRT_malloc(i))) memcpy(loc->locinfo->lconv->positive_sign, buf, i); else { MSVCRT__free_locale(loc); return NULL; } - i = GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_SNEGATIVESIGN + i = GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_SNEGATIVESIGN |LOCALE_NOUSEROVERRIDE, buf, 256); - if(i && (loc->locinfo->lconv->negative_sign = malloc(i))) + if(i && (loc->locinfo->lconv->negative_sign = MSVCRT_malloc(i))) memcpy(loc->locinfo->lconv->negative_sign, buf, i); else { MSVCRT__free_locale(loc); return NULL; } - if(GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_IINTLCURRDIGITS + if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IINTLCURRDIGITS |LOCALE_NOUSEROVERRIDE, buf, 256)) loc->locinfo->lconv->int_frac_digits = atoi(buf); else { @@ -1021,7 +1036,7 @@ return NULL; } - if(GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_ICURRDIGITS + if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_ICURRDIGITS |LOCALE_NOUSEROVERRIDE, buf, 256)) loc->locinfo->lconv->frac_digits = atoi(buf); else { @@ -1029,7 +1044,7 @@ return NULL; } - if(GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_IPOSSYMPRECEDES + if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IPOSSYMPRECEDES |LOCALE_NOUSEROVERRIDE, buf, 256)) loc->locinfo->lconv->p_cs_precedes = atoi(buf); else { @@ -1037,7 +1052,7 @@ return NULL; } - if(GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_IPOSSEPBYSPACE + if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IPOSSEPBYSPACE |LOCALE_NOUSEROVERRIDE, buf, 256)) loc->locinfo->lconv->p_sep_by_space = atoi(buf); else { @@ -1045,7 +1060,7 @@ return NULL; } - if(GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_INEGSYMPRECEDES + if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_INEGSYMPRECEDES |LOCALE_NOUSEROVERRIDE, buf, 256)) loc->locinfo->lconv->n_cs_precedes = atoi(buf); else { @@ -1053,7 +1068,7 @@ return NULL; } - if(GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_INEGSEPBYSPACE + if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_INEGSEPBYSPACE |LOCALE_NOUSEROVERRIDE, buf, 256)) loc->locinfo->lconv->n_sep_by_space = atoi(buf); else { @@ -1061,7 +1076,7 @@ return NULL; } - if(GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_IPOSSIGNPOSN + if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_IPOSSIGNPOSN |LOCALE_NOUSEROVERRIDE, buf, 256)) loc->locinfo->lconv->p_sign_posn = atoi(buf); else { @@ -1069,7 +1084,7 @@ return NULL; } - if(GetLocaleInfoA(lcid[LC_MONETARY], LOCALE_INEGSIGNPOSN + if(GetLocaleInfoA(lcid[MSVCRT_LC_MONETARY], LOCALE_INEGSIGNPOSN |LOCALE_NOUSEROVERRIDE, buf, 256)) loc->locinfo->lconv->n_sign_posn = atoi(buf); else { @@ -1077,13 +1092,13 @@ return NULL; } } else { - loc->locinfo->lconv->int_curr_symbol = malloc(sizeof(char)); - loc->locinfo->lconv->currency_symbol = malloc(sizeof(char)); - loc->locinfo->lconv->mon_decimal_point = malloc(sizeof(char)); - loc->locinfo->lconv->mon_thousands_sep = malloc(sizeof(char)); - loc->locinfo->lconv->mon_grouping = malloc(sizeof(char)); - loc->locinfo->lconv->positive_sign = malloc(sizeof(char)); - loc->locinfo->lconv->negative_sign = malloc(sizeof(char)); + loc->locinfo->lconv->int_curr_symbol = MSVCRT_malloc(sizeof(char)); + loc->locinfo->lconv->currency_symbol = MSVCRT_malloc(sizeof(char)); + loc->locinfo->lconv->mon_decimal_point = MSVCRT_malloc(sizeof(char)); + loc->locinfo->lconv->mon_thousands_sep = MSVCRT_malloc(sizeof(char)); + loc->locinfo->lconv->mon_grouping = MSVCRT_malloc(sizeof(char)); + loc->locinfo->lconv->positive_sign = MSVCRT_malloc(sizeof(char)); + loc->locinfo->lconv->negative_sign = MSVCRT_malloc(sizeof(char)); if(!loc->locinfo->lconv->int_curr_symbol || !loc->locinfo->lconv->currency_symbol || !loc->locinfo->lconv->mon_decimal_point || !loc->locinfo->lconv->mon_thousands_sep @@ -1112,15 +1127,15 @@ loc->locinfo->lc_category[LC_MONETARY].locale = _strdup("C"); } - if(lcid[LC_NUMERIC] && (category==LC_ALL || category==LC_NUMERIC)) { - if(update_threadlocinfo_category(lcid[LC_NUMERIC], loc, LC_NUMERIC)) { + if(lcid[MSVCRT_LC_NUMERIC] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_NUMERIC)) { + if(update_threadlocinfo_category(lcid[MSVCRT_LC_NUMERIC], cp[MSVCRT_LC_NUMERIC], loc, MSVCRT_LC_NUMERIC)) { MSVCRT__free_locale(loc); return NULL; } if(!loc->locinfo->lconv_intl_refcount) - loc->locinfo->lconv_intl_refcount = malloc(sizeof(int)); - loc->locinfo->lconv_num_refcount = malloc(sizeof(int)); + loc->locinfo->lconv_intl_refcount = MSVCRT_malloc(sizeof(int)); + loc->locinfo->lconv_num_refcount = MSVCRT_malloc(sizeof(int)); if(!loc->locinfo->lconv_intl_refcount || !loc->locinfo->lconv_num_refcount) { MSVCRT__free_locale(loc); return NULL; @@ -1129,29 +1144,29 @@ *loc->locinfo->lconv_intl_refcount = 1; *loc->locinfo->lconv_num_refcount = 1; - i = GetLocaleInfoA(lcid[LC_NUMERIC], LOCALE_SDECIMAL + i = GetLocaleInfoA(lcid[MSVCRT_LC_NUMERIC], LOCALE_SDECIMAL |LOCALE_NOUSEROVERRIDE, buf, 256); - if(i && (loc->locinfo->lconv->decimal_point = malloc(i))) + if(i && (loc->locinfo->lconv->decimal_point = MSVCRT_malloc(i))) memcpy(loc->locinfo->lconv->decimal_point, buf, i); else { MSVCRT__free_locale(loc); return NULL; } - i = GetLocaleInfoA(lcid[LC_NUMERIC], LOCALE_STHOUSAND + i = GetLocaleInfoA(lcid[MSVCRT_LC_NUMERIC], LOCALE_STHOUSAND |LOCALE_NOUSEROVERRIDE, buf, 256); - if(i && (loc->locinfo->lconv->thousands_sep = malloc(i))) + if(i && (loc->locinfo->lconv->thousands_sep = MSVCRT_malloc(i))) memcpy(loc->locinfo->lconv->thousands_sep, buf, i); else { MSVCRT__free_locale(loc); return NULL; } - i = GetLocaleInfoA(lcid[LC_NUMERIC], LOCALE_SGROUPING + i = GetLocaleInfoA(lcid[MSVCRT_LC_NUMERIC], LOCALE_SGROUPING |LOCALE_NOUSEROVERRIDE, buf, 256); if(i>1) i = i/2 + (buf[i-2]=='0'?0:1); - if(i && (loc->locinfo->lconv->grouping = malloc(i))) { + if(i && (loc->locinfo->lconv->grouping = MSVCRT_malloc(i))) { for(i=0; buf[i+1]==';'; i+=2) loc->locinfo->lconv->grouping[i/2] = buf[i]-'0'; loc->locinfo->lconv->grouping[i/2] = buf[i]-'0'; @@ -1162,9 +1177,9 @@ return NULL; } } else { - loc->locinfo->lconv->decimal_point = malloc(sizeof(char[2])); - loc->locinfo->lconv->thousands_sep = malloc(sizeof(char)); - loc->locinfo->lconv->grouping = malloc(sizeof(char)); + loc->locinfo->lconv->decimal_point = MSVCRT_malloc(sizeof(char[2])); + loc->locinfo->lconv->thousands_sep = MSVCRT_malloc(sizeof(char)); + loc->locinfo->lconv->grouping = MSVCRT_malloc(sizeof(char)); if(!loc->locinfo->lconv->decimal_point || !loc->locinfo->lconv->thousands_sep || !loc->locinfo->lconv->grouping) { MSVCRT__free_locale(loc); @@ -1179,8 +1194,8 @@ loc->locinfo->lc_category[LC_NUMERIC].locale = _strdup("C"); } - if(lcid[LC_TIME] && (category==LC_ALL || category==LC_TIME)) { - if(update_threadlocinfo_category(lcid[LC_TIME], loc, LC_TIME)) { + if(lcid[MSVCRT_LC_TIME] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_TIME)) { + if(update_threadlocinfo_category(lcid[MSVCRT_LC_TIME], cp[MSVCRT_LC_TIME], loc, MSVCRT_LC_TIME)) { MSVCRT__free_locale(loc); return NULL; } @@ -1188,11 +1203,11 @@ loc->locinfo->lc_category[LC_TIME].locale = _strdup("C"); size = sizeof(MSVCRT___lc_time_data); - lcid_tmp = lcid[LC_TIME] ? lcid[LC_TIME] : MAKELCID(LANG_ENGLISH, SORT_DEFAULT); + lcid_tmp = lcid[MSVCRT_LC_TIME] ? lcid[MSVCRT_LC_TIME] : MAKELCID(LANG_ENGLISH, SORT_DEFAULT); for(i=0; i<sizeof(time_data)/sizeof(time_data[0]); i++) { - if(time_data[i]==LOCALE_SSHORTDATE && !lcid[LC_TIME]) { + if(time_data[i]==LOCALE_SSHORTDATE && !lcid[MSVCRT_LC_TIME]) { size += sizeof(cloc_short_date) + sizeof(cloc_short_dateW); - }else if(time_data[i]==LOCALE_SSHORTDATE && !lcid[LC_TIME]) { + }else if(time_data[i]==LOCALE_SSHORTDATE && !lcid[MSVCRT_LC_TIME]) { size += sizeof(cloc_long_date) + sizeof(cloc_long_dateW); }else { ret = GetLocaleInfoA(lcid_tmp, time_data[i] @@ -1213,7 +1228,7 @@ } } - loc->locinfo->lc_time_curr = malloc(size); + loc->locinfo->lc_time_curr = MSVCRT_malloc(size); if(!loc->locinfo->lc_time_curr) { MSVCRT__free_locale(loc); return NULL; @@ -1222,13 +1237,13 @@ ret = 0; for(i=0; i<sizeof(time_data)/sizeof(time_data[0]); i++) { loc->locinfo->lc_time_curr->str.str[i] = &loc->locinfo->lc_time_curr->data[ret]; - if(time_data[i]==LOCALE_SSHORTDATE && !lcid[LC_TIME]) { + if(time_data[i]==LOCALE_SSHORTDATE && !lcid[MSVCRT_LC_TIME]) { memcpy(&loc->locinfo->lc_time_curr->data[ret], cloc_short_date, sizeof(cloc_short_date)); ret += sizeof(cloc_short_date); - }else if(time_data[i]==LOCALE_SSHORTDATE && !lcid[LC_TIME]) { + }else if(time_data[i]==LOCALE_SSHORTDATE && !lcid[MSVCRT_LC_TIME]) { memcpy(&loc->locinfo->lc_time_curr->data[ret], cloc_long_date, sizeof(cloc_long_date)); ret += sizeof(cloc_long_date); - }else if(time_data[i]==LOCALE_STIMEFORMAT && !lcid[LC_TIME]) { + }else if(time_data[i]==LOCALE_STIMEFORMAT && !lcid[MSVCRT_LC_TIME]) { memcpy(&loc->locinfo->lc_time_curr->data[ret], cloc_time, sizeof(cloc_time)); ret += sizeof(cloc_time); }else { @@ -1238,13 +1253,13 @@ } for(i=0; i<sizeof(time_data)/sizeof(time_data[0]); i++) { loc->locinfo->lc_time_curr->wstr[i] = (wchar_t*)&loc->locinfo->lc_time_curr->data[ret]; - if(time_data[i]==LOCALE_SSHORTDATE && !lcid[LC_TIME]) { + if(time_data[i]==LOCALE_SSHORTDATE && !lcid[MSVCRT_LC_TIME]) { memcpy(&loc->locinfo->lc_time_curr->data[ret], cloc_short_dateW, sizeof(cloc_short_dateW)); ret += sizeof(cloc_short_dateW); - }else if(time_data[i]==LOCALE_SSHORTDATE && !lcid[LC_TIME]) { + }else if(time_data[i]==LOCALE_SSHORTDATE && !lcid[MSVCRT_LC_TIME]) { memcpy(&loc->locinfo->lc_time_curr->data[ret], cloc_long_dateW, sizeof(cloc_long_dateW)); ret += sizeof(cloc_long_dateW); - }else if(time_data[i]==LOCALE_STIMEFORMAT && !lcid[LC_TIME]) { + }else if(time_data[i]==LOCALE_STIMEFORMAT && !lcid[MSVCRT_LC_TIME]) { memcpy(&loc->locinfo->lc_time_curr->data[ret], cloc_timeW, sizeof(cloc_timeW)); ret += sizeof(cloc_timeW); }else { @@ -1252,7 +1267,7 @@ (wchar_t*)&loc->locinfo->lc_time_curr->data[ret], size-ret)*sizeof(wchar_t); } } - loc->locinfo->lc_time_curr->lcid = lcid[LC_TIME]; + loc->locinfo->lc_time_curr->lcid = lcid[MSVCRT_LC_TIME]; return loc; } @@ -1265,11 +1280,11 @@ MSVCRT__locale_t loc; MSVCRT_pthreadlocinfo locinfo = get_locinfo(); - if(category<LC_MIN || category>LC_MAX) + if(category<MSVCRT_LC_MIN || category>MSVCRT_LC_MAX) return NULL; if(!locale) { - if(category == LC_ALL) + if(category == MSVCRT_LC_ALL) return construct_lc_all(locinfo); return locinfo->lc_category[category].locale; @@ -1284,26 +1299,26 @@ LOCK_LOCALE; switch(category) { - case LC_ALL: - case LC_COLLATE: + case MSVCRT_LC_ALL: + case MSVCRT_LC_COLLATE: locinfo->lc_collate_cp = loc->locinfo->lc_collate_cp; - locinfo->lc_handle[LC_COLLATE] = - loc->locinfo->lc_handle[LC_COLLATE]; - swap_pointers((void**)&locinfo->lc_category[LC_COLLATE].locale, - (void**)&loc->locinfo->lc_category[LC_COLLATE].locale); - swap_pointers((void**)&locinfo->lc_category[LC_COLLATE].refcount, - (void**)&loc->locinfo->lc_category[LC_COLLATE].refcount); - - if(category != LC_ALL) + locinfo->lc_handle[MSVCRT_LC_COLLATE] = + loc->locinfo->lc_handle[MSVCRT_LC_COLLATE]; + swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_COLLATE].locale, + (void**)&loc->locinfo->lc_category[MSVCRT_LC_COLLATE].locale); + swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_COLLATE].refcount, + (void**)&loc->locinfo->lc_category[MSVCRT_LC_COLLATE].refcount); + + if(category != MSVCRT_LC_ALL) break; /* fall through */ - case LC_CTYPE: - locinfo->lc_handle[LC_CTYPE] = - loc->locinfo->lc_handle[LC_CTYPE]; - swap_pointers((void**)&locinfo->lc_category[LC_CTYPE].locale, - (void**)&loc->locinfo->lc_category[LC_CTYPE].locale); - swap_pointers((void**)&locinfo->lc_category[LC_CTYPE].refcount, - (void**)&loc->locinfo->lc_category[LC_CTYPE].refcount); + case MSVCRT_LC_CTYPE: + locinfo->lc_handle[MSVCRT_LC_CTYPE] = + loc->locinfo->lc_handle[MSVCRT_LC_CTYPE]; + swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_CTYPE].locale, + (void**)&loc->locinfo->lc_category[MSVCRT_LC_CTYPE].locale); + swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_CTYPE].refcount, + (void**)&loc->locinfo->lc_category[MSVCRT_LC_CTYPE].refcount); locinfo->lc_codepage = loc->locinfo->lc_codepage; locinfo->lc_clike = loc->locinfo->lc_clike; @@ -1316,16 +1331,16 @@ swap_pointers((void**)&locinfo->pclmap, (void**)&loc->locinfo->pclmap); swap_pointers((void**)&locinfo->pcumap, (void**)&loc->locinfo->pcumap); - if(category != LC_ALL) + if(category != MSVCRT_LC_ALL) break; /* fall through */ - case LC_MONETARY: - locinfo->lc_handle[LC_MONETARY] = - loc->locinfo->lc_handle[LC_MONETARY]; - swap_pointers((void**)&locinfo->lc_category[LC_MONETARY].locale, - (void**)&loc->locinfo->lc_category[LC_MONETARY].locale); - swap_pointers((void**)&locinfo->lc_category[LC_MONETARY].refcount, - (void**)&loc->locinfo->lc_category[LC_MONETARY].refcount); + case MSVCRT_LC_MONETARY: + locinfo->lc_handle[MSVCRT_LC_MONETARY] = + loc->locinfo->lc_handle[MSVCRT_LC_MONETARY]; + swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_MONETARY].locale, + (void**)&loc->locinfo->lc_category[MSVCRT_LC_MONETARY].locale); + swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_MONETARY].refcount, + (void**)&loc->locinfo->lc_category[MSVCRT_LC_MONETARY].refcount); swap_pointers((void**)&locinfo->lconv->int_curr_symbol, (void**)&loc->locinfo->lconv->int_curr_symbol); @@ -1350,16 +1365,16 @@ locinfo->lconv->p_sign_posn = loc->locinfo->lconv->p_sign_posn; locinfo->lconv->n_sign_posn = loc->locinfo->lconv->n_sign_posn; - if(category != LC_ALL) + if(category != MSVCRT_LC_ALL) break; /* fall through */ - case LC_NUMERIC: - locinfo->lc_handle[LC_NUMERIC] = - loc->locinfo->lc_handle[LC_NUMERIC]; - swap_pointers((void**)&locinfo->lc_category[LC_NUMERIC].locale, - (void**)&loc->locinfo->lc_category[LC_NUMERIC].locale); - swap_pointers((void**)&locinfo->lc_category[LC_NUMERIC].refcount, - (void**)&loc->locinfo->lc_category[LC_NUMERIC].refcount); + case MSVCRT_LC_NUMERIC: + locinfo->lc_handle[MSVCRT_LC_NUMERIC] = + loc->locinfo->lc_handle[MSVCRT_LC_NUMERIC]; + swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_NUMERIC].locale, + (void**)&loc->locinfo->lc_category[MSVCRT_LC_NUMERIC].locale); + swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_NUMERIC].refcount, + (void**)&loc->locinfo->lc_category[MSVCRT_LC_NUMERIC].refcount); swap_pointers((void**)&locinfo->lconv->decimal_point, (void**)&loc->locinfo->lconv->decimal_point); @@ -1368,20 +1383,20 @@ swap_pointers((void**)&locinfo->lconv->grouping, (void**)&loc->locinfo->lconv->grouping); - if(category != LC_ALL) + if(category != MSVCRT_LC_ALL) break; /* fall through */ - case LC_TIME: - locinfo->lc_handle[LC_TIME] = - loc->locinfo->lc_handle[LC_TIME]; - swap_pointers((void**)&locinfo->lc_category[LC_TIME].locale, - (void**)&loc->locinfo->lc_category[LC_TIME].locale); - swap_pointers((void**)&locinfo->lc_category[LC_TIME].refcount, - (void**)&loc->locinfo->lc_category[LC_TIME].refcount); + case MSVCRT_LC_TIME: + locinfo->lc_handle[MSVCRT_LC_TIME] = + loc->locinfo->lc_handle[MSVCRT_LC_TIME]; + swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_TIME].locale, + (void**)&loc->locinfo->lc_category[MSVCRT_LC_TIME].locale); + swap_pointers((void**)&locinfo->lc_category[MSVCRT_LC_TIME].refcount, + (void**)&loc->locinfo->lc_category[MSVCRT_LC_TIME].refcount); swap_pointers((void**)&locinfo->lc_time_curr, (void**)&loc->locinfo->lc_time_curr); - if(category != LC_ALL) + if(category != MSVCRT_LC_ALL) break; } @@ -1399,7 +1414,7 @@ MSVCRT___lc_handle[i] = MSVCRT_locale->locinfo->lc_handle[i]; } - if(category == LC_ALL) + if(category == MSVCRT_LC_ALL) return construct_lc_all(locinfo); _Analysis_assume_(category <= 5); @@ -1428,7 +1443,7 @@ data->locinfo = locale->locinfo; data->mbcinfo = locale->mbcinfo; data->have_locale = TRUE; - free(locale); + MSVCRT_free(locale); } return ret; Modified: trunk/reactos/lib/sdk/crt/mbstring/_setmbcp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/mbstring/_setm…
============================================================================== --- trunk/reactos/lib/sdk/crt/mbstring/_setmbcp.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/mbstring/_setmbcp.c [iso-8859-1] Wed Apr 3 22:46:22 2013 @@ -89,7 +89,7 @@ if(lcid == -1) { sprintf(bufA, format, newcp); - mbcinfo->mblcid = MSVCRT_locale_to_LCID(bufA); + mbcinfo->mblcid = MSVCRT_locale_to_LCID(bufA, NULL); } else { mbcinfo->mblcid = lcid; }
11 years, 8 months
1
0
0
0
[akhaldi] 58669: [CRYPT32_WINETEST] * Sync with Wine 1.5.26.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Apr 3 22:43:36 2013 New Revision: 58669 URL:
http://svn.reactos.org/svn/reactos?rev=58669&view=rev
Log: [CRYPT32_WINETEST] * Sync with Wine 1.5.26. Modified: trunk/rostests/winetests/crypt32/base64.c trunk/rostests/winetests/crypt32/cert.c trunk/rostests/winetests/crypt32/chain.c trunk/rostests/winetests/crypt32/crl.c trunk/rostests/winetests/crypt32/ctl.c trunk/rostests/winetests/crypt32/encode.c trunk/rostests/winetests/crypt32/main.c trunk/rostests/winetests/crypt32/message.c trunk/rostests/winetests/crypt32/msg.c trunk/rostests/winetests/crypt32/object.c trunk/rostests/winetests/crypt32/oid.c trunk/rostests/winetests/crypt32/protectdata.c trunk/rostests/winetests/crypt32/sip.c trunk/rostests/winetests/crypt32/store.c trunk/rostests/winetests/crypt32/str.c trunk/rostests/winetests/crypt32/testlist.c Modified: trunk/rostests/winetests/crypt32/base64.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/base64.…
============================================================================== --- trunk/rostests/winetests/crypt32/base64.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/base64.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -18,14 +18,14 @@ * 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 <stdio.h> +//#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> #define CERT_HEADER "-----BEGIN CERTIFICATE-----\r\n" #define ALT_CERT_HEADER "-----BEGIN This is some arbitrary text that goes on and on-----\r\n" Modified: trunk/rostests/winetests/crypt32/cert.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/cert.c?…
============================================================================== --- trunk/rostests/winetests/crypt32/cert.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/cert.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -18,16 +18,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> +//#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winreg.h> -#include <winerror.h> +//#include <winreg.h> +//#include <winerror.h> #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> static BOOL (WINAPI *pCertAddStoreToCollection)(HCERTSTORE,HCERTSTORE,DWORD,DWORD); static PCCERT_CONTEXT (WINAPI *pCertCreateSelfSignCertificate)(HCRYPTPROV_OR_NCRYPT_KEY_HANDLE,PCERT_NAME_BLOB,DWORD,PCRYPT_KEY_PROV_INFO,PCRYPT_ALGORITHM_IDENTIFIER,PSYSTEMTIME,PSYSTEMTIME,PCERT_EXTENSIONS); @@ -1765,6 +1765,73 @@ DWORD size = 0; BOOL ret; + if (!pCryptEncodeObjectEx) + { + win_skip("no CryptEncodeObjectEx support\n"); + return; + } + ret = CryptVerifyCertificateSignature(0, 0, NULL, 0, NULL); + ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, + "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + ret = CryptVerifyCertificateSignature(csp, 0, NULL, 0, NULL); + ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, + "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + ret = CryptVerifyCertificateSignature(csp, X509_ASN_ENCODING, NULL, 0, + NULL); + ok(!ret && (GetLastError() == CRYPT_E_ASN1_EOD || + GetLastError() == OSS_BAD_ARG), + "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n", GetLastError()); + info.ToBeSigned.cbData = toBeSigned->cbData; + info.ToBeSigned.pbData = toBeSigned->pbData; + info.SignatureAlgorithm.pszObjId = (LPSTR)sigOID; + info.SignatureAlgorithm.Parameters.cbData = 0; + info.Signature.cbData = sigLen; + info.Signature.pbData = (BYTE *)sig; + info.Signature.cUnusedBits = 0; + ret = pCryptEncodeObjectEx(X509_ASN_ENCODING, X509_CERT, &info, + CRYPT_ENCODE_ALLOC_FLAG, NULL, &cert, &size); + ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); + if (cert) + { + PCERT_PUBLIC_KEY_INFO pubKeyInfo = NULL; + DWORD pubKeySize; + + if (0) + { + /* Crashes prior to Vista */ + ret = CryptVerifyCertificateSignature(csp, X509_ASN_ENCODING, + cert, size, NULL); + } + CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, X509_ASN_ENCODING, + (LPSTR)sigOID, 0, NULL, NULL, &pubKeySize); + pubKeyInfo = HeapAlloc(GetProcessHeap(), 0, pubKeySize); + if (pubKeyInfo) + { + ret = CryptExportPublicKeyInfoEx(csp, AT_SIGNATURE, + X509_ASN_ENCODING, (LPSTR)sigOID, 0, NULL, pubKeyInfo, + &pubKeySize); + ok(ret, "CryptExportKey failed: %08x\n", GetLastError()); + if (ret) + { + ret = CryptVerifyCertificateSignature(csp, X509_ASN_ENCODING, + cert, size, pubKeyInfo); + ok(ret, "CryptVerifyCertificateSignature failed: %08x\n", + GetLastError()); + } + HeapFree(GetProcessHeap(), 0, pubKeyInfo); + } + LocalFree(cert); + } +} + +static void testVerifyCertSigEx(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned, + LPCSTR sigOID, const BYTE *sig, DWORD sigLen) +{ + CERT_SIGNED_CONTENT_INFO info; + LPBYTE cert = NULL; + DWORD size = 0; + BOOL ret; + if (!pCryptVerifyCertificateSignatureEx) { win_skip("no CryptVerifyCertificateSignatureEx support\n"); @@ -1875,6 +1942,7 @@ testSignCert(csp, &toBeSigned, szOID_RSA_SHA1RSA, sig, &sigSize); testVerifyCertSig(csp, &toBeSigned, szOID_RSA_SHA1RSA, sig, sigSize); + testVerifyCertSigEx(csp, &toBeSigned, szOID_RSA_SHA1RSA, sig, sigSize); CryptReleaseContext(csp, 0); ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, @@ -2030,7 +2098,6 @@ if (context) { DWORD size = 0; - PCRYPT_KEY_PROV_INFO info; /* The context must have a key provider info property */ ret = CertGetCertificateContextProperty(context, @@ -2038,24 +2105,25 @@ ok(ret && size, "Expected non-zero key provider info\n"); if (size) { - info = HeapAlloc(GetProcessHeap(), 0, size); - if (info) + PCRYPT_KEY_PROV_INFO pInfo = HeapAlloc(GetProcessHeap(), 0, size); + + if (pInfo) { ret = CertGetCertificateContextProperty(context, - CERT_KEY_PROV_INFO_PROP_ID, info, &size); + CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size); ok(ret, "CertGetCertificateContextProperty failed: %08x\n", GetLastError()); if (ret) { /* Sanity-check the key provider */ - ok(!lstrcmpW(info->pwszContainerName, cspNameW), + ok(!lstrcmpW(pInfo->pwszContainerName, cspNameW), "Unexpected key container\n"); - ok(!lstrcmpW(info->pwszProvName, MS_DEF_PROV_W), + ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W), "Unexpected provider\n"); - ok(info->dwKeySpec == AT_SIGNATURE, - "Expected AT_SIGNATURE, got %d\n", info->dwKeySpec); + ok(pInfo->dwKeySpec == AT_SIGNATURE, + "Expected AT_SIGNATURE, got %d\n", pInfo->dwKeySpec); } - HeapFree(GetProcessHeap(), 0, info); + HeapFree(GetProcessHeap(), 0, pInfo); } } @@ -2070,21 +2138,40 @@ CRYPT_DELETEKEYSET); ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); - - /* do the same test with AT_KEYEXCHANGE and key info*/ + /* Do the same test with a CSP, AT_KEYEXCHANGE and key info */ + pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, + CRYPT_DELETEKEYSET); + ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, + CRYPT_NEWKEYSET); + ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + ret = CryptGenKey(csp, AT_SIGNATURE, 0, &key); + ok(ret, "CryptGenKey failed: %08x\n", GetLastError()); + memset(&info,0,sizeof(info)); info.dwProvType = PROV_RSA_FULL; info.dwKeySpec = AT_KEYEXCHANGE; info.pwszProvName = (LPWSTR) MS_DEF_PROV_W; info.pwszContainerName = cspNameW; - context = pCertCreateSelfSignCertificate(0, &name, 0, &info, NULL, NULL, + /* This should fail because the CSP doesn't have the specified key. */ + SetLastError(0xdeadbeef); + context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL, NULL, NULL); - ok(context != NULL, "CertCreateSelfSignCertificate failed: %08x\n", - GetLastError()); + ok(context == NULL, "expected failure\n"); + if (context != NULL) + CertFreeCertificateContext(context); + else + ok(GetLastError() == NTE_NO_KEY, "expected NTE_NO_KEY, got %08x\n", + GetLastError()); + /* Again, with a CSP, AT_SIGNATURE and key info */ + info.dwKeySpec = AT_SIGNATURE; + SetLastError(0xdeadbeef); + context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL, + NULL, NULL); + ok(context != NULL, + "CertCreateSelfSignCertificate failed: %08x\n", GetLastError()); if (context) { DWORD size = 0; - PCRYPT_KEY_PROV_INFO info; /* The context must have a key provider info property */ ret = CertGetCertificateContextProperty(context, @@ -2092,32 +2179,159 @@ ok(ret && size, "Expected non-zero key provider info\n"); if (size) { - info = HeapAlloc(GetProcessHeap(), 0, size); - if (info) + PCRYPT_KEY_PROV_INFO pInfo = HeapAlloc(GetProcessHeap(), 0, size); + + if (pInfo) { ret = CertGetCertificateContextProperty(context, - CERT_KEY_PROV_INFO_PROP_ID, info, &size); + CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size); ok(ret, "CertGetCertificateContextProperty failed: %08x\n", GetLastError()); if (ret) { /* Sanity-check the key provider */ - ok(!lstrcmpW(info->pwszContainerName, cspNameW), + ok(!lstrcmpW(pInfo->pwszContainerName, cspNameW), "Unexpected key container\n"); - ok(!lstrcmpW(info->pwszProvName, MS_DEF_PROV_W), + ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W), "Unexpected provider\n"); - ok(info->dwKeySpec == AT_KEYEXCHANGE, - "Expected AT_KEYEXCHANGE, got %d\n", info->dwKeySpec); + ok(pInfo->dwKeySpec == AT_SIGNATURE, + "Expected AT_SIGNATURE, got %d\n", pInfo->dwKeySpec); } - HeapFree(GetProcessHeap(), 0, info); + HeapFree(GetProcessHeap(), 0, pInfo); } } CertFreeCertificateContext(context); } + CryptDestroyKey(key); + + CryptReleaseContext(csp, 0); + ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, + CRYPT_DELETEKEYSET); + ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + + /* Do the same test with no CSP, AT_KEYEXCHANGE and key info */ + info.dwKeySpec = AT_KEYEXCHANGE; + context = pCertCreateSelfSignCertificate(0, &name, 0, &info, NULL, NULL, + NULL, NULL); + ok(context != NULL, "CertCreateSelfSignCertificate failed: %08x\n", + GetLastError()); + if (context) + { + DWORD size = 0; + + /* The context must have a key provider info property */ + ret = CertGetCertificateContextProperty(context, + CERT_KEY_PROV_INFO_PROP_ID, NULL, &size); + ok(ret && size, "Expected non-zero key provider info\n"); + if (size) + { + PCRYPT_KEY_PROV_INFO pInfo = HeapAlloc(GetProcessHeap(), 0, size); + + if (pInfo) + { + ret = CertGetCertificateContextProperty(context, + CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size); + ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + GetLastError()); + if (ret) + { + /* Sanity-check the key provider */ + ok(!lstrcmpW(pInfo->pwszContainerName, cspNameW), + "Unexpected key container\n"); + ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W), + "Unexpected provider\n"); + ok(pInfo->dwKeySpec == AT_KEYEXCHANGE, + "Expected AT_KEYEXCHANGE, got %d\n", pInfo->dwKeySpec); + } + HeapFree(GetProcessHeap(), 0, pInfo); + } + } + + CertFreeCertificateContext(context); + } pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, CRYPT_DELETEKEYSET); + + /* Acquire a CSP and generate an AT_KEYEXCHANGE key in it. */ + pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, + CRYPT_DELETEKEYSET); + ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, + CRYPT_NEWKEYSET); + ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + + context = pCertCreateSelfSignCertificate(csp, &name, 0, NULL, NULL, NULL, + NULL, NULL); + ok(!context && GetLastError() == NTE_NO_KEY, + "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + ret = CryptGenKey(csp, AT_KEYEXCHANGE, 0, &key); + ok(ret, "CryptGenKey failed: %08x\n", GetLastError()); + + memset(&info,0,sizeof(info)); + info.dwProvType = PROV_RSA_FULL; + info.dwKeySpec = AT_SIGNATURE; + info.pwszProvName = (LPWSTR) MS_DEF_PROV_W; + info.pwszContainerName = cspNameW; + /* This should fail because the CSP doesn't have the specified key. */ + SetLastError(0xdeadbeef); + context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL, + NULL, NULL); + ok(context == NULL, "expected failure\n"); + if (context != NULL) + CertFreeCertificateContext(context); + else + ok(GetLastError() == NTE_NO_KEY, "expected NTE_NO_KEY, got %08x\n", + GetLastError()); + /* Again, with a CSP, AT_KEYEXCHANGE and key info. This succeeds because the + * CSP has an AT_KEYEXCHANGE key in it. + */ + info.dwKeySpec = AT_KEYEXCHANGE; + SetLastError(0xdeadbeef); + context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL, + NULL, NULL); + ok(context != NULL, + "CertCreateSelfSignCertificate failed: %08x\n", GetLastError()); + if (context) + { + DWORD size = 0; + + /* The context must have a key provider info property */ + ret = CertGetCertificateContextProperty(context, + CERT_KEY_PROV_INFO_PROP_ID, NULL, &size); + ok(ret && size, "Expected non-zero key provider info\n"); + if (size) + { + PCRYPT_KEY_PROV_INFO pInfo = HeapAlloc(GetProcessHeap(), 0, size); + + if (pInfo) + { + ret = CertGetCertificateContextProperty(context, + CERT_KEY_PROV_INFO_PROP_ID, pInfo, &size); + ok(ret, "CertGetCertificateContextProperty failed: %08x\n", + GetLastError()); + if (ret) + { + /* Sanity-check the key provider */ + ok(!lstrcmpW(pInfo->pwszContainerName, cspNameW), + "Unexpected key container\n"); + ok(!lstrcmpW(pInfo->pwszProvName, MS_DEF_PROV_W), + "Unexpected provider\n"); + ok(pInfo->dwKeySpec == AT_KEYEXCHANGE, + "Expected AT_KEYEXCHANGE, got %d\n", pInfo->dwKeySpec); + } + HeapFree(GetProcessHeap(), 0, pInfo); + } + } + + CertFreeCertificateContext(context); + } + + CryptReleaseContext(csp, 0); + ret = pCryptAcquireContextA(&csp, cspNameA, MS_DEF_PROV_A, PROV_RSA_FULL, + CRYPT_DELETEKEYSET); + ok(ret, "CryptAcquireContext failed: %08x\n", GetLastError()); + } static void testIntendedKeyUsage(void) @@ -3253,6 +3467,11 @@ SetLastError(0xdeadbeef); ret = CertVerifyRevocation(X509_ASN_ENCODING, CERT_CONTEXT_REVOCATION_TYPE, 1, (void **)certs, 0, NULL, &status); + if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) + { + win_skip("CERT_CONTEXT_REVOCATION_TYPE unsupported, skipping\n"); + return; + } ok(!ret && GetLastError() == CRYPT_E_NO_REVOCATION_CHECK, "expected CRYPT_E_NO_REVOCATION_CHECK, got %08x\n", GetLastError()); ok(status.dwError == CRYPT_E_NO_REVOCATION_CHECK, Modified: trunk/rostests/winetests/crypt32/chain.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/chain.c…
============================================================================== --- trunk/rostests/winetests/crypt32/chain.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/chain.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -19,15 +19,15 @@ */ #include <stdio.h> -#include <stdarg.h> +//#include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> #include <wininet.h> -#include "wine/test.h" +#include <wine/test.h> static const BYTE selfSignedCert[] = { 0x30, 0x82, 0x01, 0x1f, 0x30, 0x81, 0xce, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, @@ -237,6 +237,223 @@ 0xd1,0xbd,0xd7,0x95,0x22,0x43,0x7a,0x06,0x7b,0x4e,0xf6,0x37,0x8e,0xa2,0xb9, 0xcf,0x1f,0xa5,0xd2,0xbd,0x3b,0x04,0x97,0x39,0xb3,0x0f,0xfa,0x38,0xb5,0xaf, 0x55,0x20,0x88,0x60,0x93,0xf2,0xde,0xdb,0xff,0xdf }; +/*
Battle.Net
's cert */ +static const BYTE battlenet[] = { +0x30,0x82,0x03,0xd8,0x30,0x82,0x02,0xc0,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, +0x1e,0x4c,0xc1,0xf1,0xac,0xbd,0xf3,0xf5,0x96,0x05,0xbd,0x5f,0xbb,0x3f,0x75, +0x6b,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, +0x00,0x30,0x3c,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55, +0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x54,0x68,0x61, +0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x16,0x30,0x14,0x06,0x03, +0x55,0x04,0x03,0x13,0x0d,0x54,0x68,0x61,0x77,0x74,0x65,0x20,0x53,0x53,0x4c, +0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x31,0x30,0x30,0x38,0x32,0x36,0x30,0x30, +0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x31,0x32,0x30,0x39,0x32,0x34,0x32,0x33, +0x35,0x39,0x35,0x39,0x5a,0x30,0x71,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04, +0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x08,0x0c, +0x0a,0x43,0x61,0x6c,0x69,0x66,0x6f,0x72,0x6e,0x69,0x61,0x31,0x0f,0x30,0x0d, +0x06,0x03,0x55,0x04,0x07,0x0c,0x06,0x49,0x72,0x76,0x69,0x6e,0x65,0x31,0x25, +0x30,0x23,0x06,0x03,0x55,0x04,0x0a,0x0c,0x1c,0x42,0x6c,0x69,0x7a,0x7a,0x61, +0x72,0x64,0x20,0x45,0x6e,0x74,0x65,0x72,0x74,0x61,0x69,0x6e,0x6d,0x65,0x6e, +0x74,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04, +0x03,0x0c,0x0c,0x2a,0x2e,0x62,0x61,0x74,0x74,0x6c,0x65,0x2e,0x6e,0x65,0x74, +0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, +0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82, +0x01,0x01,0x00,0xa8,0x27,0x24,0x42,0x24,0xc8,0xe4,0x4e,0xfa,0x12,0x53,0x78, +0x14,0xa9,0xec,0x20,0x2d,0x79,0x07,0x55,0x36,0xad,0x04,0x8b,0xbc,0xd9,0x3b, +0xcc,0x3e,0xae,0xa0,0x3b,0xa1,0x79,0xf9,0x03,0x20,0x3e,0xa6,0x6a,0xeb,0x8c, +0xb1,0x45,0xcb,0x00,0x43,0x76,0x35,0x1b,0x3d,0xc9,0x4b,0xa9,0xc0,0xb6,0x32, +0x88,0xaa,0x4c,0x2c,0x53,0xf8,0xc4,0xcf,0xee,0xee,0xef,0x28,0xdf,0x44,0xfa, +0xa9,0x26,0xf6,0x99,0x7b,0xa4,0x7f,0xe8,0x5c,0x7f,0x59,0x51,0xe1,0x2c,0x57, +0x2f,0x8f,0xb3,0xad,0x7b,0x88,0x50,0xbc,0x76,0xfe,0x03,0xbd,0xfd,0x11,0x5d, +0x6e,0xbc,0x13,0x5b,0xd9,0x2e,0x38,0xc7,0x56,0x89,0x93,0x08,0xa2,0x24,0xbd, +0x1d,0x48,0xd9,0x48,0xce,0x6e,0x12,0x4f,0x10,0x60,0x94,0x54,0xb7,0x6b,0x51, +0xd0,0xdf,0x04,0xa8,0x16,0x39,0xcb,0xa5,0xd9,0xe7,0xb5,0xa9,0x02,0xfa,0xd3, +0xca,0x52,0xe7,0xc8,0x45,0xf8,0x4d,0xbb,0x70,0x1a,0xfd,0xb3,0x7d,0x9c,0x77, +0x8b,0x34,0xbe,0xd2,0xad,0xe7,0x17,0xb0,0x55,0xfa,0x1b,0x3e,0x51,0xcf,0x37, +0xbd,0x29,0x94,0x9f,0x56,0x28,0xd1,0x9d,0xe5,0x56,0xce,0x78,0x61,0x6e,0x8b, +0xae,0x95,0x44,0x3c,0xc8,0x54,0x48,0x78,0x1e,0x4c,0x72,0xff,0x0e,0xb9,0x14, +0x78,0xdc,0x7c,0x2e,0x50,0x05,0xd9,0xd0,0xa5,0x97,0xf7,0xb9,0x45,0x3f,0x7e, +0xdc,0xc6,0x4e,0x64,0x93,0x82,0xb7,0x97,0xcf,0xb1,0x7a,0x04,0xc1,0x1d,0x70, +0xf8,0x6b,0x43,0xc4,0xd0,0xa7,0x03,0x4e,0xc9,0x14,0x90,0x4f,0x05,0xb5,0x11, +0x36,0xc0,0xc2,0xbb,0x02,0x03,0x01,0x00,0x01,0xa3,0x81,0xa0,0x30,0x81,0x9d, +0x30,0x0c,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x02,0x30,0x00,0x30, +0x3a,0x06,0x03,0x55,0x1d,0x1f,0x04,0x33,0x30,0x31,0x30,0x2f,0xa0,0x2d,0xa0, +0x2b,0x86,0x29,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x76,0x72,0x2d,0x6f, +0x76,0x2d,0x63,0x72,0x6c,0x2e,0x74,0x68,0x61,0x77,0x74,0x65,0x2e,0x63,0x6f, +0x6d,0x2f,0x54,0x68,0x61,0x77,0x74,0x65,0x4f,0x56,0x2e,0x63,0x72,0x6c,0x30, +0x1d,0x06,0x03,0x55,0x1d,0x25,0x04,0x16,0x30,0x14,0x06,0x08,0x2b,0x06,0x01, +0x05,0x05,0x07,0x03,0x01,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02, +0x30,0x32,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x26,0x30, +0x24,0x30,0x22,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x16, +0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x74,0x68,0x61, +0x77,0x74,0x65,0x2e,0x63,0x6f,0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86, +0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x5c,0x44,0xe2, +0x2f,0x50,0x41,0xc8,0x54,0x0a,0xdd,0x2a,0xa2,0xa7,0x62,0x2d,0xc9,0xe8,0xa8, +0xf7,0x53,0x14,0xe1,0x88,0x89,0x81,0x22,0x1b,0x82,0xb5,0xa1,0x75,0xcc,0x91, +0x76,0x30,0x71,0xae,0x56,0x68,0xa9,0x75,0x65,0x7f,0xd8,0xc7,0xae,0x3b,0x68, +0x66,0xd6,0x2d,0x92,0xb7,0x9b,0x28,0x59,0x98,0x89,0x29,0xf9,0x69,0xff,0xff, +0xfa,0x4f,0x04,0x6b,0x96,0x78,0x1d,0xfe,0x67,0x78,0x33,0xd3,0xd5,0x91,0xee, +0xa7,0x36,0xcd,0x86,0x4c,0xc6,0x08,0xf4,0x12,0x4b,0x2b,0xd2,0x95,0x6a,0x87, +0xcd,0xe6,0x2d,0xf3,0xe0,0x8d,0x0c,0x77,0x9d,0xa0,0x2e,0xdc,0xf2,0xc1,0x06, +0xc5,0xb0,0xd5,0xa0,0x00,0xe5,0x0e,0x53,0xad,0x04,0xc4,0xf6,0x6e,0x6b,0x7e, +0x04,0xc2,0xea,0xaa,0xdf,0xe1,0x26,0x4a,0x14,0x33,0x03,0x77,0x15,0x5b,0x3e, +0x41,0x22,0x5d,0xb7,0xaf,0x65,0x2f,0x46,0xbc,0x24,0xd7,0x30,0xe6,0x82,0x7d, +0x2a,0x3b,0x81,0x04,0xa7,0xd5,0x0b,0x61,0x57,0xe0,0x91,0x04,0x6c,0xc6,0x08, +0xbc,0xc0,0x1b,0x26,0x7f,0x69,0x22,0x69,0xd3,0x41,0x4c,0x9d,0x61,0xe0,0xfe, +0x2b,0xd8,0x2e,0xe9,0x2d,0x72,0x30,0x68,0x81,0xa1,0x37,0x06,0xb5,0xdc,0xd3, +0x48,0x65,0x16,0x74,0xfb,0x3c,0xb2,0x70,0xef,0x3d,0xee,0x63,0xea,0x62,0xf5, +0xd2,0xc7,0x48,0x6a,0xb8,0x53,0xcb,0xbe,0x9a,0xeb,0xc1,0x77,0xfb,0x9b,0xec, +0xb8,0x06,0x04,0xaa,0x23,0x2c,0x6d,0x17,0x9e,0xb9,0x6e,0xc9,0xa4,0xde,0x7e, +0x61,0xc4,0xa7,0x45,0x68,0xf6,0x2a,0x57,0xaa,0xad,0xca,0x84,0x03 }; +static const BYTE thawte_primary_ca[] = { +0x30,0x82,0x04,0x20,0x30,0x82,0x03,0x08,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, +0x34,0x4e,0xd5,0x57,0x20,0xd5,0xed,0xec,0x49,0xf4,0x2f,0xce,0x37,0xdb,0x2b, +0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, +0x00,0x30,0x81,0xa9,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02, +0x55,0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x74,0x68, +0x61,0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x28,0x30,0x26,0x06, +0x03,0x55,0x04,0x0b,0x13,0x1f,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61, +0x74,0x69,0x6f,0x6e,0x20,0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x44, +0x69,0x76,0x69,0x73,0x69,0x6f,0x6e,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04, +0x0b,0x13,0x2f,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x74,0x68,0x61, +0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72, +0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65, +0x20,0x6f,0x6e,0x6c,0x79,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13, +0x16,0x74,0x68,0x61,0x77,0x74,0x65,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79, +0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x36,0x31, +0x31,0x31,0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x33,0x36,0x30, +0x37,0x31,0x36,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xa9,0x31,0x0b, +0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30,0x13, +0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x74,0x68,0x61,0x77,0x74,0x65,0x2c,0x20, +0x49,0x6e,0x63,0x2e,0x31,0x28,0x30,0x26,0x06,0x03,0x55,0x04,0x0b,0x13,0x1f, +0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x53, +0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x44,0x69,0x76,0x69,0x73,0x69,0x6f, +0x6e,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04,0x0b,0x13,0x2f,0x28,0x63,0x29, +0x20,0x32,0x30,0x30,0x36,0x20,0x74,0x68,0x61,0x77,0x74,0x65,0x2c,0x20,0x49, +0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72,0x20,0x61,0x75,0x74,0x68,0x6f, +0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6f,0x6e,0x6c,0x79,0x31, +0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13,0x16,0x74,0x68,0x61,0x77,0x74, +0x65,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20,0x52,0x6f,0x6f,0x74,0x20, +0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7, +0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a, +0x02,0x82,0x01,0x01,0x00,0xac,0xa0,0xf0,0xfb,0x80,0x59,0xd4,0x9c,0xc7,0xa4, +0xcf,0x9d,0xa1,0x59,0x73,0x09,0x10,0x45,0x0c,0x0d,0x2c,0x6e,0x68,0xf1,0x6c, +0x5b,0x48,0x68,0x49,0x59,0x37,0xfc,0x0b,0x33,0x19,0xc2,0x77,0x7f,0xcc,0x10, +0x2d,0x95,0x34,0x1c,0xe6,0xeb,0x4d,0x09,0xa7,0x1c,0xd2,0xb8,0xc9,0x97,0x36, +0x02,0xb7,0x89,0xd4,0x24,0x5f,0x06,0xc0,0xcc,0x44,0x94,0x94,0x8d,0x02,0x62, +0x6f,0xeb,0x5a,0xdd,0x11,0x8d,0x28,0x9a,0x5c,0x84,0x90,0x10,0x7a,0x0d,0xbd, +0x74,0x66,0x2f,0x6a,0x38,0xa0,0xe2,0xd5,0x54,0x44,0xeb,0x1d,0x07,0x9f,0x07, +0xba,0x6f,0xee,0xe9,0xfd,0x4e,0x0b,0x29,0xf5,0x3e,0x84,0xa0,0x01,0xf1,0x9c, +0xab,0xf8,0x1c,0x7e,0x89,0xa4,0xe8,0xa1,0xd8,0x71,0x65,0x0d,0xa3,0x51,0x7b, +0xee,0xbc,0xd2,0x22,0x60,0x0d,0xb9,0x5b,0x9d,0xdf,0xba,0xfc,0x51,0x5b,0x0b, +0xaf,0x98,0xb2,0xe9,0x2e,0xe9,0x04,0xe8,0x62,0x87,0xde,0x2b,0xc8,0xd7,0x4e, +0xc1,0x4c,0x64,0x1e,0xdd,0xcf,0x87,0x58,0xba,0x4a,0x4f,0xca,0x68,0x07,0x1d, +0x1c,0x9d,0x4a,0xc6,0xd5,0x2f,0x91,0xcc,0x7c,0x71,0x72,0x1c,0xc5,0xc0,0x67, +0xeb,0x32,0xfd,0xc9,0x92,0x5c,0x94,0xda,0x85,0xc0,0x9b,0xbf,0x53,0x7d,0x2b, +0x09,0xf4,0x8c,0x9d,0x91,0x1f,0x97,0x6a,0x52,0xcb,0xde,0x09,0x36,0xa4,0x77, +0xd8,0x7b,0x87,0x50,0x44,0xd5,0x3e,0x6e,0x29,0x69,0xfb,0x39,0x49,0x26,0x1e, +0x09,0xa5,0x80,0x7b,0x40,0x2d,0xeb,0xe8,0x27,0x85,0xc9,0xfe,0x61,0xfd,0x7e, +0xe6,0x7c,0x97,0x1d,0xd5,0x9d,0x02,0x03,0x01,0x00,0x01,0xa3,0x42,0x30,0x40, +0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x05,0x30,0x03,0x01, +0x01,0xff,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03, +0x02,0x01,0x06,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x7b, +0x5b,0x45,0xcf,0xaf,0xce,0xcb,0x7a,0xfd,0x31,0x92,0x1a,0x6a,0xb6,0xf3,0x46, +0xeb,0x57,0x48,0x50,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, +0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x79,0x11,0xc0,0x4b,0xb3,0x91, +0xb6,0xfc,0xf0,0xe9,0x67,0xd4,0x0d,0x6e,0x45,0xbe,0x55,0xe8,0x93,0xd2,0xce, +0x03,0x3f,0xed,0xda,0x25,0xb0,0x1d,0x57,0xcb,0x1e,0x3a,0x76,0xa0,0x4c,0xec, +0x50,0x76,0xe8,0x64,0x72,0x0c,0xa4,0xa9,0xf1,0xb8,0x8b,0xd6,0xd6,0x87,0x84, +0xbb,0x32,0xe5,0x41,0x11,0xc0,0x77,0xd9,0xb3,0x60,0x9d,0xeb,0x1b,0xd5,0xd1, +0x6e,0x44,0x44,0xa9,0xa6,0x01,0xec,0x55,0x62,0x1d,0x77,0xb8,0x5c,0x8e,0x48, +0x49,0x7c,0x9c,0x3b,0x57,0x11,0xac,0xad,0x73,0x37,0x8e,0x2f,0x78,0x5c,0x90, +0x68,0x47,0xd9,0x60,0x60,0xe6,0xfc,0x07,0x3d,0x22,0x20,0x17,0xc4,0xf7,0x16, +0xe9,0xc4,0xd8,0x72,0xf9,0xc8,0x73,0x7c,0xdf,0x16,0x2f,0x15,0xa9,0x3e,0xfd, +0x6a,0x27,0xb6,0xa1,0xeb,0x5a,0xba,0x98,0x1f,0xd5,0xe3,0x4d,0x64,0x0a,0x9d, +0x13,0xc8,0x61,0xba,0xf5,0x39,0x1c,0x87,0xba,0xb8,0xbd,0x7b,0x22,0x7f,0xf6, +0xfe,0xac,0x40,0x79,0xe5,0xac,0x10,0x6f,0x3d,0x8f,0x1b,0x79,0x76,0x8b,0xc4, +0x37,0xb3,0x21,0x18,0x84,0xe5,0x36,0x00,0xeb,0x63,0x20,0x99,0xb9,0xe9,0xfe, +0x33,0x04,0xbb,0x41,0xc8,0xc1,0x02,0xf9,0x44,0x63,0x20,0x9e,0x81,0xce,0x42, +0xd3,0xd6,0x3f,0x2c,0x76,0xd3,0x63,0x9c,0x59,0xdd,0x8f,0xa6,0xe1,0x0e,0xa0, +0x2e,0x41,0xf7,0x2e,0x95,0x47,0xcf,0xbc,0xfd,0x33,0xf3,0xf6,0x0b,0x61,0x7e, +0x7e,0x91,0x2b,0x81,0x47,0xc2,0x27,0x30,0xee,0xa7,0x10,0x5d,0x37,0x8f,0x5c, +0x39,0x2b,0xe4,0x04,0xf0,0x7b,0x8d,0x56,0x8c,0x68 }; +static const BYTE thawte_ssl_ca[] = { +0x30,0x82,0x04,0x6c,0x30,0x82,0x03,0x54,0xa0,0x03,0x02,0x01,0x02,0x02,0x10, +0x4d,0x5f,0x2c,0x34,0x08,0xb2,0x4c,0x20,0xcd,0x6d,0x50,0x7e,0x24,0x4d,0xc9, +0xec,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05, +0x00,0x30,0x81,0xa9,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02, +0x55,0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x74,0x68, +0x61,0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x28,0x30,0x26,0x06, +0x03,0x55,0x04,0x0b,0x13,0x1f,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61, +0x74,0x69,0x6f,0x6e,0x20,0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x44, +0x69,0x76,0x69,0x73,0x69,0x6f,0x6e,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04, +0x0b,0x13,0x2f,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x74,0x68,0x61, +0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72, +0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65, +0x20,0x6f,0x6e,0x6c,0x79,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13, +0x16,0x74,0x68,0x61,0x77,0x74,0x65,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79, +0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x31,0x30,0x30, +0x32,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x32,0x30,0x30, +0x32,0x30,0x37,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x3c,0x31,0x0b,0x30, +0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30,0x13,0x06, +0x03,0x55,0x04,0x0a,0x13,0x0c,0x54,0x68,0x61,0x77,0x74,0x65,0x2c,0x20,0x49, +0x6e,0x63,0x2e,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x03,0x13,0x0d,0x54, +0x68,0x61,0x77,0x74,0x65,0x20,0x53,0x53,0x4c,0x20,0x43,0x41,0x30,0x82,0x01, +0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05, +0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00, +0x99,0xe4,0x85,0x5b,0x76,0x49,0x7d,0x2f,0x05,0xd8,0xc5,0xac,0xc8,0xc8,0xa9, +0xd3,0xdc,0x98,0xe6,0xd7,0x34,0xa6,0x2f,0x0c,0xf2,0x22,0x26,0xd8,0xa3,0xc9, +0x14,0x4c,0x8f,0x05,0xa4,0x45,0xe8,0x14,0x0c,0x58,0x90,0x05,0x1a,0xb7,0xc5, +0xc1,0x06,0xa5,0x80,0xaf,0xbb,0x1d,0x49,0x6b,0x52,0x34,0x88,0xc3,0x59,0xe7, +0xef,0x6b,0xc4,0x27,0x41,0x8c,0x2b,0x66,0x1d,0xd0,0xe0,0xa3,0x97,0x98,0x19, +0x34,0x4b,0x41,0xd5,0x98,0xd5,0xc7,0x05,0xad,0xa2,0xe4,0xd7,0xed,0x0c,0xad, +0x4f,0xc1,0xb5,0xb0,0x21,0xfd,0x3e,0x50,0x53,0xb2,0xc4,0x90,0xd0,0xd4,0x30, +0x67,0x6c,0x9a,0xf1,0x0e,0x74,0xc4,0xc2,0xdc,0x8a,0xe8,0x97,0xff,0xc9,0x92, +0xae,0x01,0x8a,0x56,0x0a,0x98,0x32,0xb0,0x00,0x23,0xec,0x90,0x1a,0x60,0xc3, +0xed,0xbb,0x3a,0xcb,0x0f,0x63,0x9f,0x0d,0x44,0xc9,0x52,0xe1,0x25,0x96,0xbf, +0xed,0x50,0x95,0x89,0x7f,0x56,0x14,0xb1,0xb7,0x61,0x1d,0x1c,0x07,0x8c,0x3a, +0x2c,0xf7,0xff,0x80,0xde,0x39,0x45,0xd5,0xaf,0x1a,0xd1,0x78,0xd8,0xc7,0x71, +0x6a,0xa3,0x19,0xa7,0x32,0x50,0x21,0xe9,0xf2,0x0e,0xa1,0xc6,0x13,0x03,0x44, +0x48,0xd1,0x66,0xa8,0x52,0x57,0xd7,0x11,0xb4,0x93,0x8b,0xe5,0x99,0x9f,0x5d, +0xe7,0x78,0x51,0xe5,0x4d,0xf6,0xb7,0x59,0xb4,0x76,0xb5,0x09,0x37,0x4d,0x06, +0x38,0x13,0x7a,0x1c,0x08,0x98,0x5c,0xc4,0x48,0x4a,0xcb,0x52,0xa0,0xa9,0xf8, +0xb1,0x9d,0x8e,0x7b,0x79,0xb0,0x20,0x2f,0x3c,0x96,0xa8,0x11,0x62,0x47,0xbb, +0x11,0x02,0x03,0x01,0x00,0x01,0xa3,0x81,0xfb,0x30,0x81,0xf8,0x30,0x32,0x06, +0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x26,0x30,0x24,0x30,0x22, +0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x16,0x68,0x74,0x74, +0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x74,0x68,0x61,0x77,0x74,0x65, +0x2e,0x63,0x6f,0x6d,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04, +0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x34,0x06,0x03,0x55,0x1d, +0x1f,0x04,0x2d,0x30,0x2b,0x30,0x29,0xa0,0x27,0xa0,0x25,0x86,0x23,0x68,0x74, +0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e,0x74,0x68,0x61,0x77,0x74,0x65, +0x2e,0x63,0x6f,0x6d,0x2f,0x54,0x68,0x61,0x77,0x74,0x65,0x50,0x43,0x41,0x2e, +0x63,0x72,0x6c,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04, +0x03,0x02,0x01,0x06,0x30,0x28,0x06,0x03,0x55,0x1d,0x11,0x04,0x21,0x30,0x1f, +0xa4,0x1d,0x30,0x1b,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x03,0x13,0x10, +0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x4d,0x50,0x4b,0x49,0x2d,0x32,0x2d, +0x39,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0xa7,0xa2,0x83, +0xbb,0x34,0x45,0x40,0x3d,0xfc,0xd5,0x30,0x4f,0x12,0xb9,0x3e,0xa1,0x01,0x9f, +0xf6,0xdb,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14, +0x7b,0x5b,0x45,0xcf,0xaf,0xce,0xcb,0x7a,0xfd,0x31,0x92,0x1a,0x6a,0xb6,0xf3, +0x46,0xeb,0x57,0x48,0x50,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d, +0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x80,0x22,0x80,0xe0,0x6c, +0xc8,0x95,0x16,0xd7,0x57,0x26,0x87,0xf3,0x72,0x34,0xdb,0xc6,0x72,0x56,0x27, +0x3e,0xd3,0x96,0xf6,0x2e,0x25,0x91,0xa5,0x3e,0x33,0x97,0xa7,0x4b,0xe5,0x2f, +0xfb,0x25,0x7d,0x2f,0x07,0x61,0xfa,0x6f,0x83,0x74,0x4c,0x4c,0x53,0x72,0x20, +0xa4,0x7a,0xcf,0x51,0x51,0x56,0x81,0x88,0xb0,0x6d,0x1f,0x36,0x2c,0xc8,0x2b, +0xb1,0x88,0x99,0xc1,0xfe,0x44,0xab,0x48,0x51,0x7c,0xd8,0xf2,0x44,0x64,0x2a, +0xd8,0x71,0xa7,0xfb,0x1a,0x2f,0xf9,0x19,0x8d,0x34,0xb2,0x23,0xbf,0xc4,0x4c, +0x55,0x1d,0x8e,0x44,0xe8,0xaa,0x5d,0x9a,0xdd,0x9f,0xfd,0x03,0xc7,0xba,0x24, +0x43,0x8d,0x2d,0x47,0x44,0xdb,0xf6,0xd8,0x98,0xc8,0xb2,0xf9,0xda,0xef,0xed, +0x29,0x5c,0x69,0x12,0xfa,0xd1,0x23,0x96,0x0f,0xbf,0x9c,0x0d,0xf2,0x79,0x45, +0x53,0x37,0x9a,0x56,0x2f,0xe8,0x57,0x10,0x70,0xf6,0xee,0x89,0x0c,0x49,0x89, +0x9a,0xc1,0x23,0xf5,0xc2,0x2a,0xcc,0x41,0xcf,0x22,0xab,0x65,0x6e,0xb7,0x94, +0x82,0x6d,0x2f,0x40,0x5f,0x58,0xde,0xeb,0x95,0x2b,0xa6,0x72,0x68,0x52,0x19, +0x91,0x2a,0xae,0x75,0x9d,0x4e,0x92,0xe6,0xca,0xde,0x54,0xea,0x18,0xab,0x25, +0x3c,0xe6,0x64,0xa6,0x79,0x1f,0x26,0x7d,0x61,0xed,0x7d,0xd2,0xe5,0x71,0x55, +0xd8,0x93,0x17,0x7c,0x14,0x38,0x30,0x3c,0xdf,0x86,0xe3,0x4c,0xad,0x49,0xe3, +0x97,0x59,0xce,0x1b,0x9b,0x2b,0xce,0xdc,0x65,0xd4,0x0b,0x28,0x6b,0x4e,0x84, +0x46,0x51,0x44,0xf7,0x33,0x08,0x2d,0x58,0x97,0x21,0xae }; static const BYTE thawte_sgc_ca[] = { 0x30,0x82,0x03,0x23,0x30,0x82,0x02,0x8c,0xa0,0x03,0x02,0x01,0x02,0x02,0x04, 0x30,0x00,0x00,0x02,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, @@ -3095,6 +3312,11 @@ { sizeof(googleElementStatus) / sizeof(googleElementStatus[0]), googleElementStatus }, }; +static CONST_DATA_BLOB battlenetChain[] = { + { sizeof(thawte_primary_ca), thawte_primary_ca }, + { sizeof(thawte_ssl_ca), thawte_ssl_ca }, + { sizeof(battlenet), battlenet }, +}; /* The openssl cert is only valid from 9/12/2008 to 9/13/2012, so with the date * tested (October 2007) it's not time valid. */ @@ -3449,6 +3671,8 @@ static SYSTEMTIME oct2007 = { 2007, 10, 1, 1, 0, 0, 0, 0 }; /* Wednesday, Oct 28, 2009 */ static SYSTEMTIME oct2009 = { 2009, 10, 3, 28, 0, 0, 0, 0 }; +/* Wednesday, Oct 28, 2010 */ +static SYSTEMTIME oct2010 = { 2010, 10, 3, 28, 0, 0, 0, 0 }; static void testGetCertChain(void) { @@ -3866,6 +4090,11 @@ static const ChainPolicyCheck stanfordPolicyCheckWithoutMatchingName = { { sizeof(stanfordChain) / sizeof(stanfordChain[0]), stanfordChain }, { 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, &untrustedRootStatus, 0 +}; + +static const ChainPolicyCheck nullTerminatedDomainComponentPolicyCheck = { + { sizeof(battlenetChain) / sizeof(battlenetChain[0]), battlenetChain }, + { 0, 0, -1, -1, NULL}, &untrustedRootStatus, 0 }; static const ChainPolicyCheck invalidExtensionPolicyCheck = { @@ -4165,6 +4394,8 @@ WCHAR winehq[] = { 'w','i','n','e','h','q','.','o','r','g',0 }; WCHAR google_dot_com[] = { 'w','w','w','.','g','o','o','g','l','e','.', 'c','o','m',0 }; + WCHAR battle_dot_net[] = { 'w','w','w','.','b','a','t','t','l','e','.', + 'n','e','t',0 }; WCHAR a_dot_openssl_dot_org[] = { 'a','.','o','p','e','n','s','s','l','.', 'o','r','g',0 }; WCHAR openssl_dot_org[] = { 'o','p','e','n','s','s','l','.','o','r','g',0 }; @@ -4342,6 +4573,12 @@ sslPolicyPara.pwszServerName = afoo_dot_com; CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL, fooPolicyCheckWithoutMatchingName, &oct2007, &policyPara); + /* The
Battle.Net
chain checks a certificate with a domain component + * containg a terminating NULL. + */ + sslPolicyPara.pwszServerName = battle_dot_net; + CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL, + nullTerminatedDomainComponentPolicyCheck, &oct2010, &policyPara); } static void testVerifyCertChainPolicy(void) @@ -4389,16 +4626,18 @@ ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, NULL, &policyStatus); ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n", GetLastError()); - ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT, - "Expected CERT_E_UNTRUSTEDROOT, got %08x\n", policyStatus.dwError); + ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT || + policyStatus.dwError == TRUST_E_CERT_SIGNATURE, /* win7 + win8 */ + "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08x\n", policyStatus.dwError); ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0, "Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex, policyStatus.lElementIndex); ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, &policyPara, &policyStatus); ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n", GetLastError()); - ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT, - "Expected CERT_E_UNTRUSTEDROOT, got %08x\n", policyStatus.dwError); + ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT || + policyStatus.dwError == TRUST_E_CERT_SIGNATURE, /* win7 + win8 */ + "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08x\n", policyStatus.dwError); ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0, "Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex, policyStatus.lElementIndex); Modified: trunk/rostests/winetests/crypt32/crl.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/crl.c?r…
============================================================================== --- trunk/rostests/winetests/crypt32/crl.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/crl.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -18,16 +18,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> +//#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winreg.h> -#include <winerror.h> +//#include <winreg.h> +//#include <winerror.h> #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, Modified: trunk/rostests/winetests/crypt32/ctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/ctl.c?r…
============================================================================== --- trunk/rostests/winetests/crypt32/ctl.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/ctl.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -18,15 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> +//#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> static const BYTE emptyCTL[] = { 0x30,0x17,0x30,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30, Modified: trunk/rostests/winetests/crypt32/encode.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/encode.…
============================================================================== --- trunk/rostests/winetests/crypt32/encode.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/encode.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -18,13 +18,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include <stdio.h> -#include <stdarg.h> +//#include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> static BOOL (WINAPI *pCryptDecodeObjectEx)(DWORD,LPCSTR,const BYTE*,DWORD,DWORD,PCRYPT_DECODE_PARA,void*,DWORD*); Modified: trunk/rostests/winetests/crypt32/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/main.c?…
============================================================================== --- trunk/rostests/winetests/crypt32/main.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/main.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -18,15 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> +//#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> #include <winreg.h> -#include "wine/test.h" +#include <wine/test.h> static HMODULE hCrypt; @@ -181,12 +181,12 @@ /* Check with 0 NotBefore and NotAfter */ ret = CertVerifyTimeValidity(&fileTime, &info); ok(ret == 1, "Expected 1, got %d\n", ret); - memcpy(&info.NotAfter, &fileTime, sizeof(info.NotAfter)); + info.NotAfter = fileTime; /* Check with NotAfter equal to comparison time */ ret = CertVerifyTimeValidity(&fileTime, &info); ok(ret == 0, "Expected 0, got %d\n", ret); /* Check with NotBefore after comparison time */ - memcpy(&info.NotBefore, &fileTime, sizeof(info.NotBefore)); + info.NotBefore = fileTime; info.NotBefore.dwLowDateTime += 5000; ret = CertVerifyTimeValidity(&fileTime, &info); ok(ret == -1, "Expected -1, got %d\n", ret); @@ -206,33 +206,22 @@ CryptMemFree(buf); } -typedef DWORD (WINAPI *I_CryptAllocTlsFunc)(void); -typedef LPVOID (WINAPI *I_CryptDetachTlsFunc)(DWORD dwTlsIndex); -typedef LPVOID (WINAPI *I_CryptGetTlsFunc)(DWORD dwTlsIndex); -typedef BOOL (WINAPI *I_CryptSetTlsFunc)(DWORD dwTlsIndex, LPVOID lpTlsValue); -typedef BOOL (WINAPI *I_CryptFreeTlsFunc)(DWORD dwTlsIndex, DWORD unknown); - -static I_CryptAllocTlsFunc pI_CryptAllocTls; -static I_CryptDetachTlsFunc pI_CryptDetachTls; -static I_CryptGetTlsFunc pI_CryptGetTls; -static I_CryptSetTlsFunc pI_CryptSetTls; -static I_CryptFreeTlsFunc pI_CryptFreeTls; static void test_cryptTls(void) { + DWORD (WINAPI *pI_CryptAllocTls)(void); + LPVOID (WINAPI *pI_CryptDetachTls)(DWORD dwTlsIndex); + LPVOID (WINAPI *pI_CryptGetTls)(DWORD dwTlsIndex); + BOOL (WINAPI *pI_CryptSetTls)(DWORD dwTlsIndex, LPVOID lpTlsValue); + BOOL (WINAPI *pI_CryptFreeTls)(DWORD dwTlsIndex, DWORD unknown); DWORD index; BOOL ret; - pI_CryptAllocTls = (I_CryptAllocTlsFunc)GetProcAddress(hCrypt, - "I_CryptAllocTls"); - pI_CryptDetachTls = (I_CryptDetachTlsFunc)GetProcAddress(hCrypt, - "I_CryptDetachTls"); - pI_CryptGetTls = (I_CryptGetTlsFunc)GetProcAddress(hCrypt, - "I_CryptGetTls"); - pI_CryptSetTls = (I_CryptSetTlsFunc)GetProcAddress(hCrypt, - "I_CryptSetTls"); - pI_CryptFreeTls = (I_CryptFreeTlsFunc)GetProcAddress(hCrypt, - "I_CryptFreeTls"); + pI_CryptAllocTls = (void *)GetProcAddress(hCrypt, "I_CryptAllocTls"); + pI_CryptDetachTls = (void *)GetProcAddress(hCrypt, "I_CryptDetachTls"); + pI_CryptGetTls = (void *)GetProcAddress(hCrypt, "I_CryptGetTls"); + pI_CryptSetTls = (void *)GetProcAddress(hCrypt, "I_CryptSetTls"); + pI_CryptFreeTls = (void *)GetProcAddress(hCrypt, "I_CryptFreeTls"); /* One normal pass */ index = pI_CryptAllocTls(); @@ -277,16 +266,12 @@ } } -typedef BOOL (WINAPI *I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc) - (LPCWSTR, DWORD *); - static void test_readTrustedPublisherDWORD(void) { - I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc pReadDWORD; - - pReadDWORD = - (I_CryptReadTrustedPublisherDWORDValueFromRegistryFunc)GetProcAddress( - hCrypt, "I_CryptReadTrustedPublisherDWORDValueFromRegistry"); + + BOOL (WINAPI *pReadDWORD)(LPCWSTR, DWORD *); + + pReadDWORD = (void *)GetProcAddress(hCrypt, "I_CryptReadTrustedPublisherDWORDValueFromRegistry"); if (pReadDWORD) { static const WCHAR safer[] = { @@ -320,15 +305,12 @@ } } -typedef HCRYPTPROV (WINAPI *I_CryptGetDefaultCryptProvFunc)(DWORD w); - static void test_getDefaultCryptProv(void) { - I_CryptGetDefaultCryptProvFunc pI_CryptGetDefaultCryptProv; + HCRYPTPROV (WINAPI *pI_CryptGetDefaultCryptProv)(DWORD w); HCRYPTPROV prov; - pI_CryptGetDefaultCryptProv = (I_CryptGetDefaultCryptProvFunc) - GetProcAddress(hCrypt, "I_CryptGetDefaultCryptProv"); + pI_CryptGetDefaultCryptProv = (void *)GetProcAddress(hCrypt, "I_CryptGetDefaultCryptProv"); if (!pI_CryptGetDefaultCryptProv) return; prov = pI_CryptGetDefaultCryptProv(0xdeadbeef); @@ -345,14 +327,12 @@ CryptReleaseContext(prov, 0); } -typedef int (WINAPI *I_CryptInstallOssGlobal)(DWORD,DWORD,DWORD); - static void test_CryptInstallOssGlobal(void) { + int (WINAPI *pI_CryptInstallOssGlobal)(DWORD,DWORD,DWORD); int ret,i; - I_CryptInstallOssGlobal pI_CryptInstallOssGlobal; - - pI_CryptInstallOssGlobal= (I_CryptInstallOssGlobal)GetProcAddress(hCrypt,"I_CryptInstallOssGlobal"); + + pI_CryptInstallOssGlobal = (void *)GetProcAddress(hCrypt,"I_CryptInstallOssGlobal"); /* passing in some random values to I_CryptInstallOssGlobal, it always returns 9 the first time, then 10, 11 etc.*/ for(i=0;i<30;i++) { @@ -362,10 +342,6 @@ "Expected %d or 0, got %d\n",(9+i),ret); } } - -static BOOL (WINAPI *pCryptFormatObject)(DWORD dwEncoding, DWORD dwFormatType, - DWORD dwFormatStrType, void *pFormatStruct, LPCSTR lpszStructType, - const BYTE *pbEncoded, DWORD dwEncoded, void *pbFormat, DWORD *pcbFormat); static const BYTE encodedInt[] = { 0x02,0x01,0x01 }; static const WCHAR encodedIntStr[] = { '0','2',' ','0','1',' ','0','1',0 }; @@ -381,6 +357,10 @@ static void test_format_object(void) { + BOOL (WINAPI *pCryptFormatObject)(DWORD dwEncoding, DWORD dwFormatType, + DWORD dwFormatStrType, void *pFormatStruct, LPCSTR lpszStructType, + const BYTE *pbEncoded, DWORD dwEncoded, void *pbFormat, + DWORD *pcbFormat); BOOL ret; DWORD size; LPWSTR str; Modified: trunk/rostests/winetests/crypt32/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/message…
============================================================================== --- trunk/rostests/winetests/crypt32/message.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/message.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> +//#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> static BOOL (WINAPI * pCryptAcquireContextA) (HCRYPTPROV *, LPCSTR, LPCSTR, DWORD, DWORD); @@ -608,6 +608,7 @@ ret = CryptVerifyMessageSignature(¶, 0, signedWithCertWithValidPubKeyContent, sizeof(signedWithCertWithValidPubKeyContent), NULL, 0, NULL); + todo_wine ok(!ret, "Expected failure\n"); /* Finally, a message signed with a valid public key verifies successfully */ Modified: trunk/rostests/winetests/crypt32/msg.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/msg.c?r…
============================================================================== --- trunk/rostests/winetests/crypt32/msg.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/msg.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -18,16 +18,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> +//#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #define CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS #define CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> static BOOL have_nt = TRUE; static BOOL old_crypt32 = FALSE; @@ -166,8 +166,6 @@ BOOL ret; HCRYPTMSG msg; DWORD size, i, value; - CMSG_SIGNED_ENCODE_INFO signInfo = { sizeof(signInfo), 0 }; - CMSG_SIGNER_ENCODE_INFO signer = { sizeof(signer), 0 }; /* Crash ret = CryptMsgGetParam(NULL, 0, 0, NULL, NULL); Modified: trunk/rostests/winetests/crypt32/object.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/object.…
============================================================================== --- trunk/rostests/winetests/crypt32/object.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/object.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -17,14 +17,14 @@ * 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 <stdio.h> +//#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> static BOOL (WINAPI * pCryptQueryObject)(DWORD, const void *, DWORD, DWORD, DWORD, DWORD *, DWORD *, DWORD *, HCERTSTORE *, HCRYPTMSG *, const void **); Modified: trunk/rostests/winetests/crypt32/oid.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/oid.c?r…
============================================================================== --- trunk/rostests/winetests/crypt32/oid.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/oid.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include <stdio.h> -#include <stdarg.h> +//#include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> #include <winreg.h> -#include "wine/test.h" +#include <wine/test.h> static BOOL (WINAPI *pCryptEnumOIDInfo)(DWORD,DWORD,void*,PFN_CRYPT_ENUM_OID_INFO); Modified: trunk/rostests/winetests/crypt32/protectdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/protect…
============================================================================== --- trunk/rostests/winetests/crypt32/protectdata.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/protectdata.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <stdio.h> +//#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> static BOOL (WINAPI *pCryptProtectData)(DATA_BLOB*,LPCWSTR,DATA_BLOB*,PVOID,CRYPTPROTECT_PROMPTSTRUCT*,DWORD,DATA_BLOB*); static BOOL (WINAPI *pCryptUnprotectData)(DATA_BLOB*,LPWSTR*,DATA_BLOB*,PVOID,CRYPTPROTECT_PROMPTSTRUCT*,DWORD,DATA_BLOB*); Modified: trunk/rostests/winetests/crypt32/sip.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/sip.c?r…
============================================================================== --- trunk/rostests/winetests/crypt32/sip.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/sip.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -20,15 +20,15 @@ */ #include <stdio.h> -#include <stdarg.h> +//#include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <winnls.h> #include <wincrypt.h> #include <mssip.h> -#include "wine/test.h" +#include <wine/test.h> static BOOL (WINAPI * funcCryptSIPGetSignedDataMsg)(SIP_SUBJECTINFO *,DWORD *,DWORD,DWORD *,BYTE *); static BOOL (WINAPI * funcCryptSIPPutSignedDataMsg)(SIP_SUBJECTINFO *,DWORD,DWORD *,DWORD,BYTE *); @@ -101,7 +101,7 @@ skip("Need admin rights\n"); return; } - ok ( ret, "CryptSIPAddProvider should have succeeded\n"); + ok ( ret, "CryptSIPAddProvider should have succeeded, last error %d\n", GetLastError()); /* Dummy provider will be deleted, but the function still fails because * pwszIsFunctionName and pwszIsFunctionNameFmt2 are not present in the @@ -132,12 +132,12 @@ newprov.pwszIsFunctionName = dummyfunction; SetLastError(0xdeadbeef); ret = CryptSIPAddProvider(&newprov); - ok ( ret, "CryptSIPAddProvider should have succeeded\n"); + ok ( ret, "CryptSIPAddProvider should have succeeded, last error %d\n", GetLastError()); /* Dummy provider should be deleted */ SetLastError(0xdeadbeef); ret = CryptSIPRemoveProvider(&actionid); - ok ( ret, "CryptSIPRemoveProvider should have succeeded\n"); + ok ( ret, "CryptSIPRemoveProvider should have succeeded, last error %d\n", GetLastError()); } static const BYTE cabFileData[] = { Modified: trunk/rostests/winetests/crypt32/store.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/store.c…
============================================================================== --- trunk/rostests/winetests/crypt32/store.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/store.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -19,15 +19,15 @@ */ #include <stdio.h> -#include <stdarg.h> +//#include <stdarg.h> #include <windef.h> #include <winbase.h> #include <winreg.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> /* The following aren't defined in wincrypt.h, as they're "reserved" */ #define CERT_CERT_PROP_ID 32 @@ -738,8 +738,6 @@ return ret; } -typedef DWORD (WINAPI *SHDeleteKeyAFunc)(HKEY, LPCSTR); - static void testRegStore(void) { static const char tempKey[] = "Software\\Wine\\CryptTemp"; @@ -1017,9 +1015,9 @@ */ if (shlwapi) { - SHDeleteKeyAFunc pSHDeleteKeyA = - (SHDeleteKeyAFunc)GetProcAddress(shlwapi, "SHDeleteKeyA"); - + DWORD (WINAPI *pSHDeleteKeyA)(HKEY, LPCSTR); + + pSHDeleteKeyA = (void*)GetProcAddress(shlwapi, "SHDeleteKeyA"); if (pSHDeleteKeyA) pSHDeleteKeyA(HKEY_CURRENT_USER, tempKey); FreeLibrary(shlwapi); Modified: trunk/rostests/winetests/crypt32/str.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/str.c?r…
============================================================================== --- trunk/rostests/winetests/crypt32/str.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/str.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -17,14 +17,14 @@ * 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 <stdio.h> +//#include <stdio.h> #include <stdarg.h> #include <windef.h> #include <winbase.h> -#include <winerror.h> +//#include <winerror.h> #include <wincrypt.h> -#include "wine/test.h" +#include <wine/test.h> typedef struct _CertRDNAttrEncoding { LPCSTR pszObjId; @@ -185,32 +185,22 @@ 'e','a','p','o','l','i','s',';',' ','S','=','M','i','n','n','e','s','o','t','a', ';',' ','C','=','U','S',0 }; -typedef BOOL (WINAPI *CryptDecodeObjectFunc)(DWORD, LPCSTR, const BYTE *, - DWORD, DWORD, void *, DWORD *); -typedef DWORD (WINAPI *CertNameToStrAFunc)(DWORD,LPVOID,DWORD,LPSTR,DWORD); -typedef DWORD (WINAPI *CertNameToStrWFunc)(DWORD,LPVOID,DWORD,LPWSTR,DWORD); -typedef DWORD (WINAPI *CertRDNValueToStrAFunc)(DWORD, PCERT_RDN_VALUE_BLOB, +static HMODULE dll; +static DWORD (WINAPI *pCertNameToStrA)(DWORD,LPVOID,DWORD,LPSTR,DWORD); +static DWORD (WINAPI *pCertNameToStrW)(DWORD,LPVOID,DWORD,LPWSTR,DWORD); +static DWORD (WINAPI *pCertRDNValueToStrA)(DWORD, PCERT_RDN_VALUE_BLOB, LPSTR, DWORD); -typedef DWORD (WINAPI *CertRDNValueToStrWFunc)(DWORD, PCERT_RDN_VALUE_BLOB, +static DWORD (WINAPI *pCertRDNValueToStrW)(DWORD, PCERT_RDN_VALUE_BLOB, LPWSTR, DWORD); -typedef BOOL (WINAPI *CertStrToNameAFunc)(DWORD dwCertEncodingType, +static BOOL (WINAPI *pCertStrToNameA)(DWORD dwCertEncodingType, LPCSTR pszX500, DWORD dwStrType, void *pvReserved, BYTE *pbEncoded, DWORD *pcbEncoded, LPCSTR *ppszError); -typedef BOOL (WINAPI *CertStrToNameWFunc)(DWORD dwCertEncodingType, +static BOOL (WINAPI *pCertStrToNameW)(DWORD dwCertEncodingType, LPCWSTR pszX500, DWORD dwStrType, void *pvReserved, BYTE *pbEncoded, DWORD *pcbEncoded, LPCWSTR *ppszError); -typedef DWORD (WINAPI *CertGetNameStringAFunc)(PCCERT_CONTEXT cert, DWORD type, +static DWORD (WINAPI *pCertGetNameStringA)(PCCERT_CONTEXT cert, DWORD type, DWORD flags, void *typePara, LPSTR str, DWORD cch); -static HMODULE dll; -static CertNameToStrAFunc pCertNameToStrA; -static CertNameToStrWFunc pCertNameToStrW; -static CryptDecodeObjectFunc pCryptDecodeObject; -static CertRDNValueToStrAFunc pCertRDNValueToStrA; -static CertRDNValueToStrWFunc pCertRDNValueToStrW; -static CertStrToNameAFunc pCertStrToNameA; -static CertStrToNameWFunc pCertStrToNameW; -static CertGetNameStringAFunc pCertGetNameStringA; static void test_CertRDNValueToStrA(void) { @@ -1096,18 +1086,13 @@ { dll = GetModuleHandleA("Crypt32.dll"); - pCertNameToStrA = (CertNameToStrAFunc)GetProcAddress(dll,"CertNameToStrA"); - pCertNameToStrW = (CertNameToStrWFunc)GetProcAddress(dll,"CertNameToStrW"); - pCertRDNValueToStrA = (CertRDNValueToStrAFunc)GetProcAddress(dll, - "CertRDNValueToStrA"); - pCertRDNValueToStrW = (CertRDNValueToStrWFunc)GetProcAddress(dll, - "CertRDNValueToStrW"); - pCryptDecodeObject = (CryptDecodeObjectFunc)GetProcAddress(dll, - "CryptDecodeObject"); - pCertStrToNameA = (CertStrToNameAFunc)GetProcAddress(dll,"CertStrToNameA"); - pCertStrToNameW = (CertStrToNameWFunc)GetProcAddress(dll,"CertStrToNameW"); - pCertGetNameStringA = (CertGetNameStringAFunc)GetProcAddress(dll, - "CertGetNameStringA"); + pCertNameToStrA = (void*)GetProcAddress(dll,"CertNameToStrA"); + pCertNameToStrW = (void*)GetProcAddress(dll,"CertNameToStrW"); + pCertRDNValueToStrA = (void*)GetProcAddress(dll, "CertRDNValueToStrA"); + pCertRDNValueToStrW = (void*)GetProcAddress(dll, "CertRDNValueToStrW"); + pCertStrToNameA = (void*)GetProcAddress(dll,"CertStrToNameA"); + pCertStrToNameW = (void*)GetProcAddress(dll,"CertStrToNameW"); + pCertGetNameStringA = (void*)GetProcAddress(dll, "CertGetNameStringA"); test_CertRDNValueToStrA(); test_CertRDNValueToStrW(); Modified: trunk/rostests/winetests/crypt32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/testlis…
============================================================================== --- trunk/rostests/winetests/crypt32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/crypt32/testlist.c [iso-8859-1] Wed Apr 3 22:43:36 2013 @@ -1,10 +1,7 @@ /* Automatically generated file; DO NOT EDIT!! */ -#define WIN32_LEAN_AND_MEAN -#include <windows.h> - #define STANDALONE -#include "wine/test.h" +#include <wine/test.h> extern void func_base64(void); extern void func_cert(void);
11 years, 8 months
1
0
0
0
[akhaldi] 58668: [CRYPT32] * Sync with Wine 1.5.26.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Apr 3 22:43:22 2013 New Revision: 58668 URL:
http://svn.reactos.org/svn/reactos?rev=58668&view=rev
Log: [CRYPT32] * Sync with Wine 1.5.26. Modified: trunk/reactos/dll/win32/crypt32/CMakeLists.txt trunk/reactos/dll/win32/crypt32/base64.c trunk/reactos/dll/win32/crypt32/cert.c trunk/reactos/dll/win32/crypt32/chain.c trunk/reactos/dll/win32/crypt32/decode.c trunk/reactos/dll/win32/crypt32/message.c trunk/reactos/dll/win32/crypt32/msg.c trunk/reactos/dll/win32/crypt32/object.c trunk/reactos/dll/win32/crypt32/oid.c trunk/reactos/dll/win32/crypt32/rootstore.c trunk/reactos/dll/win32/crypt32/serialize.c trunk/reactos/dll/win32/crypt32/sip.c trunk/reactos/dll/win32/crypt32/store.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/crypt32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/crypt32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/CMakeLists.txt [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -1,7 +1,8 @@ add_definitions( -D__WINESRC__ - -D_WINE) + -D_WINE + -D_CRYPT32_) remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) Modified: trunk/reactos/dll/win32/crypt32/base64.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/base64.c…
============================================================================== --- trunk/reactos/dll/win32/crypt32/base64.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/base64.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -828,7 +828,7 @@ ret = decoder(pszString, cchString, pbBinary, pcbBinary, pdwSkip, pdwFlags); if (ret) SetLastError(ret); - return (ret == ERROR_SUCCESS) ? TRUE : FALSE; + return ret == ERROR_SUCCESS; } static LONG decodeBase64BlockW(const WCHAR *in_buf, int in_len, @@ -1160,5 +1160,5 @@ ret = decoder(pszString, cchString, pbBinary, pcbBinary, pdwSkip, pdwFlags); if (ret) SetLastError(ret); - return (ret == ERROR_SUCCESS) ? TRUE : FALSE; -} + return ret == ERROR_SUCCESS; +} Modified: trunk/reactos/dll/win32/crypt32/cert.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/cert.c?r…
============================================================================== --- trunk/reactos/dll/win32/crypt32/cert.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/cert.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -846,7 +846,7 @@ * keyProvInfo->pwszContainerName to be NULL or a heap-allocated container * name. */ - memcpy(©, keyProvInfo, sizeof(copy)); + copy = *keyProvInfo; copy.pwszContainerName = containerW; matches = key_prov_info_matches_cert(pCert, ©); if (matches) @@ -2220,9 +2220,7 @@ info.ToBeSigned.cbData = encodedSize; info.ToBeSigned.pbData = encoded; - memcpy(&info.SignatureAlgorithm, - pSignatureAlgorithm, - sizeof(info.SignatureAlgorithm)); + info.SignatureAlgorithm = *pSignatureAlgorithm; info.Signature.cbData = hashSize; info.Signature.pbData = hash; info.Signature.cUnusedBits = 0; @@ -2243,8 +2241,10 @@ DWORD dwCertEncodingType, const BYTE *pbEncoded, DWORD cbEncoded, PCERT_PUBLIC_KEY_INFO pPublicKey) { + CRYPT_DATA_BLOB blob = { cbEncoded, (BYTE *)pbEncoded }; + return CryptVerifyCertificateSignatureEx(hCryptProv, dwCertEncodingType, - CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, (void *)pbEncoded, + CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &blob, CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY, pPublicKey, 0, NULL); } @@ -2988,8 +2988,7 @@ signedInfo.ToBeSigned.cbData = blob->cbData; signedInfo.ToBeSigned.pbData = blob->pbData; - memcpy(&signedInfo.SignatureAlgorithm, sigAlgo, - sizeof(signedInfo.SignatureAlgorithm)); + signedInfo.SignatureAlgorithm = *sigAlgo; signedInfo.Signature.cbData = sigSize; signedInfo.Signature.pbData = sig; signedInfo.Signature.cUnusedBits = 0; @@ -3040,8 +3039,7 @@ info->SerialNumber.cbData = pSerialNumber->cbData; info->SerialNumber.pbData = pSerialNumber->pbData; if (pSignatureAlgorithm) - memcpy(&info->SignatureAlgorithm, pSignatureAlgorithm, - sizeof(info->SignatureAlgorithm)); + info->SignatureAlgorithm = *pSignatureAlgorithm; else { info->SignatureAlgorithm.pszObjId = oid; @@ -3068,8 +3066,7 @@ } info->Subject.cbData = pSubjectIssuerBlob->cbData; info->Subject.pbData = pSubjectIssuerBlob->pbData; - memcpy(&info->SubjectPublicKeyInfo, pubKey, - sizeof(info->SubjectPublicKeyInfo)); + info->SubjectPublicKeyInfo = *pubKey; if (pExtensions) { info->cExtension = pExtensions->cExtension; @@ -3141,7 +3138,7 @@ PCCERT_CONTEXT context = NULL; BOOL ret, releaseContext = FALSE; PCERT_PUBLIC_KEY_INFO pubKey = NULL; - DWORD pubKeySize = 0,dwKeySpec = AT_SIGNATURE; + DWORD pubKeySize = 0, dwKeySpec; TRACE("(%08lx, %p, %08x, %p, %p, %p, %p, %p)\n", hProv, pSubjectIssuerBlob, dwFlags, pKeyProvInfo, pSignatureAlgorithm, pStartTime, @@ -3153,6 +3150,7 @@ return NULL; } + dwKeySpec = pKeyProvInfo ? pKeyProvInfo->dwKeySpec : AT_SIGNATURE; if (!hProv) { if (!pKeyProvInfo) @@ -3183,7 +3181,6 @@ if (!ret) return NULL; } - dwKeySpec = pKeyProvInfo->dwKeySpec; /* check if the key is here */ ret = CryptGetUserKey(hProv,dwKeySpec,&hKey); if(!ret) @@ -3203,14 +3200,11 @@ releaseContext = TRUE; } } - else if (pKeyProvInfo) - { - SetLastError(ERROR_INVALID_PARAMETER); - return NULL; - } - - CryptExportPublicKeyInfo(hProv, dwKeySpec, X509_ASN_ENCODING, NULL, + + ret = CryptExportPublicKeyInfo(hProv, dwKeySpec, X509_ASN_ENCODING, NULL, &pubKeySize); + if (!ret) + goto end; pubKey = CryptMemAlloc(pubKeySize); if (pubKey) { @@ -3244,6 +3238,7 @@ } CryptMemFree(pubKey); } +end: if (releaseContext) CryptReleaseContext(hProv, 0); return context; Modified: trunk/reactos/dll/win32/crypt32/chain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/chain.c?…
============================================================================== --- trunk/reactos/dll/win32/crypt32/chain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/chain.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -3162,6 +3162,7 @@ BOOL matches = TRUE; *see_wildcard = FALSE; + if (server_len < allowed_len) { WARN_(chain)("domain component %s too short for %s\n", @@ -3220,6 +3221,13 @@ BOOL matches = TRUE, allow_wildcards = TRUE; TRACE_(chain)("CN = %s\n", debugstr_wn(allowed_component, allowed_len)); + + /* Remove trailing NULLs from the allowed name; while they shouldn't appear + * in a certificate in the first place, they sometimes do, and they should + * be ignored. + */ + while (allowed_len && allowed_component[allowed_len - 1] == 0) + allowed_len--; /* From RFC 2818 (HTTP over TLS), section 3.1: * "Names may contain the wildcard character * which is considered to match Modified: trunk/reactos/dll/win32/crypt32/decode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/decode.c…
============================================================================== --- trunk/reactos/dll/win32/crypt32/decode.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/decode.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -692,8 +692,7 @@ CryptMemAlloc( cItems * sizeof(struct AsnArrayItemSize)); if (itemSizes) - memcpy(itemSizes, &itemSize, - sizeof(itemSize)); + *itemSizes = itemSize; } if (itemSizes) { @@ -1310,22 +1309,17 @@ if (dataLen) { - /* The largest possible string for the first two components - * is 2.175 (= 2 * 40 + 175 = 255), so this is big enough. - */ - char firstTwo[6]; const BYTE *ptr; - - snprintf(firstTwo, sizeof(firstTwo), "%d.%d", + char str[32]; + + snprintf(str, sizeof(str), "%d.%d", pbEncoded[1 + lenBytes] / 40, pbEncoded[1 + lenBytes] - (pbEncoded[1 + lenBytes] / 40) * 40); - bytesNeeded += strlen(firstTwo) + 1; + bytesNeeded += strlen(str) + 1; for (ptr = pbEncoded + 2 + lenBytes; ret && ptr - pbEncoded - 1 - lenBytes < dataLen; ) { - /* large enough for ".4000000" */ - char str[9]; int val = 0; while (ptr - pbEncoded - 1 - lenBytes < dataLen && @@ -1917,7 +1911,7 @@ sizeof(CERT_NAME_INFO), CRYPT_AsnDecodeRdn, sizeof(CERT_RDN), TRUE, offsetof(CERT_RDN, rgRDNAttr) }; - DWORD bytesNeeded; + DWORD bytesNeeded = 0; ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, NULL, &bytesNeeded, @@ -2014,7 +2008,7 @@ sizeof(CERT_NAME_INFO), CRYPT_AsnDecodeUnicodeRdn, sizeof(CERT_RDN), TRUE, offsetof(CERT_RDN, rgRDNAttr) }; - DWORD bytesNeeded; + DWORD bytesNeeded = 0; ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, NULL, &bytesNeeded, @@ -2460,7 +2454,7 @@ FALSE, TRUE, offsetof(CERT_POLICY_QUALIFIER_NOTICE_REFERENCE, rgNoticeNumbers), 0 }, }; - DWORD bytesNeeded; + DWORD bytesNeeded = 0; TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags, pvStructInfo, pvStructInfo ? *pcbStructInfo : 0); @@ -2677,7 +2671,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; ret = CRYPT_AsnDecodePolicyQualifierUserNoticeInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, @@ -2771,7 +2765,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; ret = CRYPT_AsnDecodePKCSAttributeInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL); @@ -2912,7 +2906,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; if ((ret = CRYPT_AsnDecodePubKeyInfoInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL))) @@ -2982,7 +2976,7 @@ else { *pcbStructInfo = sizeof(BOOL); - *(BOOL *)pvStructInfo = pbEncoded[2] ? TRUE : FALSE; + *(BOOL *)pvStructInfo = pbEncoded[2] != 0; ret = TRUE; } TRACE("returning %d (%08x)\n", ret, GetLastError()); @@ -3414,7 +3408,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; if ((ret = CRYPT_AsnDecodeAltNameInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL))) @@ -4002,7 +3996,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; if (!cbEncoded) { @@ -4111,7 +4105,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; if (!cbEncoded) { @@ -4205,7 +4199,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; if (!cbEncoded) { @@ -4298,7 +4292,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; if (pbEncoded[0] != ASN_INTEGER) { @@ -4406,7 +4400,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; if ((ret = CRYPT_AsnDecodeUnsignedIntegerInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_ENCODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL))) @@ -4662,7 +4656,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; ret = CRYPT_AsnDecodeUtcTimeInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL); @@ -4793,7 +4787,7 @@ __TRY { - DWORD bytesNeeded; + DWORD bytesNeeded = 0; ret = CRYPT_AsnDecodeChoiceOfTimeInternal(pbEncoded, cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL); @@ -4938,7 +4932,7 @@ if (pbEncoded[0] == (ASN_CONTEXT | ASN_CONSTRUCTOR | 0)) { - DWORD bytesNeeded, dataLen; + DWORD bytesNeeded = 0, dataLen; if ((ret = CRYPT_GetLen(pbEncoded, cbEncoded, &dataLen))) { Modified: trunk/reactos/dll/win32/crypt32/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/message.…
============================================================================== --- trunk/reactos/dll/win32/crypt32/message.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/message.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -140,7 +140,7 @@ for (i = 0; ret && i < cToBeSigned; i++) ret = CryptMsgUpdate(msg, rgpbToBeSigned[i], rgcbToBeSigned[i], - i == cToBeSigned - 1 ? TRUE : FALSE); + i == cToBeSigned - 1); } if (ret) { @@ -210,6 +210,9 @@ if (msg) { ret = CryptMsgUpdate(msg, pbSignedBlob, cbSignedBlob, TRUE); + if (ret && pcbDecoded) + ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, pbDecoded, + pcbDecoded); if (ret) { CERT_INFO *certInfo = CRYPT_GetSignerCertInfoFromMsg(msg, @@ -241,20 +244,6 @@ } CryptMemFree(certInfo); } - if (ret) - { - /* The caller is expected to pass a valid pointer to pcbDecoded - * when the message verifies successfully. - */ - if (pcbDecoded) - ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, pbDecoded, - pcbDecoded); - else - { - SetLastError(CRYPT_E_NOT_FOUND); - ret = FALSE; - } - } CryptMsgClose(msg); } if(!ret && pcbDecoded) @@ -296,16 +285,14 @@ memset(&info, 0, sizeof(info)); info.cbSize = sizeof(info); info.hCryptProv = pHashPara->hCryptProv; - memcpy(&info.HashAlgorithm, &pHashPara->HashAlgorithm, - sizeof(info.HashAlgorithm)); + info.HashAlgorithm = pHashPara->HashAlgorithm; info.pvHashAuxInfo = pHashPara->pvHashAuxInfo; msg = CryptMsgOpenToEncode(pHashPara->dwMsgEncodingType, flags, CMSG_HASHED, &info, NULL, NULL); if (msg) { for (i = 0, ret = TRUE; ret && i < cToBeHashed; i++) - ret = CryptMsgUpdate(msg, rgpbToBeHashed[i], rgcbToBeHashed[i], - i == cToBeHashed - 1 ? TRUE : FALSE); + ret = CryptMsgUpdate(msg, rgpbToBeHashed[i], rgcbToBeHashed[i], i == cToBeHashed - 1); if (ret) { ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, pbHashedBlob, @@ -356,7 +343,7 @@ for (i = 0; ret && i < cToBeHashed; i++) { ret = CryptMsgUpdate(msg, rgpbToBeHashed[i], - rgcbToBeHashed[i], i == cToBeHashed - 1 ? TRUE : FALSE); + rgcbToBeHashed[i], i == cToBeHashed - 1); } } else @@ -511,7 +498,7 @@ for (i = 0; ret && i < cToBeSigned; ++i) { ret = CryptMsgUpdate(msg, rgpbToBeSigned[i], rgcbToBeSigned[i], - i == cToBeSigned - 1 ? TRUE : FALSE); + i == cToBeSigned - 1); } } else Modified: trunk/reactos/dll/win32/crypt32/msg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/msg.c?re…
============================================================================== --- trunk/reactos/dll/win32/crypt32/msg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/msg.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -1450,6 +1450,7 @@ if (!ret) { CSignedEncodeMsg_Close(msg); + CryptMemFree(msg); msg = NULL; } } @@ -2397,16 +2398,16 @@ !strcmp(msg->u.signed_data.info->content.pszObjId, szOID_RSA_data)) { - CRYPT_DATA_BLOB *blob; + CRYPT_DATA_BLOB *rsa_blob; ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_OCTET_STRING, content->pbData, content->cbData, - CRYPT_DECODE_ALLOC_FLAG, NULL, &blob, &size); + CRYPT_DECODE_ALLOC_FLAG, NULL, &rsa_blob, &size); if (ret) { ret = CSignedMsgData_Update(&msg->u.signed_data, - blob->pbData, blob->cbData, TRUE, Verify); - LocalFree(blob); + rsa_blob->pbData, rsa_blob->cbData, TRUE, Verify); + LocalFree(rsa_blob); } } else Modified: trunk/reactos/dll/win32/crypt32/object.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/object.c…
============================================================================== --- trunk/reactos/dll/win32/crypt32/object.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/object.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -842,7 +842,7 @@ DWORD mapEntries, void *pbFormat, DWORD *pcbFormat, BOOL *first) { DWORD bytesNeeded = sizeof(WCHAR); - int i; + unsigned int i; BOOL ret = TRUE, localFirst = *first; for (i = 0; i < mapEntries; i++) @@ -947,7 +947,7 @@ else { static BOOL stringsLoaded = FALSE; - int i; + unsigned int i; DWORD bitStringLen; BOOL first = TRUE; @@ -1866,7 +1866,7 @@ static const WCHAR sep[] = { ',',' ',0 }; static const WCHAR bitsFmt[] = { ' ','(','%','0','2','x',')',0 }; static BOOL stringsLoaded = FALSE; - int i, numReasons = 0; + unsigned int i, numReasons = 0; BOOL ret = TRUE; DWORD bytesNeeded = sizeof(WCHAR); WCHAR bits[6]; @@ -2317,7 +2317,7 @@ else { static BOOL stringsLoaded = FALSE; - int i; + unsigned int i; DWORD bitStringLen; BOOL first = TRUE; Modified: trunk/reactos/dll/win32/crypt32/oid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/oid.c?re…
============================================================================== --- trunk/reactos/dll/win32/crypt32/oid.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/oid.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -684,7 +684,7 @@ CryptMemFree(szKey); if (rc) SetLastError(rc); - return rc ? FALSE : TRUE; + return !rc; } BOOL WINAPI CryptGetOIDFunctionValue(DWORD dwEncodingType, LPCSTR pszFuncName, @@ -721,7 +721,7 @@ SetLastError(rc); RegCloseKey(hKey); } - return rc ? FALSE : TRUE; + return !rc; } BOOL WINAPI CryptSetOIDFunctionValue(DWORD dwEncodingType, LPCSTR pszFuncName, @@ -758,7 +758,7 @@ SetLastError(rc); RegCloseKey(hKey); } - return rc ? FALSE : TRUE; + return !rc; } static LPCWSTR CRYPT_FindStringInMultiString(LPCWSTR multi, LPCWSTR toFind) @@ -1053,9 +1053,6 @@ static const WCHAR rc4[] = { 'r','c','4',0 }; static const WCHAR sha[] = { 's','h','a',0 }; static const WCHAR sha1[] = { 's','h','a','1',0 }; -static const WCHAR sha256[] = { 's','h','a','2','5','6',0 }; -static const WCHAR sha384[] = { 's','h','a','3','8','4',0 }; -static const WCHAR sha512[] = { 's','h','a','5','1','2',0 }; static const WCHAR RSA[] = { 'R','S','A',0 }; static const WCHAR RSA_KEYX[] = { 'R','S','A','_','K','E','Y','X',0 }; static const WCHAR RSA_SIGN[] = { 'R','S','A','_','S','I','G','N',0 }; @@ -1105,6 +1102,9 @@ static const WCHAR X21Address[] = { 'X','2','1','A','d','d','r','e','s','s',0 }; static const WCHAR dnQualifier[] = { 'd','n','Q','u','a','l','i','f','i','e','r',0 }; +static const WCHAR SpcSpAgencyInfo[] = { 'S','p','c','S','p','A','g','e','n','c','y','I','n','f','o',0 }; +static const WCHAR SpcFinancialCriteria[] = { 'S','p','c','F','i','n','a','n','c','i','a','l','C','r','i','t','e','r','i','a',0 }; +static const WCHAR SpcMinimalCriteria[] = { 'S','p','c','M','i','n','i','m','a','l','C','r','i','t','e','r','i','a',0 }; static const WCHAR Email[] = { 'E','m','a','i','l',0 }; static const WCHAR GN[] = { 'G','N',0 }; @@ -1273,9 +1273,9 @@ { 6, szOID_NETSCAPE_CA_POLICY_URL, 0, (LPCWSTR)IDS_NETSCAPE_CA_POLICY_URL, NULL }, { 6, szOID_NETSCAPE_SSL_SERVER_NAME, 0, (LPCWSTR)IDS_NETSCAPE_SSL_SERVER_NAME, NULL }, { 6, szOID_NETSCAPE_COMMENT, 0, (LPCWSTR)IDS_NETSCAPE_COMMENT, NULL }, - { 6, "1.3.6.1.4.1.311.2.1.10", 0, (LPCWSTR)IDS_SPC_SP_AGENCY_INFO, NULL }, - { 6, "1.3.6.1.4.1.311.2.1.27", 0, (LPCWSTR)IDS_SPC_FINANCIAL_CRITERIA, NULL }, - { 6, "1.3.6.1.4.1.311.2.1.26", 0, (LPCWSTR)IDS_SPC_MINIMAL_CRITERIA, NULL }, + { 6, "1.3.6.1.4.1.311.2.1.10", 0, SpcSpAgencyInfo, NULL }, + { 6, "1.3.6.1.4.1.311.2.1.27", 0, SpcFinancialCriteria, NULL }, + { 6, "1.3.6.1.4.1.311.2.1.26", 0, SpcMinimalCriteria, NULL }, { 6, szOID_COUNTRY_NAME, 0, (LPCWSTR)IDS_COUNTRY, NULL }, { 6, szOID_ORGANIZATION_NAME, 0, (LPCWSTR)IDS_ORGANIZATION, NULL }, { 6, szOID_ORGANIZATIONAL_UNIT_NAME, 0, (LPCWSTR)IDS_ORGANIZATIONAL_UNIT, NULL }, Modified: trunk/reactos/dll/win32/crypt32/rootstore.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/rootstor…
============================================================================== --- trunk/reactos/dll/win32/crypt32/rootstore.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/rootstore.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -189,7 +189,7 @@ "\n\tbad name constraints"); if (status & CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT) pos += snprintf(buf + pos, sizeof(buf) - pos, - "\n\tunsuported name constraint"); + "\n\tunsupported name constraint"); if (status & CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT) pos += snprintf(buf + pos, sizeof(buf) - pos, "\n\tundefined name constraint"); Modified: trunk/reactos/dll/win32/crypt32/serialize.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/serializ…
============================================================================== --- trunk/reactos/dll/win32/crypt32/serialize.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/serialize.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -652,21 +652,21 @@ ret = output(handle, fileHeader, sizeof(fileHeader)); if (ret) { - memcpy(&interface, pCertInterface, sizeof(interface)); + interface = *pCertInterface; interface.serialize = (SerializeElementFunc)CRYPT_SerializeCertNoHash; ret = CRYPT_SerializeContextsToStream(output, handle, &interface, store); } if (ret) { - memcpy(&interface, pCRLInterface, sizeof(interface)); + interface = *pCRLInterface; interface.serialize = (SerializeElementFunc)CRYPT_SerializeCRLNoHash; ret = CRYPT_SerializeContextsToStream(output, handle, &interface, store); } if (ret) { - memcpy(&interface, pCTLInterface, sizeof(interface)); + interface = *pCTLInterface; interface.serialize = (SerializeElementFunc)CRYPT_SerializeCTLNoHash; ret = CRYPT_SerializeContextsToStream(output, handle, &interface, store); Modified: trunk/reactos/dll/win32/crypt32/sip.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/sip.c?re…
============================================================================== --- trunk/reactos/dll/win32/crypt32/sip.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/sip.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -634,14 +634,17 @@ if (!sip.pfPut || temp != lib) goto error; FreeLibrary(temp); + temp = NULL; sip.pfCreate = CRYPT_LoadSIPFunc(pgSubject, szCreate, &temp); if (!sip.pfCreate || temp != lib) goto error; FreeLibrary(temp); + temp = NULL; sip.pfVerify = CRYPT_LoadSIPFunc(pgSubject, szVerify, &temp); if (!sip.pfVerify || temp != lib) goto error; FreeLibrary(temp); + temp = NULL; sip.pfRemove = CRYPT_LoadSIPFunc(pgSubject, szRemoveSigned, &temp); if (!sip.pfRemove || temp != lib) goto error; Modified: trunk/reactos/dll/win32/crypt32/store.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/store.c?…
============================================================================== --- trunk/reactos/dll/win32/crypt32/store.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/store.c [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -163,7 +163,7 @@ if (ppStoreContext) *ppStoreContext = CertDuplicateCertificateContext(context); } - return context ? TRUE : FALSE; + return context != 0; } static void *CRYPT_MemEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev) @@ -208,7 +208,7 @@ if (ppStoreContext) *ppStoreContext = CertDuplicateCRLContext(context); } - return context ? TRUE : FALSE; + return context != 0; } static void *CRYPT_MemEnumCrl(PWINECRYPT_CERTSTORE store, void *pPrev) @@ -253,7 +253,7 @@ if (ppStoreContext) *ppStoreContext = CertDuplicateCTLContext(context); } - return context ? TRUE : FALSE; + return context != 0; } static void *CRYPT_MemEnumCtl(PWINECRYPT_CERTSTORE store, void *pPrev) 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 [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Wed Apr 3 22:43:22 2013 @@ -52,7 +52,7 @@ reactos/dll/win32/comdlg32 # Synced to Wine 1.3.37 reactos/dll/win32/compstui # Synced to Wine-1.5.19 reactos/dll/win32/credui # Synced to Wine-1.5.4 -reactos/dll/win32/crypt32 # Synced to Wine-1.3.37 +reactos/dll/win32/crypt32 # Synced to Wine-1.5.26 reactos/dll/win32/cryptdlg # Synced to Wine-1.5.4 reactos/dll/win32/cryptdll # Synced to Wine-1.5.4 reactos/dll/win32/cryptnet # Synced to Wine-1.3.37
11 years, 8 months
1
0
0
0
[akhaldi] 58667: * Fix the unix build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Apr 3 22:03:06 2013 New Revision: 58667 URL:
http://svn.reactos.org/svn/reactos?rev=58667&view=rev
Log: * Fix the unix build. Modified: trunk/reactos/dll/win32/jscript/CMakeLists.txt Modified: trunk/reactos/dll/win32/jscript/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/CMakeLis…
============================================================================== --- trunk/reactos/dll/win32/jscript/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/jscript/CMakeLists.txt [iso-8859-1] Wed Apr 3 22:03:06 2013 @@ -37,12 +37,17 @@ regexp.c string.c vbarray.c - rsrc.rc ${CMAKE_CURRENT_BINARY_DIR}/jscript.def) -add_library(jscript SHARED ${SOURCE}) +add_library(jscript SHARED ${SOURCE} rsrc.rc) add_idl_headers(jscript_idlheader jscript_classes.idl) -allow_warnings(jscript) + +if(NOT MSVC) + # FIXME:
http://www.cmake.org/Bug/view.php?id=12998
+ #allow_warnings(jscript) + set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") +endif() + set_module_type(jscript win32dll) target_link_libraries(jscript wine) add_importlibs(jscript user32 ole32 oleaut32 advapi32 msvcrt kernel32 ntdll)
11 years, 8 months
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
27
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
Results per page:
10
25
50
100
200