白水绕东城

Zhong's Blog

Http Error 12057 (Bug Fix Note)

产品被报告了一个 Bug, 只发生在特定平台 Windows Server 2003 Standard Edition.

查看 Trace Log 发现 Wininet 调用的封装类 返回 Error 12057, 它的具体错误内容是:

ERROR_WINHTTP_SECURE_CERT_REV_FAILED
12057
Indicates that revocation cannot be checked because the revocation server was offline (equivalent to CRYPT_E_REVOCATION_OFFLINE).
IE->Tools->Internet Options->Advanced Tab->Security Options->”Check for server certificate revocation(Requires Restart)”

DWORD dwFlags = 0;

DWORD dwError = 0;

DWORD dwBuffLen = sizeof(dwFlags);
InternetQueryOption(m_hRequest, INTERNET_OPTION_SECURITY_FLAGS,

(LPVOID)&dwFlags, &dwBuffLen);

dwFlags |= SECURITY_FLAG_IGNORE_REVOCATION;

InternetSetOption(m_hRequest, INTERNET_OPTION_SECURITY_FLAGS, (LPVOID)&dwFlags, sizeof(dwFlags)) ;

阅读更多
个人分类: win32 code
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

Http Error 12057 (Bug Fix Note)

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭