How to skip SSL in REST V2

Sivabalan1
Kilo Contributor

Hi,

In ServiceNow integration, how can I skip the SSL verification on RESTMessageV2?

var rm = new sn_ws.RESTMessageV2();
rm.setHttpMethod('post');
rm.setBasicAuth(userName,password);
rm.setEndpoint(url);
var response = rm.execute();

anything I missed to set in the rest message attribute?

1 ACCEPTED SOLUTION

Omkar Mone
Mega Sage

Hi Siva,

You can set the following property to false, this will cause the HTTPClient to not make the hostname verification against the ssl certificate provided.

find_real_file.png

"com.glide.communications.httpclient.verify_hostname"   to false

 

Hope it will solve your issue.

 

Regards

Omkar Mone

2020 Community MVP

View solution in original post

9 REPLIES 9

Tony Chatfield1
Kilo Patron
Hi, integration requirements are going to be dependent on the target platform and it's configuration. Perhaps you could share details of your integration and the issues/errors you are encountering with you current message configuration

Sivabalan1
Kilo Contributor

Hi,

I am trying to to call the external API using RESTMessageV2. But I got the below error message.
Also my external API has self-signed. 

How I can skip / any steps to verify the self-signed ssl verification steps? 

Error Message:
 org.apache.commons.httpclient.HttpException: java.security.cert.CertificateException: No subject alternative DNS name matching XXXX found.


Omkar Mone
Mega Sage

Hi Siva,

You can set the following property to false, this will cause the HTTPClient to not make the hostname verification against the ssl certificate provided.

find_real_file.png

"com.glide.communications.httpclient.verify_hostname"   to false

 

Hope it will solve your issue.

 

Regards

Omkar Mone

2020 Community MVP

Hi, Which menu / path I can access this form?