The CreatorCon Call for Content is officially open! Get started here.

Help on REST with Error:: org.apache.commons.httpclient.HttpException: SSLPeerUnverifiedException

dundi
Kilo Contributor

Hi

I'm using POST method and I need to get 200 response and a json data. But I facing the following issue

Selection_067.png

It is working fine in other instance when the same headers with no authentication are given.

Thanks in advance

Regards

Dundi Vinayak

chirag.bagdaictomasijoshnerius

1 ACCEPTED SOLUTION

Sami S_
ServiceNow Employee
ServiceNow Employee

Hi Dundi,



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



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



Hope it will solve your issue


View solution in original post

15 REPLIES 15

I'm not clear on that end!! I'm using jakartha version


You are making a POST from your servicenow instance to another endpoint. As if i understood well you are doing an Outbound REST call. On the machine where the endpoint is hosted, what java version do you have? Does it support TLS 1.2?


Java version is 1.8


Chuck Tomasi
Tera Patron

Is you trying to communicate with a system that uses a self-signed key? This may help?


java - HttpGet with HTTPS : SSLPeerUnverifiedException - Stack Overflow


Sami S_
ServiceNow Employee
ServiceNow Employee

Hi Dundi,



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



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



Hope it will solve your issue