×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Problem with certificate
2

Problem with certificate

Problem with certificate

(OP)
Hello

I do not need the certificate request:

web = "https://..."
XML = CREATEOBJECT("WinHttp.WinHttpRequest.5.1")
TRY
XML.Open("GET", web , .F.)
XML.SetCredentials("user", "pass", 0)
XML.SetRequestHeader("content-type", "application/x-www-form-urlencoded")
XML.Send

CATCH TO oError WHEN .T.
** ERROR

FINALLY
WAIT CLEAR
ENDTRY

It throws the following error in oError.details:
"OLE IDispatch exception code 0 from WinHttp.WinHttpRequest: The certificate authority is invalid or incorrect


With the following code I can access fine, but show me an alert window notifying me that the security certificate is valid and asking me if I want to continue. I need that window does not appear.

web = "https://..."
XML = CreateObject("Microsoft.XMLHTTP")
XML.Open("GET", web, .f.,"user","pass")
try
XML.Send
CATCH TO oError WHEN .T.
** ERROR
FINALLY
WAIT CLEAR
ENDTRY

How do I disable the security certificate?

Thanks

RE: Problem with certificate

I would look into internet settings.

Another thing I notice is using version 5.1, while you would either use 6.0 or 3.0 depending on OS from what I found for answering thread184-1715949: Microsoft.XMLHTTP on Windows 8 Using VFP 9.0 MSXML5 is for office and so rather for Office internal use. Referring to Wikipedia: "Microsoft has not released documentation for this version because Microsoft considers MSXML 5 an internal/integrated component of Office 2003. MSXML 5 is not included in Office 2010.[8]"
So it's obsolete, deprecated, it may not work correctly with certificates anyway.

Bye, Olaf.

RE: Problem with certificate


Try setting xml.setOption(2) = 13056 to ignore ssl errors.

Marco

RE: Problem with certificate

(OP)
I solved the problem as follows:

XML = CreateObject ("MSXML2.ServerXMLHTTP.6.0")

web = "https:// ..."

Xml.Open ("GET", web,.F., "User", "pass")
XML.SetRequestHeader ("content-type", "application/x-www-form-urlencoded")
XML.setOption (2, 13056)
XML.send


thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close