Link to home
Start Free TrialLog in
Avatar of ztheged
ztheged

asked on

XMLHTTP object & SSL certificate issue

Hi
I've got a problem with a function which is used to retrieve a file off a server. The server has SSL encryption, however the certificate is not issues by a "trusted company" - or atleast this is the alert I receive when attempting to manually access the file.

The error I get when trying to execute my script:

msxml3.dll error '80072f0d'

The certificate authority is invalid or incorrect



I've researched the subject and found the XMLHTTP setOption method can override the handling of the certificate issue, but I have not been able to get it working.

The script:

Function GetDBfile( GroupID )

      dim strFcontent
      dim xml, newopt

      set xml= CreateObject("Msxml2.ServerXMLHTTP")
      xml.Open "GET",url,False
      newopt = (xml.getOption(2) - 13056)
      xml.setOption(2) = newopt
      xml.Send
      strFContent = xml.ResponseBody
      xml.Close
      set xml=Nothing

      With CreateObject("ADODB.Stream")
      .Type = 1
      .Open
      .Write strFContent
      .SaveToFile Server.MapPath("files/db/"& GroupID &".txt"),2
      End With
      
      GetDBFile = True

End Function

Any ideas?
Thanks in advance.
Avatar of deighc
deighc

xml.setOption(2) = newopt

should be

xml.setOption 2, newopt
Avatar of ztheged

ASKER

I'm afraid that made no difference. It continues to display

msxml3.dll error '80072f0d'

The certificate authority is invalid or incorrect
ASKER CERTIFIED SOLUTION
Avatar of deighc
deighc

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ztheged

ASKER

Got it fixed. Thanks for the help. Explicitly settings the value did the trick. Based on what I read before, I thought I had the syntax correctly. Seems I still have alot to learn. Thanks for your quick help.