Juan Lang : crypt32: Check registered CryptFormatObject functions before using default hex format .
Module: wine Branch: master Commit: 57fde4e8a2c32992bb66a6cfcc28cc9db9c1972a URL: http://source.winehq.org/git/wine.git/?a=commit;h=57fde4e8a2c32992bb66a6cfcc... Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Nov 20 09:32:57 2008 -0800 crypt32: Check registered CryptFormatObject functions before using default hex format. --- dlls/crypt32/object.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/object.c b/dlls/crypt32/object.c index bd3ad11..e09ca03 100644 --- a/dlls/crypt32/object.c +++ b/dlls/crypt32/object.c @@ -2337,8 +2337,6 @@ static CryptFormatObjectFunc CRYPT_GetBuiltinFormatFunction(DWORD encodingType, format = CRYPT_FormatNetscapeCertType; else if (!strcmp(lpszStructType, SPC_FINANCIAL_CRITERIA_OBJID)) format = CRYPT_FormatSpcFinancialCriteria; - if (!format && !(formatStrType & CRYPT_FORMAT_STR_NO_HEX)) - format = CRYPT_FormatHexString; return format; } @@ -2364,6 +2362,9 @@ BOOL WINAPI CryptFormatObject(DWORD dwCertEncodingType, DWORD dwFormatType, CryptGetOIDFunctionAddress(set, dwCertEncodingType, lpszStructType, 0, (void **)&format, &hFunc); } + if (!format && (dwCertEncodingType & CERT_ENCODING_TYPE_MASK) == + X509_ASN_ENCODING && !(dwFormatStrType & CRYPT_FORMAT_STR_NO_HEX)) + format = CRYPT_FormatHexString; if (format) ret = format(dwCertEncodingType, dwFormatType, dwFormatStrType, pFormatStruct, lpszStructType, pbEncoded, cbEncoded, pbFormat,
participants (1)
-
Alexandre Julliard