Author: dreimer
Date: Fri May 9 12:45:46 2008
New Revision: 33399
URL:
http://svn.reactos.org/svn/reactos?rev=33399&view=rev
Log:
Well... I forgot to revert some files... sry
Modified:
trunk/reactos/dll/win32/crypt32/context.c
trunk/reactos/dll/win32/crypt32/crl.c
Modified: trunk/reactos/dll/win32/crypt32/context.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/context.…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/context.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/context.c [iso-8859-1] Fri May 9 12:45:46 2008
@@ -71,7 +71,6 @@
ret = NULL;
}
}
- TRACE("returning %p\n", ret);
return ret;
}
@@ -97,7 +96,6 @@
InterlockedIncrement(&linkedBase->ref);
TRACE("%p's ref count is %d\n", context, linkContext->ref);
}
- TRACE("returning %p\n", context);
return context;
}
@@ -125,7 +123,7 @@
contextSize);
}
-PCONTEXT_PROPERTY_LIST Context_GetProperties(const void *context, size_t contextSize)
+PCONTEXT_PROPERTY_LIST Context_GetProperties(void *context, size_t contextSize)
{
PBASE_CONTEXT ptr = BASE_CONTEXT_FROM_CONTEXT(context, contextSize);
@@ -244,7 +242,7 @@
list->contextInterface->free(toReplace);
}
else
- list_add_head(&list->contexts, entry);
+ list_add_tail(&list->contexts, entry);
LeaveCriticalSection(&list->cs);
}
return context;
Modified: trunk/reactos/dll/win32/crypt32/crl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crl.c?re…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/crl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/crl.c [iso-8859-1] Fri May 9 12:45:46 2008
@@ -266,10 +266,10 @@
return ret;
}
-static BOOL CRLContext_SetProperty(PCCRL_CONTEXT context, DWORD dwPropId,
- DWORD dwFlags, const void *pvData);
-
-static BOOL CRLContext_GetHashProp(PCCRL_CONTEXT context, DWORD dwPropId,
+static BOOL WINAPI CRLContext_SetProperty(void *context, DWORD dwPropId,
+ DWORD dwFlags, const void *pvData);
+
+static BOOL CRLContext_GetHashProp(void *context, DWORD dwPropId,
ALG_ID algID, const BYTE *toHash, DWORD toHashLen, void *pvData,
DWORD *pcbData)
{
@@ -284,9 +284,10 @@
return ret;
}
-static BOOL CRLContext_GetProperty(PCCRL_CONTEXT context, DWORD dwPropId,
- void *pvData, DWORD *pcbData)
-{
+static BOOL WINAPI CRLContext_GetProperty(void *context, DWORD dwPropId,
+ void *pvData, DWORD *pcbData)
+{
+ PCCRL_CONTEXT pCRLContext = (PCCRL_CONTEXT)context;
PCONTEXT_PROPERTY_LIST properties =
Context_GetProperties(context, sizeof(CRL_CONTEXT));
BOOL ret;
@@ -301,17 +302,20 @@
if (ret)
{
if (!pvData)
+ {
*pcbData = blob.cbData;
+ ret = TRUE;
+ }
else if (*pcbData < blob.cbData)
{
SetLastError(ERROR_MORE_DATA);
*pcbData = blob.cbData;
- ret = FALSE;
}
else
{
memcpy(pvData, blob.pbData, blob.cbData);
*pcbData = blob.cbData;
+ ret = TRUE;
}
}
else
@@ -321,12 +325,12 @@
{
case CERT_SHA1_HASH_PROP_ID:
ret = CRLContext_GetHashProp(context, dwPropId, CALG_SHA1,
- context->pbCrlEncoded,
context->cbCrlEncoded, pvData,
+ pCRLContext->pbCrlEncoded, pCRLContext->cbCrlEncoded, pvData,
pcbData);
break;
case CERT_MD5_HASH_PROP_ID:
ret = CRLContext_GetHashProp(context, dwPropId, CALG_MD5,
- context->pbCrlEncoded,
context->cbCrlEncoded, pvData,
+ pCRLContext->pbCrlEncoded, pCRLContext->cbCrlEncoded, pvData,
pcbData);
break;
default:
@@ -367,22 +371,19 @@
}
else
{
- if (pCRLContext->hCertStore)
- ret = CertGetStoreProperty(pCRLContext->hCertStore, dwPropId,
- pvData, pcbData);
- else
- *(DWORD *)pvData = 0;
+ *(DWORD *)pvData =
+ CertStore_GetAccessState(pCRLContext->hCertStore);
ret = TRUE;
}
break;
default:
- ret = CRLContext_GetProperty(pCRLContext, dwPropId, pvData,
+ ret = CRLContext_GetProperty((void *)pCRLContext, dwPropId, pvData,
pcbData);
}
return ret;
}
-static BOOL CRLContext_SetProperty(PCCRL_CONTEXT context, DWORD dwPropId,
+static BOOL WINAPI CRLContext_SetProperty(void *context, DWORD dwPropId,
DWORD dwFlags, const void *pvData)
{
PCONTEXT_PROPERTY_LIST properties =
@@ -459,7 +460,8 @@
SetLastError(E_INVALIDARG);
return FALSE;
}
- ret = CRLContext_SetProperty(pCRLContext, dwPropId, dwFlags, pvData);
+ ret = CRLContext_SetProperty((void *)pCRLContext, dwPropId, dwFlags,
+ pvData);
TRACE("returning %d\n", ret);
return ret;
}
@@ -517,7 +519,10 @@
if (!pTimeToVerify)
{
- GetSystemTimeAsFileTime(&fileTime);
+ SYSTEMTIME sysTime;
+
+ GetSystemTime(&sysTime);
+ SystemTimeToFileTime(&sysTime, &fileTime);
pTimeToVerify = &fileTime;
}
if ((ret = CompareFileTime(pTimeToVerify, &pCrlInfo->ThisUpdate)) >= 0)