function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Eager-2-LearnEager-2-Learn 

HTTP Callout producing error now - sun.security.validator.validatorexception:...

We had code in place that worked but the business wanted to stop the push of data to our external app.  I took the button off of the SF page to prevent the usres from pushing the data.  Now about 1.5 year later they want to the button back on the page.  However, I now get the following error when the callout is executed.  I have been told by some that it could be the cert on the external system.  Can anyone please confirm that is a possibility or add other possible areas that I should look into.


System.CalloutException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Pramod_SFDCPramod_SFDC
Hi,

The main reason for this error is that the endpoint is presenting a certificate chain that contains incorrect intermediaries during the SSL Handshake. The server is sending it's own certificate and it signing chain, but one or more intermediate certificates are incorrect.

Resolution: The endpoint must present a chain where the next certificate's subject equals the current certificate's issuer.

How to detect: A tool like OpenSSL can be used to validate whether the distinguished name (DN) of a certificate's issuer is equal the DN of the next certificate's subject, which must match for the chain to be valid.




Regards
Pramod