Thursday, February 9, 2006


How to ignore invalid SSL certificates with MSXML

I frequently use VBScript and MSXML for troubleshooting web sites as I can control all the HTTP headers and easily log the returned results without launching a network sniffer. I had a problem earlier with a web site that returned an expired, and therefore, invalid certificate. In Internet Explorer you get a popup dialog where you can tell the browser to ignore the error but MSXML refused to execute my request and returned this error:

msxml4.dll: The date in the certificate is invalid or has expired

The fix is to tell MSXML to ignore errors like this:

Dim oXMLRequest

Set oXMLRequest = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0");

Updated: Added error message

No comments:

Post a Comment