我正在尝试绕过消息“证书颁发机构无效或不正确”以获取WinHTTP请求。我读到这可以通过WINHTTP_OPTION_SECURITY_FLAGS函数来实现。
我有一个捕获证书消息的对象处理程序,但我想绕过证书消息并重新处理请求。
答案 0 :(得分:0)
这有助于解决它
WinHttpRequestOption_UserAgentString = 0;
WinHttpRequestOption_SslErrorIgnoreFlags = 4;
WinHttpRequestOption_EnableRedirects = 6;
WinHttpRequestOption_EnableHttpsToHttpRedirects = 12;
SslErrorFlag_Ignore_All = 0x00003300;
WinHttpReq.Option(WinHttpRequestOption_UserAgentString) = "http_requester/0.1";
WinHttpReq.Option(WinHttpRequestOption_SslErrorIgnoreFlags) = SslErrorFlag_Ignore_All ;
WinHttpReq.Option(WinHttpRequestOption_EnableRedirects) = "True";
WinHttpReq.Option(WinHttpRequestOption_EnableHttpsToHttpRedirects) = "True";