Outbount rest api got ssl error

Nicol_
Giga Contributor

Hi!
I'm creating a ServiceNow application having the purpose to get some data via api from another platform and push that data inside tables.
Created the rest api message like this:
find_real_file.png

got this ssl error:

find_real_file.png

even if I've added the machine certificate to the SystemDefinitiion -> Certificate

find_real_file.png

Any idea what I'm doing wrong?

Thanks

1 ACCEPTED SOLUTION

Hi

You have to set below property false because the HTTPClient to not make the hostname verification against the ssl certificate provided.

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

 

Thanks

Himanshu

View solution in original post

16 REPLIES 16

Sudhanshu Talw1
Tera Guru

Hi,

The reason the error is occurring is because the SSL certificate of the target you’re connecting to isn’t considered valid by your Java instance’s keystore. This may be because the certificate itself is invalid

 

Follow the link:

https://davidjb.com/blog/2012/02/java-http-request-fails-with-javax-net-ssl-sslpeerunverifiedexcepti...

 

Thanks

Sudhanshu

Hi Sudhanshu and thank you for the quick reply 🙂
Yes, I'm trying to communicate with a service with a self signed certificate. I though that adding the certificate in ServiceNow was enough to validate it.

Hi Nicolo,

Means according to you certificate is valid.

Right?

 

Thanks

Sudhanshu

It is auto-generated certificate but is valid.