Author: akhaldi
Date: Tue Apr 22 15:25:04 2014
New Revision: 62885
URL:
http://svn.reactos.org/svn/reactos?rev=62885&view=rev
Log:
[CRYPTNET]
* Sync with Wine 1.7.17.
CORE-8080
Modified:
trunk/reactos/dll/win32/cryptnet/cryptnet_main.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/cryptnet/cryptnet_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptnet/cryptne…
==============================================================================
--- trunk/reactos/dll/win32/cryptnet/cryptnet_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptnet/cryptnet_main.c [iso-8859-1] Tue Apr 22 15:25:04
2014
@@ -466,7 +466,6 @@
blob.pbData = CryptMemAlloc(size.u.LowPart);
if (blob.pbData)
{
- blob.cbData = size.u.LowPart;
ret = ReadFile(hFile, blob.pbData, size.u.LowPart, &blob.cbData,
NULL);
if (ret)
@@ -1427,61 +1426,24 @@
return ret;
}
-typedef BOOL (*get_object_expiration_func)(const void *pvContext,
- FILETIME *expiration);
-
-static BOOL CRYPT_GetExpirationFromCert(const void *pvObject, FILETIME *expiration)
-{
- PCCERT_CONTEXT cert = pvObject;
-
- *expiration = cert->pCertInfo->NotAfter;
- return TRUE;
-}
-
-static BOOL CRYPT_GetExpirationFromCRL(const void *pvObject, FILETIME *expiration)
-{
- PCCRL_CONTEXT cert = pvObject;
-
- *expiration = cert->pCrlInfo->NextUpdate;
- return TRUE;
-}
-
-static BOOL CRYPT_GetExpirationFromCTL(const void *pvObject, FILETIME *expiration)
-{
- PCCTL_CONTEXT cert = pvObject;
-
- *expiration = cert->pCtlInfo->NextUpdate;
- return TRUE;
-}
-
-static BOOL CRYPT_GetExpirationFunction(LPCSTR pszObjectOid,
- get_object_expiration_func *getExpiration)
-{
- BOOL ret;
-
- if (IS_INTOID(pszObjectOid))
- {
- switch (LOWORD(pszObjectOid))
- {
- case LOWORD(CONTEXT_OID_CERTIFICATE):
- *getExpiration = CRYPT_GetExpirationFromCert;
- ret = TRUE;
- break;
- case LOWORD(CONTEXT_OID_CRL):
- *getExpiration = CRYPT_GetExpirationFromCRL;
- ret = TRUE;
- break;
- case LOWORD(CONTEXT_OID_CTL):
- *getExpiration = CRYPT_GetExpirationFromCTL;
- ret = TRUE;
- break;
- default:
- ret = FALSE;
- }
- }
- else
- ret = FALSE;
- return ret;
+static BOOL CRYPT_GetExpiration(const void *object, const char *pszObjectOid, FILETIME
*expiration)
+{
+ if (!IS_INTOID(pszObjectOid))
+ return FALSE;
+
+ switch (LOWORD(pszObjectOid)) {
+ case LOWORD(CONTEXT_OID_CERTIFICATE):
+ *expiration = ((const CERT_CONTEXT*)object)->pCertInfo->NotAfter;
+ return TRUE;
+ case LOWORD(CONTEXT_OID_CRL):
+ *expiration = ((const CRL_CONTEXT*)object)->pCrlInfo->NextUpdate;
+ return TRUE;
+ case LOWORD(CONTEXT_OID_CTL):
+ *expiration = ((const CTL_CONTEXT*)object)->pCtlInfo->NextUpdate;
+ return TRUE;
+ }
+
+ return FALSE;
}
/***********************************************************************
@@ -1514,22 +1476,18 @@
CRYPT_BLOB_ARRAY object = { 0, NULL };
PFN_FREE_ENCODED_OBJECT_FUNC freeObject;
void *freeContext;
+ FILETIME expires;
ret = retrieve(pszURL, pszObjectOid, dwRetrievalFlags, dwTimeout,
&object, &freeObject, &freeContext, hAsyncRetrieve, pCredentials,
pAuxInfo);
if (ret)
{
- get_object_expiration_func getExpiration;
-
ret = create(pszObjectOid, dwRetrievalFlags, &object, ppvObject);
if (ret && !(dwRetrievalFlags & CRYPT_DONT_CACHE_RESULT)
&&
- CRYPT_GetExpirationFunction(pszObjectOid, &getExpiration))
- {
- FILETIME expires;
-
- if (getExpiration(*ppvObject, &expires))
- CRYPT_CacheURL(pszURL, &object, dwRetrievalFlags, expires);
+ CRYPT_GetExpiration(*ppvObject, pszObjectOid, &expires))
+ {
+ CRYPT_CacheURL(pszURL, &object, dwRetrievalFlags, expires);
}
freeObject(pszObjectOid, &object, freeContext);
}
@@ -1814,14 +1772,14 @@
HCERTSTORE *rgCertStore;
HCERTSTORE hCrlStore;
LPFILETIME pftTimeToUse;
-} CERT_REVOCATION_PARA_NO_EXTRA_FIELDS, *PCERT_REVOCATION_PARA_NO_EXTRA_FIELDS;
+} CERT_REVOCATION_PARA_NO_EXTRA_FIELDS;
typedef struct _OLD_CERT_REVOCATION_STATUS {
DWORD cbSize;
DWORD dwIndex;
DWORD dwError;
DWORD dwReason;
-} OLD_CERT_REVOCATION_STATUS, *POLD_CERT_REVOCATION_STATUS;
+} OLD_CERT_REVOCATION_STATUS;
/***********************************************************************
* CertDllVerifyRevocation (CRYPTNET.@)
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] Tue Apr 22 15:25:04 2014
@@ -67,7 +67,7 @@
reactos/dll/win32/crypt32 # Synced to Wine-1.7.17
reactos/dll/win32/cryptdlg # Synced to Wine-1.7.1
reactos/dll/win32/cryptdll # Synced to Wine-1.7.1
-reactos/dll/win32/cryptnet # Synced to Wine-1.7.1
+reactos/dll/win32/cryptnet # Synced to Wine-1.7.17
reactos/dll/win32/cryptui # Synced to Wine-1.7.1
reactos/dll/win32/dbghelp # Synced to Wine-1.7.1
reactos/dll/win32/dciman32 # Synced to Wine-1.7.1