MSXML2.ServerXMLHTTP.6.0 object in VBScript - SSL certificate chain trust problem

0

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

VBScript reports a certificate trust error System error viewed in Event Viewer Chrome is happy with the certificate chain

ssl
https
vbscript
serverxmlhttp
schannel
asked on Stack Overflow Mar 11, 2019 by utterly confuzzled • edited Mar 11, 2019 by utterly confuzzled

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0