0

I am trying to bypass the message "The certificate authority is invalid or incorrect" for a WinHTTP request. I read that this can be achieved by WINHTTP_OPTION_SECURITY_FLAGS function.

  • How do I set this?
  • More importantly, is this valid for Microsoft JScript?

I have an object handler that catches the certificate message but I want to bypass the certificate message and reprocess the request.

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
Sash Sheen
  • 105
  • 2
  • 14

1 Answers1

0

This helped resolve it

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";
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
Sash Sheen
  • 105
  • 2
  • 14