I am connecting to a server via a proxy that requires a client certificate to authenticate. I can easily launch a browser from my script, utilizing an ssh tunnel already established in a browser. When I attempt to open a connection using Microsoft.XMLHTTP
, I receive an error
Security certificate required to access this resource is invalid.
I am looking for one of two solutions:
- utilize a session that is already (manually) established in a browser
- send the client certificate (and PIN) via the script.
The logic that I'm currently using for this function is very simple:
Dim xHttp: Set xHttp = CreateObject("Microsoft.XMLHTTP")
Dim bStrm: Set bStrm = CreateObject("Adodb.Stream")
xHttp.Open "GET", "https://localhost:63619/ap_detail.xml?id=3502", False
xHttp.Send
With bStrm
.Type = 1 '//binary
.Open
.Write xHttp.responseBody
.SaveToFile "C:\xml\3502.xml", 2 '//overwrite
End With