I need to make an HTTP request from VBScript to a domain secured with SSL. The library I'm using to do that, ServerXMLHTTP, doesn't seem to be able to connect due to SSL certificate trust failure. This seems strange, as when I browse to the domain in Google Chrome, it reports the whole certificate chain as being trusted.
Setting the "SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS" option on the ServerXMLHTTP object doesn't make any difference.
The "System" log in Windows Event Viewer contains an error with a numeric code that translates to the following, which is consistent with the VBScript error: "TLS1_ALERT_UNKNOWN_CA 48 SEC_E_UNTRUSTED_ROOT 0x80090325"
Although a straight-up solution would obviously be desirable, I would be equally interested to know how I would even begin to troubleshoot a problem like this one without needing to resort to StackOverflow for help.
Here is my script:
Dim http
Set http = CreateObject("Msxml2.ServerXMLHTTP.6.0")
http.Open "GET", "https://us.api.concursolutions.com/"
http.setOption 2, 13056 'sets the option "SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS" to "SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS"
http.Send
WScript.Echo http.responseText
Set http = Nothing
User contributions licensed under CC BY-SA 3.0