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

corina
ServiceNow Employee
ServiceNow Employee

Hello Dundi.



Probably it is the Java version on the target server.


dravvyramlochun
ServiceNow Employee
ServiceNow Employee

Hello Dundi,



Do you have any SSL certificate that you have uploaded in the trsut store for this outbounf REST call?



We have Protocol Profile in Rest Message where you can choose a SSL entry. You need to create this SSL entry in Protocol Profile table. Also if you name your protocol profile as xyz then when yo make a Test Rest call you will notice that servicenow place this protocol profile name in front of your rest URL.



Also did you try to do the POST using a 3rd party application like POSTMAN and then see the results.



Reference:


Outbound REST web service with one-way SSL certificate Authentication


Hi Dravvy



Here is my post man response.



find_real_file.png



And background scripts


find_real_file.png




Result


find_real_file.png


Does your target machine/server support TLS 1.2?


What is your Java version on the target machine?