strip whitespace from end of lines
Modified: trunk/reactos/lib/advapi32/crypt/crypt.c
Modified: trunk/reactos/lib/advapi32/crypt/crypt_md4.c
Modified: trunk/reactos/lib/advapi32/crypt/crypt_md5.c
Modified: trunk/reactos/lib/advapi32/reg/reg.c
Modified: trunk/reactos/lib/advapi32/sec/misc.c
Modified: trunk/reactos/lib/advapi32/service/sctrl.c
Modified: trunk/reactos/lib/advapi32/service/undoc.c
Modified: trunk/reactos/lib/advapi32/token/privilege.c
Modified: trunk/reactos/lib/advapi32/token/token.c
Modified: trunk/reactos/lib/advapi32/winetests/crypt.c
Modified: trunk/reactos/lib/advapi32/winetests/crypt_lmhash.c
Modified: trunk/reactos/lib/advapi32/winetests/crypt_md4.c
Modified: trunk/reactos/lib/advapi32/winetests/crypt_md5.c
Modified: trunk/reactos/lib/advapi32/winetests/registry.c
Modified: trunk/reactos/lib/advapi32/winetests/security.c

Modified: trunk/reactos/lib/advapi32/crypt/crypt.c
--- trunk/reactos/lib/advapi32/crypt/crypt.c	2005-05-09 01:43:25 UTC (rev 15168)
+++ trunk/reactos/lib/advapi32/crypt/crypt.c	2005-05-09 01:43:41 UTC (rev 15169)
@@ -270,7 +270,7 @@
 		SetLastError(NTE_BAD_PROV_TYPE);
 		return FALSE;
 	}
-	
+
 	if (!phProv)
 	{
 		SetLastError(ERROR_INVALID_PARAMETER);
@@ -1001,19 +1001,19 @@
 	{
 		DWORD numkeys;
 		WCHAR *provNameW;
-		
+
 		RegQueryInfoKeyW(hKey, NULL, NULL, NULL, &numkeys, pcbProvName,
 				 NULL, NULL, NULL, NULL, NULL, NULL);
-		
+
 		if (!(provNameW = CRYPT_Alloc(*pcbProvName * sizeof(WCHAR))))
 			CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY);
-		
+
 		RegEnumKeyExW(hKey, dwIndex, provNameW, pcbProvName, NULL, NULL, NULL, NULL);
 		(*pcbProvName)++;
 		*pcbProvName *= sizeof(WCHAR);
-		
+
 		CRYPT_Free(provNameW);
-		
+
 		if (dwIndex >= numkeys)
 			CRYPT_ReturnLastError(ERROR_NO_MORE_ITEMS);
 	}
@@ -1022,7 +1022,7 @@
 		DWORD size = sizeof(DWORD);
 		DWORD result;
 		HKEY subkey;
-		
+
 		result = RegEnumKeyW(hKey, dwIndex, pszProvName, *pcbProvName / sizeof(WCHAR));
 		if (result)
 			CRYPT_ReturnLastError(result);
@@ -1123,7 +1123,7 @@
 	*pdwProvType += (*(--ch) - '0') * 10;
 	*pdwProvType += (*(--ch) - '0') * 100;
 	CRYPT_Free(keyname);
-	
+
 	result = RegQueryValueExA(hSubkey, "TypeName", NULL, &dwType, (LPBYTE)pszTypeName, pcbTypeName);
 	if (result)
 		CRYPT_ReturnLastError(result);
@@ -1162,7 +1162,7 @@
 
 /******************************************************************************
  * CryptExportKey (ADVAPI32.@)
- * 
+ *
  * Exports a cryptographic key from a CSP.
  *
  * PARAMS
@@ -1280,18 +1280,18 @@
 		CRYPT_ReturnLastError(NTE_PROV_TYPE_NOT_DEF);
 	}
 	CRYPT_Free(keyname);
-	
-	result = RegQueryValueExA(hKey, "Name", NULL, NULL, (LPBYTE)pszProvName, pcbProvName); 
+
+	result = RegQueryValueExA(hKey, "Name", NULL, NULL, (LPBYTE)pszProvName, pcbProvName);
 	if (result)
 	{
 		if (result != ERROR_MORE_DATA)
 			SetLastError(NTE_PROV_TYPE_ENTRY_BAD);
 		else
 			SetLastError(result);
-		
+
 		return FALSE;
 	}
-	
+
 	RegCloseKey(hKey);
 	return TRUE;
 }
@@ -1498,7 +1498,7 @@
 /******************************************************************************
  * CryptHashSessionKey (ADVAPI32.@)
  *
- * PARAMS 
+ * PARAMS
  *  hHash   [I] Handle to the hash object.
  *  hKey    [I] Handle to the key to be hashed.
  *  dwFlags [I] Can be CRYPT_LITTLE_ENDIAN.
@@ -1729,7 +1729,7 @@
 	if (dwFlags & ~(CRYPT_MACHINE_DEFAULT | CRYPT_USER_DEFAULT | CRYPT_DELETE_DEFAULT)
 			|| dwFlags == CRYPT_DELETE_DEFAULT)
 		CRYPT_ReturnLastError(NTE_BAD_FLAGS);
-	
+
 	if (!(keyname = CRYPT_GetTypeKeyName(dwProvType, dwFlags & CRYPT_USER_DEFAULT)))
 		CRYPT_ReturnLastError(ERROR_NOT_ENOUGH_MEMORY);
 	if (RegOpenKeyA((dwFlags & CRYPT_USER_DEFAULT) ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE,
@@ -1739,7 +1739,7 @@
 		CRYPT_ReturnLastError(NTE_BAD_PROVIDER);
 	}
 	CRYPT_Free(keyname);
-	
+
 	if (dwFlags & CRYPT_DELETE_DEFAULT)
 	{
 		RegDeleteValueA(hTypeKey, "Name");
@@ -1759,14 +1759,14 @@
 			CRYPT_ReturnLastError(NTE_BAD_PROVIDER);
 		}
 		CRYPT_Free(keyname);
-		
+
 		if (RegSetValueExA(hTypeKey, "Name", 0, REG_SZ, (LPBYTE)pszProvName, strlen(pszProvName) + 1))
 		{
 			RegCloseKey(hTypeKey);
 			RegCloseKey(hProvKey);
 			return FALSE;
 		}
-		
+
 		RegCloseKey(hProvKey);
 	}
 	RegCloseKey(hTypeKey);

Modified: trunk/reactos/lib/advapi32/crypt/crypt_md4.c
--- trunk/reactos/lib/advapi32/crypt/crypt_md4.c	2005-05-09 01:43:25 UTC (rev 15168)
+++ trunk/reactos/lib/advapi32/crypt/crypt_md4.c	2005-05-09 01:43:41 UTC (rev 15169)
@@ -221,7 +221,7 @@
 }
 
 /*
- * Final wrapup - pad to 64-byte boundary with the bit pattern 
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
  * 1 0* (64-bit count of bits processed, MSB-first)
  */
 VOID WINAPI MD4Final(MD4_CTX *ctx)

Modified: trunk/reactos/lib/advapi32/crypt/crypt_md5.c
--- trunk/reactos/lib/advapi32/crypt/crypt_md5.c	2005-05-09 01:43:25 UTC (rev 15168)
+++ trunk/reactos/lib/advapi32/crypt/crypt_md5.c	2005-05-09 01:43:41 UTC (rev 15169)
@@ -231,7 +231,7 @@
 }
 
 /*
- * Final wrapup - pad to 64-byte boundary with the bit pattern 
+ * Final wrapup - pad to 64-byte boundary with the bit pattern
  * 1 0* (64-bit count of bits processed, MSB-first)
  */
 VOID WINAPI MD5Final( MD5_CTX *ctx )

Modified: trunk/reactos/lib/advapi32/reg/reg.c
--- trunk/reactos/lib/advapi32/reg/reg.c	2005-05-09 01:43:25 UTC (rev 15168)
+++ trunk/reactos/lib/advapi32/reg/reg.c	2005-05-09 01:43:41 UTC (rev 15169)
@@ -1229,7 +1229,7 @@
 /******************************************************************************
  * RegEnumValueW   [ADVAPI32.@]
  * @implemented
- * 
+ *
  * PARAMS
  *  hkey       [I] Handle to key to query
  *  index      [I] Index of value to query
@@ -1260,7 +1260,7 @@
 
     /* NT only checks count, not val_count */
     if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER;
-	
+
 	status = MapDefaultKey (&KeyHandle, hKey);
 	if (!NT_SUCCESS(status))
 	{
@@ -1690,7 +1690,7 @@
 
 	DPRINT("RegOpenKeyExW hKey 0x%x lpSubKey %S ulOptions 0x%x samDesired 0x%x phkResult %p\n",
 		hKey, lpSubKey, ulOptions, samDesired, phkResult);
-	
+
 	Status = MapDefaultKey (&KeyHandle, hKey);
 	if (!NT_SUCCESS(Status))
 	{
@@ -1738,13 +1738,13 @@
   OBJECT_ATTRIBUTES ObjectAttributes;
   LONG ErrorCode;
   NTSTATUS Status;
-  
+
   /* check parameters */
   if (hToken == NULL || dwOptions != 0 || phkResult == NULL)
   {
     return ERROR_INVALID_PARAMETER;
   }
-  
+
   /*
    * Get the user sid from the token
    */
@@ -1789,14 +1789,14 @@
       /* the information appears to have changed?! try again */
       goto ReadTokenSid;
     }
-    
+
     /* NOTE - as opposed to all other registry functions windows does indeed
               change the last error code in case the caller supplied a invalid
               handle for example! */
     ErrorCode = RtlNtStatusToDosError (Status);
     return ErrorCode;
   }
-  
+
   /*
    * Build the absolute path for the user's registry in the form
    * "\Registry\User\<SID>_Classes"
@@ -1814,7 +1814,7 @@
   {
     return RtlNtStatusToDosError (Status);
   }
-  
+
   /* allocate enough memory for the entire key string */
   UserClassesKeyRoot.Length = 0;
   UserClassesKeyRoot.MaximumLength = UserSidString.Length +
@@ -1828,7 +1828,7 @@
     RtlFreeUnicodeString(&UserSidString);
     return RtlNtStatusToDosError (Status);
   }
-  
+
   /* build the string */
   RtlAppendUnicodeToString(&UserClassesKeyRoot,
                            UserClassesKeyPrefix);
@@ -1836,7 +1836,7 @@
                                  &UserSidString);
   RtlAppendUnicodeToString(&UserClassesKeyRoot,
                            UserClassesKeySuffix);
-  
+
   DPRINT("RegOpenUserClassesRoot: Absolute path: %wZ\n", &UserClassesKeyRoot);
 
   /*
@@ -1848,19 +1848,19 @@
 			      OBJ_CASE_INSENSITIVE,
 			      NULL,
 			      NULL);
-  
+
   Status = NtOpenKey((PHANDLE)phkResult,
                      samDesired,
                      &ObjectAttributes);
-  
+
   RtlFreeUnicodeString(&UserSidString);
   RtlFreeUnicodeString(&UserClassesKeyRoot);
-  
+
   if (!NT_SUCCESS(Status))
   {
     return RtlNtStatusToDosError (Status);
   }
-  
+
   return ERROR_SUCCESS;
 }
 
@@ -3037,7 +3037,7 @@
       {
          cbData++;
       }
-      
+
       RtlInitAnsiString (&AnsiString,
 			 NULL);
       AnsiString.Buffer = (PSTR)lpData;
@@ -3116,7 +3116,7 @@
       RtlInitUnicodeString (&ValueName, L"");
     }
   pValueName = &ValueName;
-  
+
   if (((dwType == REG_SZ) ||
        (dwType == REG_MULTI_SZ) ||
        (dwType == REG_EXPAND_SZ)) &&
@@ -3155,12 +3155,12 @@
 {
   LONG ret;
   HKEY hSubKey;
-  
+
   if (dwType != REG_SZ)
   {
      return ERROR_INVALID_PARAMETER;
   }
-  
+
   if (lpSubKey != NULL && lpSubKey[0] != '\0')
   {
      ret = RegCreateKeyA(hKey,
@@ -3174,14 +3174,14 @@
   }
   else
      hSubKey = hKey;
-  
+
   ret = RegSetValueExA(hSubKey,
                        NULL,
                        0,
                        REG_SZ,
                        (CONST BYTE*)lpData,
                        strlen(lpData) + 1);
-  
+
   if (hSubKey != hKey)
   {
      RegCloseKey(hSubKey);

Modified: trunk/reactos/lib/advapi32/sec/misc.c
--- trunk/reactos/lib/advapi32/sec/misc.c	2005-05-09 01:43:25 UTC (rev 15168)
+++ trunk/reactos/lib/advapi32/sec/misc.c	2005-05-09 01:43:41 UTC (rev 15169)
@@ -53,7 +53,7 @@
  *
  * RETURNS
  *  Success: TRUE. pSecurityDescriptor contains the requested information.
- *  Failure: FALSE. lpnLengthNeeded contains the required space to return the info. 
+ *  Failure: FALSE. lpnLengthNeeded contains the required space to return the info.
  *
  * NOTES
  *  The information returned is constrained by the callers access rights and
@@ -476,7 +476,7 @@
   UNICODE_STRING NameW;
   ANSI_STRING NameA;
   BOOL Ret;
-  
+
   /* apparently Win doesn't check whether lpSize is valid at all! */
 
   NameW.Length = 0;
@@ -487,23 +487,23 @@
     SetLastError(ERROR_NOT_ENOUGH_MEMORY);
     return FALSE;
   }
-  
+
   NameA.Length = 0;
   NameA.MaximumLength = ((*lpSize) < 0xFFFF ? (USHORT)(*lpSize) : 0xFFFF);
   NameA.Buffer = lpszName;
-  
+
   Ret = GetUserNameW(NameW.Buffer,
                      lpSize);
   if(Ret)
   {
     RtlUnicodeStringToAnsiString(&NameA, &NameW, FALSE);
     NameA.Buffer[NameA.Length] = '\0';
-    
+
     *lpSize = NameA.Length + 1;
   }
-  
+
   LocalFree(NameW.Buffer);
-  
+
   return Ret;
 }
 
@@ -634,18 +634,18 @@
   UNICODE_STRING NameW, ReferencedDomainNameW, SystemNameW;
   DWORD szName, szReferencedDomainName;
   BOOL Ret;
-  
+
   /*
    * save the buffer sizes the caller passed to us, as they may get modified and
    * we require the original values when converting back to ansi
    */
   szName = *cchName;
   szReferencedDomainName = *cchReferencedDomainName;
-  
+
   /*
    * allocate buffers for the unicode strings to receive
    */
-  
+
   if(szName > 0)
   {
     NameW.Length = 0;
@@ -659,7 +659,7 @@
   }
   else
     NameW.Buffer = NULL;
-  
+
   if(szReferencedDomainName > 0)
   {
     ReferencedDomainNameW.Length = 0;
@@ -677,11 +677,11 @@
   }
   else
     ReferencedDomainNameW.Buffer = NULL;
-  
+
   /*
    * convert the system name to unicode - if present
    */
-  
+
   if(lpSystemName != NULL)
   {
     ANSI_STRING SystemNameA;
@@ -691,11 +691,11 @@
   }
   else
     SystemNameW.Buffer = NULL;
-  
+
   /*
    * it's time to call the unicode version
    */
-  
+
   Ret = LookupAccountSidW(SystemNameW.Buffer,
                           lpSid,
                           NameW.Buffer,
@@ -713,15 +713,15 @@
     if(lpName != NULL)
     {
       ANSI_STRING NameA;
-      
+
       NameA.Length = 0;
       NameA.MaximumLength = ((szName <= 0xFFFF) ? (USHORT)szName : 0xFFFF);
       NameA.Buffer = lpName;
-      
+
       RtlUnicodeStringToAnsiString(&NameA, &NameW, FALSE);
       NameA.Buffer[NameA.Length] = '\0';
     }
-    
+
     if(lpReferencedDomainName != NULL)
     {
       ANSI_STRING ReferencedDomainNameA;
@@ -735,7 +735,7 @@
       ReferencedDomainNameA.Buffer[ReferencedDomainNameA.Length] = '\0';
     }
   }
-  
+
   /*
    * free previously allocated buffers
    */
@@ -752,7 +752,7 @@
   {
     LocalFree(ReferencedDomainNameW.Buffer);
   }
-  
+
   return Ret;
 }
 
@@ -1196,19 +1196,19 @@
  * GetSecurityInfoExW         EXPORTED
  */
 DWORD WINAPI GetSecurityInfoExA(
-   HANDLE hObject, 
-   SE_OBJECT_TYPE ObjectType, 
-   SECURITY_INFORMATION SecurityInfo, 
+   HANDLE hObject,
+   SE_OBJECT_TYPE ObjectType,
+   SECURITY_INFORMATION SecurityInfo,
    LPCSTR lpProvider,
-   LPCSTR lpProperty, 
-   PACTRL_ACCESSA *ppAccessList, 
-   PACTRL_AUDITA *ppAuditList, 
-   LPSTR *lppOwner, 
+   LPCSTR lpProperty,
+   PACTRL_ACCESSA *ppAccessList,
+   PACTRL_AUDITA *ppAuditList,
+   LPSTR *lppOwner,
    LPSTR *lppGroup
    )
 {
   DPRINT1("GetSecurityInfoExA stub!\n");
-  return ERROR_BAD_PROVIDER; 
+  return ERROR_BAD_PROVIDER;
 }
 
 
@@ -1216,19 +1216,19 @@
  * GetSecurityInfoExW         EXPORTED
  */
 DWORD WINAPI GetSecurityInfoExW(
-   HANDLE hObject, 
-   SE_OBJECT_TYPE ObjectType, 
-   SECURITY_INFORMATION SecurityInfo, 
+   HANDLE hObject,
+   SE_OBJECT_TYPE ObjectType,
+   SECURITY_INFORMATION SecurityInfo,
    LPCWSTR lpProvider,
-   LPCWSTR lpProperty, 
-   PACTRL_ACCESSW *ppAccessList, 
-   PACTRL_AUDITW *ppAuditList, 
-   LPWSTR *lppOwner, 
+   LPCWSTR lpProperty,
+   PACTRL_ACCESSW *ppAccessList,
+   PACTRL_AUDITW *ppAuditList,
+   LPWSTR *lppOwner,
    LPWSTR *lppGroup
    )
 {
   DPRINT1("GetSecurityInfoExW stub!\n");
-  return ERROR_BAD_PROVIDER; 
+  return ERROR_BAD_PROVIDER;
 }
 
 

Modified: trunk/reactos/lib/advapi32/service/sctrl.c
--- trunk/reactos/lib/advapi32/service/sctrl.c	2005-05-09 01:43:25 UTC (rev 15168)
+++ trunk/reactos/lib/advapi32/service/sctrl.c	2005-05-09 01:43:41 UTC (rev 15169)
@@ -1,5 +1,5 @@
 /* $Id$
- * 
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
  * FILE:            lib/advapi32/service/sctrl.c

Modified: trunk/reactos/lib/advapi32/service/undoc.c
--- trunk/reactos/lib/advapi32/service/undoc.c	2005-05-09 01:43:25 UTC (rev 15168)
+++ trunk/reactos/lib/advapi32/service/undoc.c	2005-05-09 01:43:41 UTC (rev 15169)
@@ -1,5 +1,5 @@
 /* $Id$
- * 
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
  * FILE:            lib/advapi32/service/undoc.c

Modified: trunk/reactos/lib/advapi32/token/privilege.c
--- trunk/reactos/lib/advapi32/token/privilege.c	2005-05-09 01:43:25 UTC (rev 15168)
+++ trunk/reactos/lib/advapi32/token/privilege.c	2005-05-09 01:43:41 UTC (rev 15169)
@@ -1,4 +1,4 @@
-/* $Id$ 
+/* $Id$
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries

Modified: trunk/reactos/lib/advapi32/token/token.c
--- trunk/reactos/lib/advapi32/token/token.c	2005-05-09 01:43:25 UTC (rev 15168)
+++ trunk/reactos/lib/advapi32/token/token.c	2005-05-09 01:43:41 UTC (rev 15169)
@@ -261,7 +261,7 @@
   HANDLE NewToken;
   NTSTATUS Status;
   SECURITY_QUALITY_OF_SERVICE Sqos;
-  
+
   Sqos.Length = sizeof(SECURITY_QUALITY_OF_SERVICE);
   Sqos.ImpersonationLevel = ImpersonationLevel;
   Sqos.ContextTrackingMode = 0;
@@ -285,7 +285,7 @@
     }
 
   ObjectAttributes.SecurityQualityOfService = &Sqos;
-  
+
   Status = NtDuplicateToken (ExistingTokenHandle,
 			     dwDesiredAccess,
 			     &ObjectAttributes,
@@ -334,26 +334,26 @@
   DWORD i;
   PTOKEN_GROUPS lpGroups = NULL;
   TOKEN_TYPE TokenInformation;
- 
+
   if (IsMember == NULL)
   {
     SetLastError(ERROR_INVALID_PARAMETER);
     return FALSE;
   }
- 
+
   if (ExistingTokenHandle == NULL)
   {
     /* Get impersonation token of the calling thread */
     if (!OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, FALSE, &ExistingTokenHandle))
       return FALSE;
- 
+
     if (!DuplicateToken(ExistingTokenHandle, SecurityAnonymous, &AccessToken))
     {
       CloseHandle(ExistingTokenHandle);
       goto ByeBye;
     }
     CloseHandle(ExistingTokenHandle);
-    ReleaseToken = TRUE; 
+    ReleaseToken = TRUE;
   }
   else
   {
@@ -369,7 +369,7 @@
     else
       AccessToken = ExistingTokenHandle;
   }
- 
+
   *IsMember = FALSE;
   /* Search in groups of the token */
   if (!GetTokenInformation(AccessToken, TokenGroups, NULL, 0, &dwSize))
@@ -391,13 +391,13 @@
   /* FIXME: Search in users of the token? */
   DPRINT1("CheckTokenMembership() partially implemented!\n");
   Result = TRUE;
- 
+
 ByeBye:
   if (lpGroups != NULL)
     HeapFree(GetProcessHeap(), 0, lpGroups);
   if (ReleaseToken)
     CloseHandle(AccessToken);
- 
+
   return Result;
 }
 

Modified: trunk/reactos/lib/advapi32/winetests/crypt.c
--- trunk/reactos/lib/advapi32/winetests/crypt.c	2005-05-09 01:43:25 UTC (rev 15168)
+++ trunk/reactos/lib/advapi32/winetests/crypt.c	2005-05-09 01:43:41 UTC (rev 15169)
@@ -108,7 +108,7 @@
 static void init_environment(void)
 {
 	HCRYPTPROV hProv;
-	
+
 	/* Ensure that container "wine_test_keyset" does exist */
 	if (!pCryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0))
 	{
@@ -155,39 +155,39 @@
 	BOOL result;
 	HCRYPTPROV hProv;
 
-	/* Provoke all kinds of error conditions (which are easy to provoke). 
+	/* Provoke all kinds of error conditions (which are easy to provoke).
 	 * The order of the error tests seems to match Windows XP's rsaenh.dll CSP,
 	 * but since this is likely to change between CSP versions, we don't check
 	 * this. Please don't change the order of tests. */
 	result = pCryptAcquireContextA(&hProv, NULL, NULL, 0, 0);
 	ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%ld\n", GetLastError());
-	
+
 	result = pCryptAcquireContextA(&hProv, NULL, NULL, 1000, 0);
 	ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%ld\n", GetLastError());
 
 	result = pCryptAcquireContextA(&hProv, NULL, NULL, NON_DEF_PROV_TYPE, 0);
 	ok(!result && GetLastError()==NTE_PROV_TYPE_NOT_DEF, "%ld\n", GetLastError());
-	
+
 	result = pCryptAcquireContextA(&hProv, szKeySet, szNonExistentProv, PROV_RSA_FULL, 0);
 	ok(!result && GetLastError()==NTE_KEYSET_NOT_DEF, "%ld\n", GetLastError());
 
 	result = pCryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, NON_DEF_PROV_TYPE, 0);
 	ok(!result && GetLastError()==NTE_PROV_TYPE_NO_MATCH, "%ld\n", GetLastError());
-	
+
 	/* This test fails under Win2k SP4:
 	   result = TRUE, GetLastError() == ERROR_INVALID_PARAMETER
 	SetLastError(0xdeadbeef);
 	result = pCryptAcquireContextA(NULL, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0);
 	ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%d/%ld\n", result, GetLastError());
 	*/
-	
+
 	/* Last not least, try to really acquire a context. */
 	hProv = 0;
 	SetLastError(0xdeadbeef);
 	result = pCryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0);
 	ok(result && (GetLastError() == ERROR_ENVVAR_NOT_FOUND || GetLastError() == ERROR_SUCCESS || GetLastError() == ERROR_RING2_STACK_IN_USE || GetLastError() == NTE_FAIL), "%d/%ld\n", result, GetLastError());
 
-	if (hProv) 
+	if (hProv)
 		pCryptReleaseContext(hProv, 0);
 
 	/* Try again, witch an empty ("\0") szProvider parameter */
@@ -196,7 +196,7 @@
 	result = pCryptAcquireContextA(&hProv, szKeySet, "", PROV_RSA_FULL, 0);
 	ok(result && (GetLastError() == ERROR_ENVVAR_NOT_FOUND || GetLastError() == ERROR_SUCCESS  || GetLastError() == ERROR_RING2_STACK_IN_USE || GetLastError() == NTE_FAIL), "%d/%ld\n", result, GetLastError());
 
-	if (hProv) 
+	if (hProv)
 		pCryptReleaseContext(hProv, 0);
 }
 
@@ -209,17 +209,17 @@
     BYTE temp;
     DWORD dwLen, dwTemp;
 
-    /* This is to document incorrect api usage in the 
+    /* This is to document incorrect api usage in the
      * "Uru - Ages beyond Myst Demo" installer as reported by Paul Vriens.
      *
-     * The installer destroys a hash object after having released the context 
-     * with which the hash was created. This is not allowed according to MSDN, 
-     * since CryptReleaseContext destroys all hash and key objects belonging to 
-     * the respective context. However, while wine used to crash, Windows is more 
+     * The installer destroys a hash object after having released the context
+     * with which the hash was created. This is not allowed according to MSDN,
+     * since CryptReleaseContext destroys all hash and key objects belonging to
+     * the respective context. However, while wine used to crash, Windows is more
      * robust here and returns an ERROR_INVALID_PARAMETER code.
      */
-    
-    result = pCryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, 
+
+    result = pCryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv,
                                    PROV_RSA_FULL, CRYPT_NEWKEYSET);
     ok (result, "%08lx\n", GetLastError());
     if (!result) return;
@@ -239,15 +239,15 @@
     result = pCryptDestroyKey(hKey2);
     ok (result, "%ld\n", GetLastError());
 
-    dwTemp = CRYPT_MODE_ECB;    
+    dwTemp = CRYPT_MODE_ECB;
     result = pCryptSetKeyParam(hKey2, KP_MODE, (BYTE*)&dwTemp, sizeof(DWORD));
     ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
-    
-    result = pCryptAcquireContextA(&hProv2, szBadKeySet, NULL, PROV_RSA_FULL, 
+
+    result = pCryptAcquireContextA(&hProv2, szBadKeySet, NULL, PROV_RSA_FULL,
                                    CRYPT_DELETEKEYSET);
     ok (result, "%ld\n", GetLastError());
     if (!result) return;
-    
+
     result = pCryptReleaseContext(hProv, 0);
     ok (result, "%ld\n", GetLastError());
     if (!result) return;
@@ -303,7 +303,7 @@
     dwLen = 1;
     result = pCryptGetProvParam(hProv, 0, &temp, &dwLen, 0);
     ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
-    
+
     result = pCryptGetUserKey(hProv, 0, &hKey2);
     ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
 
@@ -336,37 +336,37 @@
 
     result = pCryptDestroyHash(hHash);
     ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
-    
+
     result = pCryptDestroyKey(hKey);
     ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
 }
 
-static BOOL FindProvRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszProvName, 
+static BOOL FindProvRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszProvName,
 			    DWORD *pcbProvName, DWORD *pdwProvCount)
 {
 	HKEY hKey;
 	HKEY subkey;
 	DWORD size = sizeof(DWORD);
-	
+
 	if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Cryptography\\Defaults\\Provider", &hKey))
 		return FALSE;
-	
-	RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwProvCount, pcbProvName, 
+
+	RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwProvCount, pcbProvName,
 				 NULL, NULL, NULL, NULL, NULL, NULL);
 	(*pcbProvName)++;
-	
+
 	if (!(*pszProvName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, *pcbProvName))))
 		return FALSE;
-	
+
 	RegEnumKeyEx(hKey, dwIndex, *pszProvName, pcbProvName, NULL, NULL, NULL, NULL);
 	(*pcbProvName)++;
 
 	RegOpenKey(hKey, *pszProvName, &subkey);
 	RegQueryValueEx(subkey, "Type", NULL, NULL, (BYTE*)pdwProvType, &size);
-	
+
 	RegCloseKey(subkey);
 	RegCloseKey(hKey);
-	
+
 	return TRUE;
 }
 
@@ -378,7 +378,7 @@
 	DWORD dwType;
 	DWORD provCount;
 	DWORD dwIndex = 0;
-	
+
 	/* actual results */
 	CHAR *provider = NULL;
 	DWORD providerLen;
@@ -387,24 +387,24 @@
 	BOOL result;
 	DWORD notNull = 5;
 	DWORD notZeroFlags = 5;
-	
+
 	if(!pCryptEnumProvidersA)
 	{
 	    trace("skipping CryptEnumProviders tests\n");
 	    return;
 	}
-	
+
 	if (!FindProvRegVals(dwIndex, &dwType, &pszProvName, &cbName, &provCount))
 		return;
-	
+
 	/* check pdwReserved flag for NULL */
 	result = pCryptEnumProvidersA(dwIndex, &notNull, 0, &type, NULL, &providerLen);
 	ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
-	
+
 	/* check dwFlags == 0 */
 	result = pCryptEnumProvidersA(dwIndex, NULL, notZeroFlags, &type, NULL, &providerLen);
 	ok(!result && GetLastError()==NTE_BAD_FLAGS, "%ld\n", GetLastError());
-	
+
 	/* alloc provider to half the size required
 	 * cbName holds the size required */
 	providerLen = cbName / 2;
@@ -417,7 +417,7 @@
 
 	LocalFree(provider);
 
-	/* loop through the providers to get the number of providers 
+	/* loop through the providers to get the number of providers
 	 * after loop ends, count should be provCount + 1 so subtract 1
 	 * to get actual number of providers */
 	count = 0;
@@ -425,48 +425,48 @@
 		;
 	count--;
 	ok(count==provCount, "expected %i, got %i\n", (int)provCount, (int)count);
-	
+
 	/* loop past the actual number of providers to get the error
 	 * ERROR_NO_MORE_ITEMS */
 	for (count = 0; count < provCount + 1; count++)
 		result = pCryptEnumProvidersA(count, NULL, 0, &type, NULL, &providerLen);
-	ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected %i, got %ld\n", 
+	ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected %i, got %ld\n",
 			ERROR_NO_MORE_ITEMS, GetLastError());
-	
+
 	/* check expected versus actual values returned */
 	result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, NULL, &providerLen);
 	ok(result && providerLen==cbName, "expected %i, got %i\n", (int)cbName, (int)providerLen);
 	if (!(provider = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, providerLen))))
 		return;
-		
+
 	result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, provider, &providerLen);
-	ok(result && type==dwType, "expected %ld, got %ld\n", 
+	ok(result && type==dwType, "expected %ld, got %ld\n",
 		dwType, type);
 	ok(result && !strcmp(pszProvName, provider), "expected %s, got %s\n", pszProvName, provider);
-	ok(result && cbName==providerLen, "expected %ld, got %ld\n", 
+	ok(result && cbName==providerLen, "expected %ld, got %ld\n",
 		cbName, providerLen);
 
 	LocalFree(provider);
 }
 
-static BOOL FindProvTypesRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszTypeName, 
+static BOOL FindProvTypesRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszTypeName,
 				 DWORD *pcbTypeName, DWORD *pdwTypeCount)
 {
 	HKEY hKey;
 	HKEY hSubKey;
 	PSTR ch;
-	
+
 	if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Cryptography\\Defaults\\Provider Types", &hKey))
 		return FALSE;
-	
+
 	if (RegQueryInfoKey(hKey, NULL, NULL, NULL, pdwTypeCount, pcbTypeName, NULL,
 			NULL, NULL, NULL, NULL, NULL))
 	    return FALSE;
 	(*pcbTypeName)++;
-	
+
 	if (!(*pszTypeName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, *pcbTypeName))))
 		return FALSE;
-	
+
 	if (RegEnumKeyEx(hKey, dwIndex, *pszTypeName, pcbTypeName, NULL, NULL, NULL, NULL))
 	    return FALSE;
 	(*pcbTypeName)++;
@@ -475,22 +475,22 @@
 	*pdwProvType = *(--ch) - '0';
 	*pdwProvType += (*(--ch) - '0') * 10;
 	*pdwProvType += (*(--ch) - '0') * 100;
-	
+
 	if (RegOpenKey(hKey, *pszTypeName, &hSubKey))
 	    return FALSE;
-	
+
 	if (RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, NULL, pcbTypeName))
             return FALSE;
 
 	if (!(*pszTypeName = ((LPSTR)LocalAlloc(LMEM_ZEROINIT, *pcbTypeName))))
 		return FALSE;
-	
+
 	if (RegQueryValueEx(hSubKey, "TypeName", NULL, NULL, *pszTypeName, pcbTypeName))
 	    return FALSE;
-	
+
 	RegCloseKey(hSubKey);
 	RegCloseKey(hKey);
-	
+
 	return TRUE;
 }
 
@@ -501,7 +501,7 @@
 	LPSTR pszTypeName = NULL;
 	DWORD cbTypeName;
 	DWORD dwTypeCount;
-	
+
 	/* actual values */
 	DWORD index = 0;
 	DWORD provType;
@@ -511,29 +511,29 @@
 	DWORD result;
 	DWORD notNull = 5;
 	DWORD notZeroFlags = 5;
-	
+
 	if(!pCryptEnumProviderTypesA)
 	{
 	    trace("skipping CryptEnumProviderTypes tests\n");
 	    return;
 	}
-	
+
 	if (!FindProvTypesRegVals(index, &dwProvType, &pszTypeName, &cbTypeName, &dwTypeCount))
 	{
 	    trace("could not find provider types in registry, skipping the test\n");
 	    return;
 	}
-	
+
 	/* check pdwReserved for NULL */
 	result = pCryptEnumProviderTypesA(index, &notNull, 0, &provType, typeName, &typeNameSize);
-	ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %ld\n", 
+	ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %ld\n",
 		ERROR_INVALID_PARAMETER, GetLastError());
-	
+
 	/* check dwFlags == zero */
 	result = pCryptEnumProviderTypesA(index, NULL, notZeroFlags, &provType, typeName, &typeNameSize);
 	ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected %i, got %ld\n",
 		ERROR_INVALID_PARAMETER, GetLastError());
-	
+
 	/* alloc provider type to half the size required
 	 * cbTypeName holds the size required */
 	typeNameSize = cbTypeName / 2;
@@ -547,10 +547,10 @@
 	ok(!result && GetLastError()==ERROR_MORE_DATA, "expected 0/ERROR_MORE_DATA, got %d/%08lx\n",
 		result, GetLastError());
 	*/
-	
+
 	LocalFree(typeName);
-	
-	/* loop through the provider types to get the number of provider types 
+
+	/* loop through the provider types to get the number of provider types
 	 * after loop ends, count should be dwTypeCount + 1 so subtract 1
 	 * to get actual number of provider types */
 	typeCount = 0;
[truncated at 1000 lines; 338 more skipped]