http.getPageData to https self-signed certificate

Questions, answers, tips and ideas on Servoy Client

http.getPageData to https self-signed certificate

Postby rafig » Wed Mar 07, 2012 3:49 pm

Hi,
another day, another (stupid?) question from me...
I am now trying to solve my payment processing problem by calling a service someone else has written that is on another PC at my client.
This needs to be secure, as even though it is only on the internal network, I will be sending card data.
The other PC now has a self-signed certificate on it so that requests have to be 'https'.
normally when I use
Code: Select all
var pageData = plugins.http.getPageData ( 'https://www.facebook.com/'  );

I get something back and there is nothing that comes up asking me to approve certificate.
When I try and access the internal PC from my browser at client, it comes up with a warning like
The site's security certificate is not trusted!
You attempted to reach <internal_IP_address>, but the server presented a certificate issued by an entity that is not trusted by your computer's operating system. This may mean that the server has generated its own security credentials, which Google Chrome cannot rely on for identity information, or an attacker may be trying to intercept your communications. You should not proceed, especially if you have never seen this warning before for this site.

from where I can proceed and allow it.
If I try and access the <internal_IP_address> from Servoy by
Code: Select all
var pageData = plugins.http.getPageData ( 'https://<internal_IP_address>/'  );

nothing happens.
I get nothing back and the other developer says that his code that was just going to return a string for testing purposes is not being fired by my call (but does when I do it from web browser).
How can I get Servoy to allow me to access this HTTPS IP address (i.e. ignore that it is a self-signed certificate), or let me save somewhere that that IP address/certificate is valid/OK??
[I am obviously testing from my Mac using developer, but it will be deployed on their internal server, so I need to know how to get it to work in both cases]
I did try looking in the forums for an answer, but couldn't find anything.

Thanks

Rafi

{UPDATE, Patrick just told me what I thought, that my client needs to buy a Certificate...
but if anyone else has any ideas, please reply]
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK

Re: http.getPageData to https self-signed certificate

Postby jcompagner » Wed Apr 18, 2012 4:00 pm

or patch the http plugin yourself:

http://hc.apache.org/httpclient-3.x/sslguide.html

EasySSLProtocolSocketFactory can be used to create SSL connections that allow the target server to authenticate with a self-signed certificate:

http://svn.apache.org/viewvc/httpcompon ... iew=markup
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: http.getPageData to https self-signed certificate

Postby rafig » Wed Apr 18, 2012 4:24 pm

Hi
thanks
We got it working in the end (I think client bought a certificate...)
Servoy Certified Developer
Image
rafig
 
Posts: 704
Joined: Mon Dec 22, 2003 12:58 pm
Location: Watford, UK


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 9 guests