crypt32(5/5): Improve tracing when builtin function isn't available
Juan Lang
juan.lang at gmail.com
Fri Aug 10 16:39:17 CDT 2007
--Juan
-------------- next part --------------
From 55f3300d892666f944a520b94c61f49799ac7b8c Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Fri, 10 Aug 2007 11:21:37 -0700
Subject: [PATCH] Improve tracing when builtin function isn't available
---
dlls/crypt32/decode.c | 11 ++++++-----
dlls/crypt32/encode.c | 4 ++--
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index 7c50b27..f1915d4 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -4050,8 +4050,6 @@ static CryptDecodeObjectExFunc CRYPT_Get
case (WORD)PKCS7_SIGNER_INFO:
decodeFunc = CRYPT_AsnDecodePKCSSignerInfo;
break;
- default:
- FIXME("%d: unimplemented\n", LOWORD(lpszStructType));
}
}
else if (!strcmp(lpszStructType, szOID_CERT_EXTENSIONS))
@@ -4088,9 +4086,6 @@ static CryptDecodeObjectExFunc CRYPT_Get
decodeFunc = CRYPT_AsnDecodeEnhancedKeyUsage;
else if (!strcmp(lpszStructType, szOID_ISSUING_DIST_POINT))
decodeFunc = CRYPT_AsnDecodeIssuingDistPoint;
- else
- TRACE_(crypt)("OID %s not found or unimplemented\n",
- debugstr_a(lpszStructType));
return decodeFunc;
}
@@ -4152,6 +4147,8 @@ BOOL WINAPI CryptDecodeObject(DWORD dwCe
if (!(pCryptDecodeObjectEx = CRYPT_GetBuiltinDecoder(dwCertEncodingType,
lpszStructType)))
{
+ TRACE_(crypt)("OID %s not found or unimplemented, looking for DLL\n",
+ debugstr_a(lpszStructType));
pCryptDecodeObject = CRYPT_LoadDecoderFunc(dwCertEncodingType,
lpszStructType, &hFunc);
if (!pCryptDecodeObject)
@@ -4204,8 +4201,12 @@ BOOL WINAPI CryptDecodeObjectEx(DWORD dw
*(BYTE **)pvStructInfo = NULL;
decodeFunc = CRYPT_GetBuiltinDecoder(dwCertEncodingType, lpszStructType);
if (!decodeFunc)
+ {
+ TRACE_(crypt)("OID %s not found or unimplemented, looking for DLL\n",
+ debugstr_a(lpszStructType));
decodeFunc = CRYPT_LoadDecoderExFunc(dwCertEncodingType, lpszStructType,
&hFunc);
+ }
if (decodeFunc)
ret = decodeFunc(dwCertEncodingType, lpszStructType, pbEncoded,
cbEncoded, dwFlags, pDecodePara, pvStructInfo, pcbStructInfo);
diff --git a/dlls/crypt32/encode.c b/dlls/crypt32/encode.c
index 4dd8c99..be724d0 100644
--- a/dlls/crypt32/encode.c
+++ b/dlls/crypt32/encode.c
@@ -3493,6 +3493,8 @@ BOOL WINAPI CryptEncodeObject(DWORD dwCe
if (!(pCryptEncodeObjectEx = CRYPT_GetBuiltinEncoder(dwCertEncodingType,
lpszStructType)))
{
+ TRACE_(crypt)("OID %s not found or unimplemented, looking for DLL\n",
+ debugstr_a(lpszStructType));
pCryptEncodeObject = CRYPT_LoadEncoderFunc(dwCertEncodingType,
lpszStructType, &hFunc);
if (!pCryptEncodeObject)
@@ -3500,10 +3502,8 @@ BOOL WINAPI CryptEncodeObject(DWORD dwCe
lpszStructType, &hFunc);
}
if (pCryptEncodeObject)
- {
ret = pCryptEncodeObject(dwCertEncodingType, lpszStructType,
pvStructInfo, pbEncoded, pcbEncoded);
- }
else if (pCryptEncodeObjectEx)
ret = pCryptEncodeObjectEx(dwCertEncodingType, lpszStructType,
pvStructInfo, 0, NULL, pbEncoded, pcbEncoded);
--
1.4.1
More information about the wine-patches
mailing list