Module: wine Branch: master Commit: 3a50b1fea64299f57cfb442a11bdbca398cbe840 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3a50b1fea64299f57cfb442a11...
Author: Juan Lang juan.lang@gmail.com Date: Fri Aug 10 11:21:37 2007 -0700
crypt32: 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_GetBuiltinDecoder(DWORD dwCertEncodingType, 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_GetBuiltinDecoder(DWORD dwCertEncodingType, 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 dwCertEncodingType, LPCSTR lpszStructType, 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 dwCertEncodingType, LPCSTR lpszStructType, *(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 dwCertEncodingType, LPCSTR lpszStructType, 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 dwCertEncodingType, LPCSTR lpszStructType, lpszStructType, &hFunc); } if (pCryptEncodeObject) - { ret = pCryptEncodeObject(dwCertEncodingType, lpszStructType, pvStructInfo, pbEncoded, pcbEncoded); - } else if (pCryptEncodeObjectEx) ret = pCryptEncodeObjectEx(dwCertEncodingType, lpszStructType, pvStructInfo, 0, NULL, pbEncoded, pcbEncoded);