cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Using getXML() with HTTPS site using self-signed certificate

billtra
Newbie

Using getXML() with HTTPS site using self-signed certificate

Hi. I'm trying to create a service which calls getXML() to access a remote API over HTTPS, which is enabled using a self-signed certificate. When I test it, I only get a PKIX error that it cannot validate the certificate. I have tried setting the ignoreSSLErrors flag, but it still errors out. Here is the service's script:

var params = {

ignoreSSLErrors: 1 /* BOOLEAN /,</div></div><div><div>    url: "https://server:81?API=GET_SERVER_LIST&XML=1" / STRING */

};

// Load page

var xmlPage = Resources["ContentLoaderFunctions"].GetXML(params);

Thanks,

Bill Tranmer

7 REPLIES 7

Using getXML() with HTTPS site using self-signed certificate

Hi Bill,

Is there a reason you are using 1 in place of true for the boolean value? I suggest specifying true of false for Boolean values.


Thanks,

Saeed



Using getXML() with HTTPS site using self-signed certificate

Hi Saeed,

Thanks for your comment. I was testing various things just to try to affect a change in the response. Setting to "true" also does not work.


Thanks,

Bill



Using getXML() with HTTPS site using self-signed certificate

Hi Bill,

I'd like to get a little more information. If you enter the url directly into a browser, are you able to see the content after confirming the prompt to accept the certificate?


Thanks,
Saeed



Re: Using getXML() with HTTPS site using self-signed certificate

Hi all,

I've got the same issue. 

The ignoreSSLErrors = true does not work.

Still have the error :

Wrapped javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Cause: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Does someone know how i can fix it ?

Re: Using getXML() with HTTPS site using self-signed certificate

Just to be sure, does the ignoreSSLErrors parameter (set to True) avoid the installation of the certificate on my jdk ?

Re: Using getXML() with HTTPS site using self-signed certificate

hi all,

          this same issue i am facing can anyone help me out in this "SSLHandshakeException"error.

Wrapped javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Cause: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Re: Using getXML() with HTTPS site using self-signed certificate

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.