Revert to Wine code to facilitate future syncs. Thanks to Thomas for
making
this possible.
Modified: trunk/reactos/lib/crypt32/cert.c
Deleted: trunk/reactos/lib/crypt32/crypt32.def
Modified: trunk/reactos/lib/crypt32/crypt32.xml
Modified: trunk/reactos/lib/crypt32/encode.c
Modified: trunk/reactos/lib/crypt32/main.c
Deleted: trunk/reactos/lib/crypt32/precomp.h
Modified: trunk/reactos/lib/crypt32/protectdata.c
_____
Modified: trunk/reactos/lib/crypt32/cert.c
--- trunk/reactos/lib/crypt32/cert.c 2005-11-20 15:27:07 UTC (rev
19372)
+++ trunk/reactos/lib/crypt32/cert.c 2005-11-20 15:43:38 UTC (rev
19373)
@@ -1,6 +1,5 @@
/*
- * Copyright 2002
- Mike McCormack for CodeWeavers
+ * Copyright 2002 Mike McCormack for CodeWeavers
* Copyright 2004,2005 Juan Lang
*
* This library is free software; you can redistribute it and/or
@@ -28,18 +27,20 @@
* registering and enumerating physical stores and locations.)
* - Many flags, options and whatnot are unimplemented.
*/
+#include <assert.h>
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winnls.h"
+#include "winreg.h"
+#include "winuser.h"
+#include "wincrypt.h"
+#include "wine/debug.h"
+#include "wine/list.h"
+#include "excpt.h"
+#include "wine/exception.h"
+#include "crypt32_private.h"
-#include "precomp.h"
-
-#define NONAMELESSUNION
-
-static _SEH_FILTER(page_fault)
-{
- if (_SEH_GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
- return _SEH_EXECUTE_HANDLER;
- return _SEH_CONTINUE_SEARCH;
-}
-
WINE_DEFAULT_DEBUG_CHANNEL(crypt);
#define WINE_CRYPTCERTSTORE_MAGIC 0x74726563
@@ -313,14 +314,12 @@
DWORD cbElement, DWORD dwContextTypeFlags, DWORD *pdwContentType);
/* filter for page-fault exceptions */
-/*
static WINE_EXCEPTION_FILTER(page_fault)
{
if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
-*/
static void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, HCRYPTPROV
hCryptProv,
DWORD dwFlags, CertStoreType type)
@@ -341,7 +340,6 @@
* be a PWINE_CERT_CONTEXT, and increments pCertContext's reference
count.
* Also sets the hCertStore member of the reference to store.
*/
-
static void CRYPT_InitCertRef(PWINE_CERT_CONTEXT_REF ref,
PWINE_CERT_CONTEXT context, HCERTSTORE store)
{
@@ -2664,7 +2662,7 @@
return NULL;
}
- _SEH_TRY
+ __TRY
{
const WINE_CONTEXT_INTERFACE *contextInterface = NULL;
const WINE_CERT_PROP_HEADER *hdr = NULL;
@@ -2821,12 +2819,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
context = NULL;
}
- _SEH_END
+ __ENDTRY
return context;
}
@@ -3313,15 +3311,6 @@
return ret;
}
-BOOL WINAPI CryptEncryptMessage( PCRYPT_ENCRYPT_MESSAGE_PARA
pEncryptMessagePara,
- DWORD dwCert, PCCERT_CONTEXT
pccertCert[],
- const BYTE* pbEncrypted, DWORD
dwEncrypted,
- BYTE* pbBlob, DWORD* dwEncryptedBlob)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
DWORD dwFlags)
{
FIXME("stub: %s %lx\n", debugstr_a(pszFuncName), dwFlags);
@@ -3334,42 +3323,3 @@
FIXME("stub: %lx %s %s\n", dwEncodingType, debugstr_a(pszFuncName),
debugstr_w(pwszDll));
return FALSE;
}
-
-DWORD WINAPI CertGetNameStringW(PCCERT_CONTEXT pCertContext,
- DWORD dwType, DWORD dwFlags,
- LPVOID pvType, LPWSTR pszName,
- DWORD dwName)
-{
- UNIMPLEMENTED;
- return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-DWORD WINAPI CertGetNameStringA(PCCERT_CONTEXT pCertContext,
- DWORD dwType, DWORD dwFlags,
- LPVOID pvType, LPSTR pszName,
- DWORD dwName)
-{
- UNIMPLEMENTED;
- return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-
-DWORD WINAPI CertNameToStrA(DWORD dwCertEncoding,
- PCERT_NAME_BLOB pCertName,
- DWORD dwType, LPSTR psz,
- DWORD dwSZ)
-{
- UNIMPLEMENTED;
- return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-DWORD WINAPI CertNameToStrW(DWORD dwCertEncoding,
- PCERT_NAME_BLOB pCertName,
- DWORD dwType, LPWSTR psz,
- DWORD dwSZ)
-{
- UNIMPLEMENTED;
- return ERROR_CALL_NOT_IMPLEMENTED;
-}
-
-
_____
Deleted: trunk/reactos/lib/crypt32/crypt32.def
--- trunk/reactos/lib/crypt32/crypt32.def 2005-11-20 15:27:07 UTC
(rev 19372)
+++ trunk/reactos/lib/crypt32/crypt32.def 2005-11-20 15:43:38 UTC
(rev 19373)
@@ -1,105 +0,0 @@
-LIBRARY CRYPT32.DLL
-EXPORTS
-
-CertAddEncodedCRLToStore@24 @1022
-
-CertAddSerializedElementToStore@32 @1028
-CertAddStoreToCollection@16 @1029
-CertAlgIdToOID@4 @1030
-CertCloseStore@8 @1031
-
-CertDeleteCRLFromStore@4 @1044
-
-CertDeleteCertificateFromStore@4 @1046
-
-CertFindAttribute@12 @1062
-
-CertFindCertificateInStore@24 @1066
-
-CertFindExtension@12 @1068
-CertFindRDNAttr@8 @1069
-
-CertFreeCRLContext@4 @1072
-CertFreeCTLContext@4 @1073
-
-CertFreeCertificateContext@4 @1076
-
-CertGetCTLContextProperty@16 @1079
-
-CertGetCertificateContextProperty@16 @1081
-
-CertGetNameStringA@24 @1085
-CertGetNameStringW@24 @1086
-
-CertNameToStrA@20 @1093
-CertNameToStrW@20 @1094
-CertOIDToAlgId@4 @1095
-
-CertOpenSystemStoreA@8 @1097
-CertOpenSystemStoreW@8 @1098
-
-CertRemoveStoreFromCollection@8 @1104
-
-CertSerializeCTLStoreElement@16 @1108
-CertSerializeCertificateStoreElement@16 @1109
-
-CertSetCTLContextProperty@16 @1111
-CertSetCertificateContextProperty@16 @1113
-
-CertVerifyTimeValidity@8 @1126
-
-CryptDecodeObjectEx@32 @1138
-
-CryptEncodeObject@20 @1141
-
-CryptEncryptMessage@28 @1143
-
-CryptExportPublicKeyInfo@20 @1149
-CryptExportPublicKeyInfoEx@32 @1150
-
-CryptGetOIDFunctionValue@28 @1163
-CryptHashCertificate@28 @1164
-
-CryptImportPublicKeyInfo@16 @1169
-CryptImportPublicKeyInfoEx@28 @1170
-
-CryptMemAlloc@4 @1175
-CryptMemFree@4 @1176
-CryptMemRealloc@8 @1177
-
-CryptProtectData@28 @1193
-
-CryptRegisterDefaultOIDFunction@16 @1195
-CryptRegisterOIDFunction@20 @1196
-
-CryptSIPAddProvider@4 @1198
-
-CryptSIPLoad@12 @1201
-CryptSIPRemoveProvider@4 @1203
-
-CryptSIPRetrieveSubjectGuid@12 @1205
-
-CryptSetOIDFunctionValue@28 @1210
-
-CryptSignCertificate@36 @1214
-
-CryptUnprotectData@28 @1221
-
-CryptUnregisterOIDFunction@12 @1223
-
-CryptVerifyCertificateSignature@20
-CryptVerifyCertificateSignatureEx@32 @1226
-
-I_CryptCreateLruCache@8 @1240
-
-I_CryptDetachTls@4 @1242
-
-I_CryptFindLruEntryData@4 @1247
-
-I_CryptFlushLruCache@4 @1249
-I_CryptFreeLruCache@4 @1250
-I_CryptFreeTls@8 @1251
-
-I_CryptGetTls@4 @1260
-
-I_CryptSetTls@8 @1268
\ No newline at end of file
_____
Modified: trunk/reactos/lib/crypt32/crypt32.xml
--- trunk/reactos/lib/crypt32/crypt32.xml 2005-11-20 15:27:07 UTC
(rev 19372)
+++ trunk/reactos/lib/crypt32/crypt32.xml 2005-11-20 15:43:38 UTC
(rev 19373)
@@ -1,9 +1,9 @@
<module name="crypt32" type="win32dll"
baseaddress="${BASEADDRESS_CRYPT32}" installbase="system32"
installname="crypt32.dll">
- <importlibrary definition="crypt32.def" />
+ <importlibrary definition="crypt32.spec.def" />
<include base="crypt32">.</include>
+ <include base="ReactOS">include/wine</include>
<define name="__USE_W32API" />
<define name="_WIN32_WINNT">0x501</define>
- <library>pseh</library>
<library>ntdll</library>
<library>kernel32</library>
<library>wine</library>
@@ -13,5 +13,5 @@
<file>cert.c</file>
<file>protectdata.c</file>
<file>crypt32.rc</file>
- <pch>precomp.h</pch>
+ <file>crypt32.spec</file>
</module>
_____
Modified: trunk/reactos/lib/crypt32/encode.c
--- trunk/reactos/lib/crypt32/encode.c 2005-11-20 15:27:07 UTC (rev
19372)
+++ trunk/reactos/lib/crypt32/encode.c 2005-11-20 15:43:38 UTC (rev
19373)
@@ -31,15 +31,21 @@
* MSDN, especially:
*
http://msdn.microsoft.com/library/en-us/seccrypto/security/constants_for
_cryptencodeobject_and_cryptdecodeobject.asp
*/
+#include <assert.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
-#include "precomp.h"
+#define NONAMELESSUNION
-static _SEH_FILTER(page_fault)
-{
- if (_SEH_GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
- return _SEH_EXECUTE_HANDLER;
- return _SEH_CONTINUE_SEARCH;
-}
+#include "windef.h"
+#include "winbase.h"
+#include "excpt.h"
+#include "wincrypt.h"
+#include "winreg.h"
+#include "snmp.h"
+#include "wine/debug.h"
+#include "wine/exception.h"
/* This is a bit arbitrary, but to set some limit: */
#define MAX_ENCODED_LEN 0x02000000
@@ -47,7 +53,6 @@
/* a few asn.1 tags we need */
#define ASN_BOOL (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x01)
#define ASN_BITSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x03)
-//#define ASN_OCTETSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x04)
#define ASN_ENUMERATED (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x0a)
#define ASN_SETOF (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x11)
#define ASN_NUMERICSTRING (ASN_UNIVERSAL | ASN_PRIMITIVE | 0x12)
@@ -168,6 +173,14 @@
DWORD cbEncoded, DWORD dwFlags, PCRYPT_DECODE_PARA pDecodePara,
void *pvStructInfo, DWORD *pcbStructInfo);
+/* filter for page-fault exceptions */
+static WINE_EXCEPTION_FILTER(page_fault)
+{
+ if (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION)
+ return EXCEPTION_EXECUTE_HANDLER;
+ return EXCEPTION_CONTINUE_SEARCH;
+}
+
static char *CRYPT_GetKeyName(DWORD dwEncodingType, LPCSTR pszFuncName,
LPCSTR pszOID)
{
@@ -716,7 +729,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const CERT_PUBLIC_KEY_INFO *info =
(const CERT_PUBLIC_KEY_INFO *)pvStructInfo;
@@ -731,12 +744,12 @@
sizeof(items) / sizeof(items[0]), dwFlags, pEncodePara,
pbEncoded,
pcbEncoded);
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -746,7 +759,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const CERT_SIGNED_CONTENT_INFO *info =
(const CERT_SIGNED_CONTENT_INFO *)pvStructInfo;
@@ -762,12 +775,12 @@
sizeof(items) / sizeof(items[0]), dwFlags, pEncodePara,
pbEncoded,
pcbEncoded);
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -781,7 +794,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const CERT_INFO *info = (const CERT_INFO *)pvStructInfo;
struct AsnEncodeSequenceItem items[10] = {
@@ -831,12 +844,12 @@
ret = CRYPT_AsnEncodeSequence(dwCertEncodingType, items, cItem,
dwFlags, pEncodePara, pbEncoded, pcbEncoded);
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -941,7 +954,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const CRL_INFO *info = (const CRL_INFO *)pvStructInfo;
struct AsnEncodeSequenceItem items[7] = {
@@ -975,12 +988,12 @@
ret = CRYPT_AsnEncodeSequence(dwCertEncodingType, items, cItem,
dwFlags, pEncodePara, pbEncoded, pcbEncoded);
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -1019,7 +1032,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
DWORD bytesNeeded, dataLen, lenBytes, i;
const CERT_EXTENSIONS *exts = (const CERT_EXTENSIONS
*)pvStructInfo;
@@ -1059,12 +1072,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -1308,7 +1321,7 @@
BOOL ret;
CRYPT_DER_BLOB *blobs = NULL;
- _SEH_TRY
+ __TRY
{
DWORD bytesNeeded = 0, lenBytes, i;
@@ -1376,12 +1389,12 @@
CryptMemFree(blobs[i].pbData);
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
return FALSE;
}
- _SEH_END
+ __ENDTRY
CryptMemFree(blobs);
return ret;
}
@@ -1392,7 +1405,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const CERT_NAME_INFO *info = (const CERT_NAME_INFO
*)pvStructInfo;
DWORD bytesNeeded = 0, lenBytes, size, i;
@@ -1438,12 +1451,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -1490,15 +1503,15 @@
case CERT_ALT_NAME_RFC822_NAME:
case CERT_ALT_NAME_DNS_NAME:
case CERT_ALT_NAME_URL:
- if (entry->pwszURL)
+ if (entry->u.pwszURL)
{
DWORD i;
/* Not + 1: don't encode the NULL-terminator */
- dataLen = lstrlenW(entry->pwszURL);
+ dataLen = lstrlenW(entry->u.pwszURL);
for (i = 0; ret && i < dataLen; i++)
{
- if (entry->pwszURL[i] > 0x7f)
+ if (entry->u.pwszURL[i] > 0x7f)
{
SetLastError(CRYPT_E_INVALID_IA5_STRING);
ret = FALSE;
@@ -1510,7 +1523,7 @@
dataLen = 0;
break;
case CERT_ALT_NAME_IP_ADDRESS:
- dataLen = entry->IPAddress.cbData;
+ dataLen = entry->u.IPAddress.cbData;
break;
case CERT_ALT_NAME_REGISTERED_ID:
/* FIXME: encode OID */
@@ -1550,11 +1563,11 @@
DWORD i;
for (i = 0; i < dataLen; i++)
- *pbEncoded++ = (BYTE)entry->pwszURL[i];
+ *pbEncoded++ = (BYTE)entry->u.pwszURL[i];
break;
}
case CERT_ALT_NAME_IP_ADDRESS:
- memcpy(pbEncoded, entry->IPAddress.pbData, dataLen);
+ memcpy(pbEncoded, entry->u.IPAddress.pbData, dataLen);
break;
}
if (ret)
@@ -1571,7 +1584,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const CERT_ALT_NAME_INFO *info =
(const CERT_ALT_NAME_INFO *)pvStructInfo;
@@ -1635,12 +1648,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -1650,7 +1663,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const CERT_BASIC_CONSTRAINTS2_INFO *info =
(const CERT_BASIC_CONSTRAINTS2_INFO *)pvStructInfo;
@@ -1672,12 +1685,12 @@
ret = CRYPT_AsnEncodeSequence(dwCertEncodingType, items, cItem,
dwFlags, pEncodePara, pbEncoded, pcbEncoded);
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -1687,7 +1700,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const BLOBHEADER *hdr =
(const BLOBHEADER *)pvStructInfo;
@@ -1713,12 +1726,12 @@
pcbEncoded);
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -1728,7 +1741,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const CRYPT_DATA_BLOB *blob = (const CRYPT_DATA_BLOB
*)pvStructInfo;
DWORD bytesNeeded, lenBytes;
@@ -1758,12 +1771,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
TRACE("returning %d (%08lx)\n", ret, GetLastError());
return ret;
}
@@ -1774,7 +1787,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const CRYPT_BIT_BLOB *blob = (const CRYPT_BIT_BLOB
*)pvStructInfo;
DWORD bytesNeeded, lenBytes, dataBytes;
@@ -1829,12 +1842,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -1844,7 +1857,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
const CRYPT_BIT_BLOB *blob = (const CRYPT_BIT_BLOB
*)pvStructInfo;
CRYPT_BIT_BLOB newBlob = { blob->cbData, NULL,
blob->cUnusedBits };
@@ -1868,12 +1881,12 @@
&newBlob, dwFlags, pEncodePara, pbEncoded, pcbEncoded);
CryptMemFree(newBlob.pbData);
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -1893,7 +1906,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
DWORD significantBytes, lenBytes;
BYTE padByte = 0, bytesNeeded;
@@ -1967,12 +1980,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -1982,7 +1995,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
DWORD significantBytes, lenBytes;
BYTE bytesNeeded;
@@ -2038,12 +2051,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -2074,7 +2087,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
SYSTEMTIME sysTime;
/* sorry, magic number: enough for tag, len, YYMMDDHHMMSSZ\0.
I use a
@@ -2117,12 +2130,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -2132,7 +2145,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
SYSTEMTIME sysTime;
/* sorry, magic number: enough for tag, len, YYYYMMDDHHMMSSZ\0.
I use a
@@ -2166,12 +2179,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -2181,7 +2194,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
SYSTEMTIME sysTime;
@@ -2196,12 +2209,12 @@
lpszStructType, pvStructInfo, dwFlags, pEncodePara,
pbEncoded,
pcbEncoded);
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -2211,7 +2224,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
DWORD bytesNeeded, dataLen, lenBytes, i;
const CRYPT_SEQUENCE_OF_ANY *seq =
@@ -2245,12 +2258,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -2823,7 +2836,7 @@
TRACE("%p, %ld, %08lx, %p, %p, %ld\n", pbEncoded, cbEncoded,
dwFlags,
pDecodePara, pvStructInfo, *pcbStructInfo);
- _SEH_TRY
+ __TRY
{
struct AsnDecodeSequenceItem items[] = {
{ offsetof(CERT_SIGNED_CONTENT_INFO, ToBeSigned),
@@ -2844,12 +2857,12 @@
sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded,
dwFlags,
pDecodePara, pvStructInfo, pcbStructInfo, NULL);
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -2935,7 +2948,7 @@
TRACE("%p, %ld, %08lx, %p, %p, %ld\n", pbEncoded, cbEncoded,
dwFlags,
pDecodePara, pvStructInfo, *pcbStructInfo);
- _SEH_TRY
+ __TRY
{
struct AsnDecodeSequenceItem items[] = {
{ offsetof(CERT_INFO, dwVersion), CRYPT_AsnDecodeCertVersion,
@@ -2972,12 +2985,12 @@
sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded,
dwFlags,
pDecodePara, pvStructInfo, pcbStructInfo, NULL);
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -3124,7 +3137,7 @@
TRACE("%p, %ld, %08lx, %p, %p, %ld\n", pbEncoded, cbEncoded,
dwFlags,
pDecodePara, pvStructInfo, *pcbStructInfo);
- _SEH_TRY
+ __TRY
{
struct AsnDecodeSequenceItem items[] = {
{ offsetof(CRL_INFO, dwVersion), CRYPT_AsnDecodeCertVersion,
@@ -3152,12 +3165,12 @@
sizeof(items) / sizeof(items[0]), pbEncoded, cbEncoded,
dwFlags,
pDecodePara, pvStructInfo, pcbStructInfo, NULL);
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
TRACE("Returning %d (%08lx)\n", ret, GetLastError());
return ret;
@@ -3323,7 +3336,7 @@
{
BOOL ret = TRUE;
- _SEH_TRY
+ __TRY
{
ret = CRYPT_AsnDecodeExtensionsInternal(dwCertEncodingType,
lpszStructType, pbEncoded, cbEncoded,
@@ -3348,12 +3361,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -3366,7 +3379,7 @@
TRACE("%p, %ld, %08lx, %p, %ld\n", pbEncoded, cbEncoded, dwFlags,
pszObjId,
*pcbObjId);
- _SEH_TRY
+ __TRY
{
if (pbEncoded[0] == ASN_OBJECTIDENTIFIER)
{
@@ -3463,12 +3476,12 @@
ret = FALSE;
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -3481,7 +3494,7 @@
{
BOOL ret = TRUE;
- _SEH_TRY
+ __TRY
{
DWORD dataLen;
@@ -3565,12 +3578,12 @@
}
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
}
- _SEH_END
+ __ENDTRY
return ret;
}
@@ -3582,7 +3595,7 @@
{
BOOL ret;
- _SEH_TRY
+ __TRY
{
if (pbEncoded[0] == (ASN_CONSTRUCTOR | ASN_SEQUENCE))
{
@@ -3694,12 +3707,12 @@
ret = FALSE;
}
}
- _SEH_EXCEPT(page_fault)
+ __EXCEPT(page_fault)
{
SetLastError(STATUS_ACCESS_VIOLATION);
ret = FALSE;
[truncated at 1000 lines; 626 more skipped]