Error when I try to connect to a rest api

Isaac Vicentini
Mega Sage
Mega Sage

Hi experts,

 

When trying to connect with a specific Rest API I'm getting the following return:

Request not sent to uri= https://gxxx-xx.xxx.com.br/xxxx/axxxi/xxxxxx: org.apache.commons.httpclient.HttpException: Session contains no certificates - Untrusted

 

find_real_file.png

The API is working and I only get this error when I try to connect from Servicenow.

NOTE: I AM NOT USING MID SERVER FOR THIS

 

Would anyone know the solution to this?

 

Regards,
Isaac

 

 


Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.

1 ACCEPTED SOLUTION

Saurav11
Kilo Patron
Kilo Patron

Hello,

Please set the property com.glide.communications.httpclient.verify_hostname to false.

You may also lie to look at the below article:-

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0851908

Please rmark answer correct/helpful based on impact.

Thanks.

View solution in original post

12 REPLIES 12

No, it's just a direct request


Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.

I found the answer in a Servicenow docs:

 

"The Now Platform only trusts certificates that it can verify against the JVM certificate store. Self-signed and enterprise-signed certificates are not trusted.

By default, the com.glide.communications.trustmanager_trust_all property is set to false."

 

I performed a test setting the property to true and the API connection worked without errors.

I will analyze if it will be possible to include the certificate in the API as it is the most appropriate at the moment.

 

Reference: Certificate Trust
https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/security/reference/certificate-trust.html


Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.

Isaac Vicentini
Mega Sage
Mega Sage

I found the answer in a Servicenow docs:

 

"The Now Platform only trusts certificates that it can verify against the JVM certificate store. Self-signed and enterprise-signed certificates are not trusted.

By default, the com.glide.communications.trustmanager_trust_all property is set to false."

 

I performed a test setting the property to true and the API connection worked without errors.

I will analyze if it will be possible to include the certificate in the API as it is the most appropriate at the moment.

 

Reference: Certificate Trust
https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/security/reference/certificate-trust.html

 

Thanks to everyone who helped in any way.


Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.