Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub TestCert()
- Dim myHTTP as New ServerXMLHTTP60
- Dim myURL as String
- ' Open the connection to the secure server
- myHTTP.Open "GET", "https://server/finalpath", False
- ' Attempt to set the correct client certificate
- ' I have also tried just the friendly name as well as
- ' LOCAL_MACHINEMycert friendly name'
- myHTTP.SetOption 3, "CURRENT_USERMycert friendly name"
- ' Send request fails with "A certificate is required ..."
- myHTTP.Send
- End Sub
- Dim apiConnection As New WinHttp.WinHttpRequest
- ' Set the authentication settings
- apiConnection.SetClientCertificate "mycert"
- apiConnection.Open "Get", "https://localhost:8443", False
- apiConnection.Send
Add Comment
Please, Sign In to add comment